diff --git a/main/gradebook/lib/be/surveylink.class.php b/main/gradebook/lib/be/surveylink.class.php
index 1e8be6a958..8def43fbb6 100755
--- a/main/gradebook/lib/be/surveylink.class.php
+++ b/main/gradebook/lib/be/surveylink.class.php
@@ -97,7 +97,7 @@ class SurveyLink extends AbstractLink
if (empty($this->course_code)) {
die('Error in get_not_created_links() : course code not set');
}
- $tbl_grade_links = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINK);
+ $tbl_grade_links = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINK);
$sql = 'SELECT survey_id, title, code
FROM '.$this->get_survey_table().' AS srv
@@ -229,7 +229,7 @@ class SurveyLink extends AbstractLink
*/
private function get_survey_table()
{
- $this->survey_table = Database :: get_course_table(TABLE_SURVEY);
+ $this->survey_table = Database::get_course_table(TABLE_SURVEY);
return $this->survey_table;
}
@@ -243,7 +243,7 @@ class SurveyLink extends AbstractLink
WHERE
c_id = '.$this->course_id.' AND
survey_id = '.intval($this->get_ref_id()).' AND
- session_id='.intval($session_id).'';
+ session_id = '.intval($session_id);
$result = Database::query($sql);
$number = Database::fetch_row($result);
return ($number[0] != 0);
diff --git a/main/inc/lib/access_url_edit_sessions_to_url_functions.lib.php b/main/inc/lib/access_url_edit_sessions_to_url_functions.lib.php
index f467119d24..8afd0c16bf 100755
--- a/main/inc/lib/access_url_edit_sessions_to_url_functions.lib.php
+++ b/main/inc/lib/access_url_edit_sessions_to_url_functions.lib.php
@@ -28,7 +28,7 @@ class Accessurleditsessionstourl
*/
function search_sessions($needle, $id)
{
- $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
+ $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
$xajax_response = new xajaxResponse();
$return = '';
@@ -44,7 +44,7 @@ class Accessurleditsessionstourl
LIMIT 11';
$rs = Database::query($sql);
$i=0;
- while ($session = Database :: fetch_array($rs)) {
+ while ($session = Database::fetch_array($rs)) {
$i++;
if ($i<=10) {
$return .= ''.$session['name'].'
';
diff --git a/main/inc/lib/export.lib.inc.php b/main/inc/lib/export.lib.inc.php
index 0af5975aa1..8e6939e5a6 100755
--- a/main/inc/lib/export.lib.inc.php
+++ b/main/inc/lib/export.lib.inc.php
@@ -149,7 +149,7 @@ class Export
fwrite($handle, ''.$wrapper_tagname.'>'."\n");
}
fclose($handle);
- DocumentManager :: file_send_for_download($file, true, $filename.'.xml');
+ DocumentManager::file_send_for_download($file, true, $filename.'.xml');
exit;
}
@@ -181,7 +181,7 @@ class Export
fwrite($handle, ''.$wrapper_tagname.'>'."\n");
}
fclose($handle);
- DocumentManager :: file_send_for_download($file, true, $filename.'.xml');
+ DocumentManager::file_send_for_download($file, true, $filename.'.xml');
return false;
}
diff --git a/main/inc/lib/fileDisplay.lib.php b/main/inc/lib/fileDisplay.lib.php
index 0d1ea5df71..84b368586d 100755
--- a/main/inc/lib/fileDisplay.lib.php
+++ b/main/inc/lib/fileDisplay.lib.php
@@ -187,11 +187,11 @@ function chooseFolderIcon($folderPath)
}
switch ($folderPath) {
- case '/audio';
+ case '/audio':
return 'folder_audio.gif';
case '/flash':
return 'folder_flash.gif';
- case '/images';
+ case '/images':
return 'folder_images.gif';
case '/video':
return 'folder_video.gif';
diff --git a/main/inc/lib/image.lib.php b/main/inc/lib/image.lib.php
index 1f83cd00b0..53d1312cdd 100755
--- a/main/inc/lib/image.lib.php
+++ b/main/inc/lib/image.lib.php
@@ -409,7 +409,8 @@ class GDWrapper extends ImageWrapper
@imagecopy($dest, $src, 0, 0, $x, $y, $src_width, $src_height);
@imagegif($dest, $this->path);
break;
- default: return 0;
+ default:
+ return 0;
}
@imagedestroy($dest);
@imagedestroy($src);
@@ -444,7 +445,8 @@ class GDWrapper extends ImageWrapper
}
return imagegif($this->bg, $file, $compress);
break;
- default: return 0;
+ default:
+ return 0;
}
// TODO: Occupied memory is not released, because the following fragment of code is actually dead.
@imagedestroy($this->bg);
diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php
index 7a148c0013..e8d3c6b713 100755
--- a/main/inc/lib/social.lib.php
+++ b/main/inc/lib/social.lib.php
@@ -852,7 +852,7 @@ class SocialManager extends UserManager
$count_unread_message = MessageManager::get_number_of_messages(true);
$count_unread_message = !empty($count_unread_message) ? Display::badge($count_unread_message) : null;
- $number_of_new_messages_of_friend = SocialManager::get_message_number_invitation_by_user_id(api_get_user_id());
+ $number_of_new_messages_of_friend = self::get_message_number_invitation_by_user_id(api_get_user_id());
$group_pending_invitations = $usergroup->get_groups_by_user(
api_get_user_id(),
GROUP_USER_PERMISSION_PENDING_INVITATION,
@@ -1057,7 +1057,7 @@ class SocialManager extends UserManager
}
// Check if I already sent an invitation message
- $invitation_sent_list = SocialManager::get_list_invitation_sent_by_user_id(
+ $invitation_sent_list = self::get_list_invitation_sent_by_user_id(
api_get_user_id()
);
diff --git a/plugin/pens/chamilo_pens.php b/plugin/pens/chamilo_pens.php
index 34e78d7e27..8ade904e79 100755
--- a/plugin/pens/chamilo_pens.php
+++ b/plugin/pens/chamilo_pens.php
@@ -156,7 +156,7 @@ class ChamiloPens extends Plugin
$clean_client = Database::escape_string($this->_client);
$clean_vendor_data = Database::escape_string($this->_vendor_data);
$created_at = api_get_utc_datetime();
- $table = Database::get_main_table(ChamiloPens::TABLE_NAME);
+ $table = Database::get_main_table(self::TABLE_NAME);
$sql_query = "INSERT INTO $table (pens_version, package_type, package_type_version, package_format, package_id, client, vendor_data, package_name, created_at) VALUES (" .
"'" . $this->_pens_version . "', " .
"'" . $this->_package_type . "', " .
@@ -186,7 +186,7 @@ class ChamiloPens extends Plugin
*/
public static function findByPackageId($package_id)
{
- $table = Database::get_main_table(ChamiloPens::TABLE_NAME);
+ $table = Database::get_main_table(self::TABLE_NAME);
$sql_query = "SELECT * FROM $table WHERE package_id = '" . $package_id . "';";
$results = Database::query($sql_query);
$number = Database::num_rows($results);
@@ -205,7 +205,7 @@ class ChamiloPens extends Plugin
*/
public static function findAll()
{
- $table = Database::get_main_table(ChamiloPens::TABLE_NAME);
+ $table = Database::get_main_table(self::TABLE_NAME);
$sql_query = "SELECT * FROM $table ORDER BY created_at;";
$results = Database::query($sql_query);
$return = array();