Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Oct 22, 2024
1 parent 2974410 commit 2ae499d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions plugin/Meet/Objects/Meet_schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,15 +409,15 @@ public function save() {
return parent::save();
}

static function getFromTopic($topic, $refreshCache = false)
static function getFromName($name, $refreshCache = false)
{
global $global;
if (!class_exists('sqlDAL')) {
return false;
}
$sql = "SELECT * FROM " . static::getTableName() . " WHERE topic = ? ORDER BY id DESC LIMIT 1";
$sql = "SELECT * FROM " . static::getTableName() . " WHERE name = ? ORDER BY id DESC LIMIT 1";
//var_dump($sql, $id);
$res = sqlDAL::readSql($sql, "s", [$topic]);
$res = sqlDAL::readSql($sql, "s", [$name]);
$data = sqlDAL::fetchAssoc($res);
sqlDAL::close($res);
if ($res) {
Expand Down
6 changes: 3 additions & 3 deletions plugin/Meet/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

if(!empty($_GET['redirectUri'])){
$parts = explode('/', addLastSlash($_GET['redirectUri']));
$topic = $parts[count($parts)-2];
$name = $parts[count($parts)-2];
if(!empty($topic)){
error_log('Meet topic: '.$topic);
$row = Meet_schedule::getFromTopic($topic);
error_log('Meet topic: '.$name);
$row = Meet_schedule::getFromName($name);
if(!empty($row )){
$link = Meet::getMeetLink($row['id']);
error_log('Meet redirect: '.$link);
Expand Down

0 comments on commit 2ae499d

Please sign in to comment.