Bläddra i källkod

Fix warning/ format code

Julio 8 år sedan
förälder
incheckning
b9a092973b
3 ändrade filer med 22 tillägg och 4 borttagningar
  1. 3 3
      main/link/link.php
  2. 18 0
      plugin/bbb/lib/bbb.lib.php
  3. 1 1
      plugin/bbb/listing.php

+ 3 - 3
main/link/link.php

@@ -69,19 +69,19 @@ $course_id = api_get_course_int_id();
 $session_id = api_get_session_id();
 $condition_session = api_get_session_condition($session_id, true, true);
 
-if ($action == 'addlink') {
+if ($action === 'addlink') {
     $nameTools = '';
     $interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
     $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddLink'));
 }
 
-if ($action == 'addcategory') {
+if ($action === 'addcategory') {
     $nameTools = '';
     $interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
     $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddCategory'));
 }
 
-if ($action == 'editlink') {
+if ($action === 'editlink') {
     $nameTools = '';
     $interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
     $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditLink'));

+ 18 - 0
plugin/bbb/lib/bbb.lib.php

@@ -1041,6 +1041,10 @@ class bbb
      */
     public function endUrl($meeting)
     {
+        if (!isset($meeting['id'])) {
+            return '';
+        }
+
         return api_get_path(WEB_PLUGIN_PATH).'bbb/listing.php?'.$this->getUrlParams().'&action=end&id='.$meeting['id'];
     }
 
@@ -1062,6 +1066,9 @@ class bbb
      */
     public function publishUrl($meeting)
     {
+        if (!isset($meeting['id'])) {
+            return '';
+        }
         return api_get_path(WEB_PLUGIN_PATH).'bbb/listing.php?'.$this->getUrlParams().'&action=publish&id='.$meeting['id'];
     }
 
@@ -1071,6 +1078,9 @@ class bbb
      */
     public function unPublishUrl($meeting)
     {
+        if (!isset($meeting['id'])) {
+            return '';
+        }
         return api_get_path(WEB_PLUGIN_PATH).'bbb/listing.php?'.$this->getUrlParams().'&action=unpublish&id='.$meeting['id'];
     }
 
@@ -1080,6 +1090,10 @@ class bbb
      */
     public function deleteRecordUrl($meeting)
     {
+        if (!isset($meeting['id'])) {
+            return '';
+        }
+
         return api_get_path(WEB_PLUGIN_PATH).'bbb/listing.php?'.$this->getUrlParams().'&action=delete_record&id='.$meeting['id'];
     }
 
@@ -1089,6 +1103,10 @@ class bbb
      */
     public function copyToRecordToLinkTool($meeting)
     {
+        if (!isset($meeting['id'])) {
+            return '';
+        }
+
         return api_get_path(WEB_PLUGIN_PATH).'bbb/listing.php?'.$this->getUrlParams().'&action=copy_record_to_link_tool&id='.$meeting['id'];
     }
 }

+ 1 - 1
plugin/bbb/listing.php

@@ -140,7 +140,7 @@ if ($bbb->isGlobalConference() === false &&
     $form = new FormValidator(api_get_self());
     $groupId = api_get_group_id();
     $groups = GroupManager::get_groups();
-    if ($groups && !empty($groupId)) {
+    if ($groups) {
         $groupList[0] = get_lang('Select');
         $groupList = array_merge($groupList, array_column($groups, 'name', 'iid'));
         $form->addSelect('group_id', get_lang('Groups'), $groupList, ['id' => 'group_select']);