From c7b44cc1e916e2e324d899d2340e3e3e4ffba1d1 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Fri, 23 Jul 2010 07:11:17 +0300 Subject: [PATCH] Feature #1744 - Cleaning logical conditions (3). --- main/inc/course_document.inc.php | 2 +- main/inc/lib/attendance.lib.php | 104 ++--- main/inc/lib/course.lib.php | 6 +- .../fckeditor/editor/dialog/fck_scayt.html | 11 +- .../spellerpages/controlWindow.js | 4 +- .../fckeditor/editor/dialog/fck_template.html | 6 +- .../filemanager/browser/default/browser.html | 2 +- .../ImageManager/Classes/ImageEditor.php | 2 +- .../ImageManager/Classes/ImageManager.php | 34 +- .../plugins/ImageManager/assets/editor.js | 4 +- .../editor/plugins/ImageManager/editor.php | 14 +- .../plugins/ImageManager/editorFrame.php | 6 +- .../editor/plugins/ImageManager/images.php | 6 +- .../editor/plugins/ImageManager/manager.php | 4 +- .../_ajax_get_details_listing.php | 2 +- .../_ajax_get_thumbnail_listing.php | 2 +- .../ajaxfilemanager/ajax_get_file_listing.php | 2 +- .../ajaxfilemanager/inc/class.file.php | 4 +- .../ajaxfilemanager/inc/class.image.php | 2 +- .../ajaxfilemanager/inc/class.manager.php | 2 +- .../ajaxfilemanager/inc/function.base.php | 4 +- .../editor/plugins/flvPlayer/flvPlayer.js | 18 +- .../editor/plugins/imgmap/jscripts/imgmap.js | 28 +- .../editor/plugins/youtube/youtube.js | 2 +- main/inc/lib/fckeditor/fckeditor.php | 4 +- main/inc/lib/fileUpload.lib.php | 8 +- main/inc/lib/glossary.lib.php | 20 +- main/inc/lib/group_portal_manager.lib.php | 10 +- main/inc/lib/groupmanager.lib.php | 30 +- main/inc/lib/main_api.lib.php | 10 +- main/inc/lib/sessionmanager.lib.php | 6 +- main/inc/lib/social.lib.php | 38 +- main/inc/lib/tablesort.lib.php | 2 +- main/inc/lib/thematic.lib.php | 414 +++++++++--------- main/inc/lib/tracking.lib.php | 10 +- main/inc/lib/usermanager.lib.php | 16 +- main/inc/local.inc.php | 4 +- 37 files changed, 421 insertions(+), 422 deletions(-) mode change 100644 => 100755 main/inc/course_document.inc.php mode change 100644 => 100755 main/inc/lib/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageEditor.php mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/editor.js mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/ImageManager/editorFrame.php mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/ImageManager/images.php mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_details_listing.php mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_get_file_listing.php mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.file.php mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.image.php mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/function.base.php mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/imgmap/jscripts/imgmap.js diff --git a/main/inc/course_document.inc.php b/main/inc/course_document.inc.php old mode 100644 new mode 100755 index 90ececdd22..7a10936733 --- a/main/inc/course_document.inc.php +++ b/main/inc/course_document.inc.php @@ -270,7 +270,7 @@ function OpenFile( fileUrl, type ) if (type=="audio") { ret = confirm(''); - if (ret==true) + if (ret) { GetE('autostart').checked = true; } diff --git a/main/inc/lib/attendance.lib.php b/main/inc/lib/attendance.lib.php index 231118284c..45c1696ee8 100755 --- a/main/inc/lib/attendance.lib.php +++ b/main/inc/lib/attendance.lib.php @@ -4,7 +4,7 @@ /** * This file contains class used like library, provides functions for attendance tool. It's also used like model to attendance_controller (MVC pattern) * @author Christian Fasanando - * @author Julio Montoya improvements + * @author Julio Montoya improvements * @package chamilo.attendance */ @@ -40,18 +40,18 @@ class Attendance return $obj->total_number_of_items; } - + /** * Get attendance list only the id, name and attendance_qualify_max fields * @param string course db name (optional) * @param int session id (optional) * @return array attendances list */ - function get_attendances_list($course_db_name = '', $session_id = null) { + function get_attendances_list($course_db_name = '', $session_id = null) { // Initializing database table and variables - $tbl_attendance = Database :: get_course_table(TABLE_ATTENDANCE); + $tbl_attendance = Database :: get_course_table(TABLE_ATTENDANCE); $data = array(); - + if (!empty($course_db_name)) { $tbl_attendance = Database :: get_course_table(TABLE_ATTENDANCE, $course_db_name); } @@ -67,7 +67,7 @@ class Attendance $data[$row['id']] = $row; } } - return $data; + return $data; } /** @@ -108,9 +108,9 @@ class Attendance $student_param = ''; if (api_is_drh() && ($_GET['student_id'])) { - $student_param = '&student_id='.Security::remove_XSS($_GET['student_id']); + $student_param = '&student_id='.Security::remove_XSS($_GET['student_id']); } - + $attendance[1] = ''.$attendance[1].''; $attendance[3] = '
'.$attendance[3].'
'; if (api_is_allowed_to_edit(null, true)) { @@ -178,7 +178,7 @@ class Attendance if ($link_to_gradebook) { $description = ''; $link_id=is_resource_in_course_gradebook($course_code,7,$last_id,$session_id); - if ($link_id==false) { + if (!$link_id) { add_resource_to_course_gradebook($course_code, 7, $last_id, $title_gradebook,$weight_calification,$value_calification,$description,time(),1,$session_id); } else { Database::query('UPDATE '.$table_link.' SET weight='.$weight_calification.' WHERE id='.$link_id.''); @@ -223,20 +223,20 @@ class Attendance if ($link_to_gradebook) { $description = ''; $link_id=is_resource_in_course_gradebook($course_code,7,$attendance_id,$session_id); - if ($link_id==false) { + if (!$link_id) { add_resource_to_course_gradebook($course_code, 7, $attendance_id, $title_gradebook,$weight_calification,$value_calification,$description,time(),1,$session_id); } else { Database::query('UPDATE '.$table_link.' SET weight='.$weight_calification.' WHERE id='.$link_id.''); } } $last_id = $attendance_id; - + return $last_id; } /** * delete attendaces - * @param int|array one or many attendances id + * @param int|array one or many attendances id * @return int affected rows */ public function attendance_delete($attendance_id) { @@ -281,19 +281,19 @@ class Attendance $a_course_users = CourseManager :: get_user_list_from_course_code($current_course_id, false, 0, '','lastname'); } // get registered users inside current course - $a_users = array(); + $a_users = array(); foreach ($a_course_users as $key =>$user_data) { $value = array(); $uid = $user_data['user_id']; $status = $user_data['status']; $user_status_in_course = CourseManager::get_user_in_course_status($uid, $current_course_id); - + //Not taking into account DRH or COURSEMANAGER if ($uid <= 1 || $status == DRH || $user_status_in_course == COURSEMANAGER) continue; - if (!empty($attendance_id)) { + if (!empty($attendance_id)) { $user_faults = $this->get_faults_of_user($uid, $attendance_id); - + $value['attendance_result'] = $user_faults['faults'].'/'.$user_faults['total'].' ('.$user_faults['faults_porcent'].'%)'; $value['result_color_bar'] = $user_faults['color_bar']; } @@ -301,19 +301,19 @@ class Attendance // user's picture $image_path = UserManager::get_user_picture_path_by_id($uid, 'web', false); $user_profile = UserManager::get_picture_user($uid, $image_path['file'], 22, USER_IMAGE_SIZE_SMALL, ' width="22" height="22" '); - + if (!empty($image_path['file'])) { $photo = '
'.api_get_person_name($user_data['firstname'], $user_data['lastname']).'
'; } else { $photo = '
'.api_get_person_name($user_data['firstname'], $user_data['lastname']).'
'; } - + $value['photo'] = $photo; $value['firstname'] = $user_data['firstname']; $value['lastname'] = $user_data['lastname']; $value['user_id'] = $uid; - //Sending only 5 items in the array instead of 60 + //Sending only 5 items in the array instead of 60 $a_users[$key] = $value; } return $a_users; @@ -455,16 +455,16 @@ class Attendance * @return array results containing number of faults, total done attendance, porcent of faults and color depend on result (red, orange) */ public function get_faults_of_user($user_id, $attendance_id) { - + // initializing database table and variables - $tbl_attendance_result = Database::get_course_table(TABLE_ATTENDANCE_RESULT); + $tbl_attendance_result = Database::get_course_table(TABLE_ATTENDANCE_RESULT); $user_id = intval($user_id); $attendance_id = intval($attendance_id); $results = array(); $attendance_data = $this->get_attendance_by_id($attendance_id); $total_done_attendance = $attendance_data['attendance_qualify_max']; $attendance_user_score = $this->get_user_score($user_id, $attendance_id); - + // calculate results $faults = $total_done_attendance-$attendance_user_score; $faults = $faults > 0 ? $faults:0; @@ -473,7 +473,7 @@ class Attendance $results['total'] = $total_done_attendance; $results['faults_porcent'] = $faults_porcent; $color_bar = ''; - + if ($faults_porcent > 25 ) { $color_bar = '#F11'; } else if ($faults_porcent > 10) { @@ -483,30 +483,30 @@ class Attendance return $results; } - + /** * Get results of faults average for all courses by user - * @param int user id + * @param int user id * @return array results containing number of faults, total done attendance, porcent of faults and color depend on result (red, orange) */ public function get_faults_average_inside_courses($user_id) { - + // get all courses of current user - $courses = CourseManager::get_courses_list_by_user_id($user_id, true); - - $user_id = intval($user_id); + $courses = CourseManager::get_courses_list_by_user_id($user_id, true); + + $user_id = intval($user_id); $results = array(); $total_faults = $total_weight = $porcent = 0; - foreach ($courses as $course) { + foreach ($courses as $course) { //$course_code = $course['code']; //$course_info = api_get_course_info($course_code); $tbl_attendance_result = Database::get_course_table(TABLE_ATTENDANCE_RESULT, $course['db_name']); - + $attendances_by_course = $this->get_attendances_list($course['db_name']); - - foreach ($attendances_by_course as $attendance) { + + foreach ($attendances_by_course as $attendance) { // get total faults and total weight - $total_done_attendance = $attendance['attendance_qualify_max']; + $total_done_attendance = $attendance['attendance_qualify_max']; $sql = "SELECT score FROM $tbl_attendance_result WHERE user_id=$user_id AND attendance_id=".$attendance['id']; $rs = Database::query($sql); $score = 0; @@ -517,7 +517,7 @@ class Attendance $faults = $total_done_attendance-$score; $faults = $faults > 0 ? $faults:0; $total_faults += $faults; - $total_weight += $total_done_attendance; + $total_weight += $total_done_attendance; } } @@ -525,30 +525,30 @@ class Attendance $results['faults'] = $total_faults; $results['total'] = $total_weight; $results['porcent'] = $porcent; - + return $results; } - + /** * Get results of faults average by course - * @param int user id + * @param int user id * @param int Session id (optional) * @return array results containing number of faults, total done attendance, porcent of faults and color depend on result (red, orange) */ public function get_faults_average_by_course($user_id, $course_code, $session_id = null) { - + // Database tables and variables $course_info = api_get_course_info($course_code); - $tbl_attendance_result = Database::get_course_table(TABLE_ATTENDANCE_RESULT, $course_info['dbName']); - $user_id = intval($user_id); + $tbl_attendance_result = Database::get_course_table(TABLE_ATTENDANCE_RESULT, $course_info['dbName']); + $user_id = intval($user_id); $results = array(); $total_faults = $total_weight = $porcent = 0; - $attendances_by_course = $this->get_attendances_list($course_info['dbName'], $session_id); - - foreach ($attendances_by_course as $attendance) { + $attendances_by_course = $this->get_attendances_list($course_info['dbName'], $session_id); + + foreach ($attendances_by_course as $attendance) { // Get total faults and total weight - $total_done_attendance = $attendance['attendance_qualify_max']; + $total_done_attendance = $attendance['attendance_qualify_max']; $sql = "SELECT score FROM $tbl_attendance_result WHERE user_id=$user_id AND attendance_id=".$attendance['id']; $rs = Database::query($sql); $score = 0; @@ -559,9 +559,9 @@ class Attendance $faults = $total_done_attendance-$score; $faults = $faults > 0 ? $faults:0; $total_faults += $faults; - $total_weight += $total_done_attendance; + $total_weight += $total_done_attendance; } - + $porcent = $total_weight > 0 ?round(($total_faults*100)/$total_weight,0):0; $results['faults'] = $total_faults; $results['total'] = $total_weight; @@ -580,7 +580,7 @@ class Attendance global $dateTimeFormatLong; $tbl_attendance_sheet = Database::get_course_table(TABLE_ATTENDANCE_SHEET); $tbl_attendance_calendar= Database::get_course_table(TABLE_ATTENDANCE_CALENDAR); - + $attendance_calendar = $this->get_attendance_calendar($attendance_id); $calendar_ids = array(); // get all dates from calendar by current attendance @@ -692,8 +692,8 @@ class Attendance $rs = Database::query($sql); $data = array(); if (Database::num_rows($rs) > 0) { - while ($row = Database::fetch_array($rs)) { - $row['date_time'] = api_get_local_time($row['date_time']); + while ($row = Database::fetch_array($rs)) { + $row['date_time'] = api_get_local_time($row['date_time']); $row['date'] = api_format_date($row['date_time'], DATE_FORMAT_SHORT); $row['time'] = api_format_date($row['date_time'], TIME_NO_SEC_FORMAT); $data[] = $row; @@ -737,11 +737,11 @@ class Attendance // save repeated dates switch($repeat_type) { - case 'daily': + case 'daily': for ($i = $start_date + 86400; ($i <= $end_date); $i += 86400) { $datetime = date('Y-m-d H:i:s', $i); $datetimezone = api_get_utc_datetime($datetime); - $this->set_date_time($datetimezone); + $this->set_date_time($datetimezone); $res = $this->attendance_calendar_add($attendance_id); } break; diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index 0d8b51d62b..83d105ed61 100755 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -440,7 +440,7 @@ class CourseManager { $sql_course = "SELECT course_code FROM $table_field cf INNER JOIN $t_cfv cfv ON cfv.field_id=cf.id WHERE field_variable='$original_course_id_name' AND field_value='$original_course_id_value'"; $res = Database::query($sql_course); $row = Database::fetch_object($res_course); - if($row != false) { + if ($row) { return $row->course_code; } else { return 0; @@ -458,7 +458,7 @@ class CourseManager { $sql = "SELECT code FROM course WHERE id = '$id';"; $res = Database::query($sql); $row = Database::fetch_object($res); - if($row != false) { + if ($row) { return $row->code; } else { return null; @@ -2199,7 +2199,7 @@ class CourseManager { $data = ''; foreach ($descriptions as $id => $description) { $data .= '
'; - if (api_is_allowed_to_edit() && $action_show == true) { + if (api_is_allowed_to_edit() && $action_show) { //delete $data .= ''; $data .= Display::return_icon('delete.gif', get_lang('Delete'), array('style' => 'vertical-align:middle;float:right;')); diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_scayt.html b/main/inc/lib/fckeditor/editor/dialog/fck_scayt.html index d099a813b4..dda142e8af 100755 --- a/main/inc/lib/fckeditor/editor/dialog/fck_scayt.html +++ b/main/inc/lib/fckeditor/editor/dialog/fck_scayt.html @@ -325,13 +325,12 @@ var that = get.wrap(this); var isCheck = that.getAttr("checked"); //console.info(isCheck) - if ( isCheck == false ) { - - //that.setAttr("checked",false); - options[ this.name ] = 0; - }else{ - //that.setAttr("checked",true); + if ( isCheck ) { + //that.setAttr("checked", true); options[ this.name ] = 1; + } else { + //that.setAttr("checked", false); + options[ this.name ] = 0; } //console.info(options) }); diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js b/main/inc/lib/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js old mode 100644 new mode 100755 index 6ba8cf038b..4d1aed91ae --- a/main/inc/lib/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js +++ b/main/inc/lib/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js @@ -72,7 +72,7 @@ function clearSuggestions() { function enableUndo() { if( this.undoButton ) { - if( this.undoButton.disabled == true ) { + if( this.undoButton.disabled ) { this.undoButton.disabled = false; } } @@ -80,7 +80,7 @@ function enableUndo() { function disableUndo() { if( this.undoButton ) { - if( this.undoButton.disabled == false ) { + if( !this.undoButton.disabled ) { this.undoButton.disabled = true; } } diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_template.html b/main/inc/lib/fckeditor/editor/dialog/fck_template.html index ccbc28898d..a30e99cc1a 100755 --- a/main/inc/lib/fckeditor/editor/dialog/fck_template.html +++ b/main/inc/lib/fckeditor/editor/dialog/fck_template.html @@ -86,9 +86,9 @@ window.onload = function() //window.parent.SetAutoSize( true ) ; LoadTemplatesXml() ; - // select first by default (Chamilo customization) - if(window.top.load_default_template==true) - SelectTemplate(0); + // Select first by default (Chamilo customization) + if ( window.top.load_default_template ) + SelectTemplate( 0 ) ; } function LoadTemplatesXml() diff --git a/main/inc/lib/fckeditor/editor/filemanager/browser/default/browser.html b/main/inc/lib/fckeditor/editor/filemanager/browser/default/browser.html index cc73242cd9..94e03a0e5f 100755 --- a/main/inc/lib/fckeditor/editor/filemanager/browser/default/browser.html +++ b/main/inc/lib/fckeditor/editor/filemanager/browser/default/browser.html @@ -226,7 +226,7 @@ oIcons.GetIcon = function( fileName ) break ; } - if ( this.AvailableIcons[ sExtension ] == true ) + if ( this.AvailableIcons[ sExtension ] ) return sExtension ; else return 'default.icon' ; diff --git a/main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageEditor.php b/main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageEditor.php old mode 100644 new mode 100755 index 66496a57a9..faa85d768d --- a/main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageEditor.php +++ b/main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageEditor.php @@ -237,7 +237,7 @@ class ImageEditor $newSaveFile = $this->makeRelative($relative, $saveFile); $oldSaveFile = $newSaveFile; - if ($this->manager->config['allow_newFileName'] && $this->manager->config['allow_overwrite'] == false) + if ($this->manager->config['allow_newFileName'] && !$this->manager->config['allow_overwrite']) { // check whether a file already exist and if there is, create a variant of the filename $newName = $this->getUniqueFilename($newSaveFile); diff --git a/main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageManager.php b/main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageManager.php index 872554643b..4a52ac938b 100755 --- a/main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageManager.php +++ b/main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageManager.php @@ -103,7 +103,7 @@ class ImageManager $base = Files::fixPath($base); $dirs = array(); - if($this->isValidBase() == false) + if (!$this->isValidBase()) return $dirs; $d = @dir($base); @@ -128,7 +128,7 @@ class ImageManager && strpos($entry, 'css') === false && strpos($entry, 'HotPotatoes_files') === false && ($in_group || (!$in_group && strpos($entry, '_groupdocs') === false)) - && $this->isThumbDir($entry) == false) + && !$this->isThumbDir($entry)) { $relative = Files::fixPath($path.$entry); $fullpath = Files::fixPath($base.$entry); @@ -186,7 +186,7 @@ class ImageManager $files = array(); $dirs = array(); - if($this->isValidBase() == false) + if (!$this->isValidBase()) return array($files,$dirs); $path = Files::fixPath($path); @@ -249,7 +249,7 @@ class ImageManager */ } - if($is_dir && $this->isThumbDir($entry) == false) { + if ($is_dir && !$this->isThumbDir($entry)) { global $_course; if (isset($_course['dbName']) && $_course<>'-1') { //checking visibility @@ -270,7 +270,7 @@ class ImageManager $count = $this->countFiles($full); $dirs[$relative] = array('fullpath'=>$full,'entry'=>$entry,'count'=>$count); } - else if(is_file($fullpath.$entry) && $this->isThumb($entry)==false && $this->isTmpFile($entry) == false) + else if(is_file($fullpath.$entry) && !$this->isThumb($entry) && !$this->isTmpFile($entry)) { $img = $this->getImageInfo($fullpath.$entry); @@ -323,11 +323,11 @@ class ImageManager while (false !== ($entry = $d->read())) { - //echo $entry."
"; - if(substr($entry,0,1) != '.' - && $this->isThumbDir($entry) == false - && $this->isTmpFile($entry) == false - && $this->isThumb($entry) == false) + //echo $entry."
"; + if (substr($entry, 0, 1) != '.' + && !$this->isThumbDir($entry) + && !$this->isTmpFile($entry) + && !$this->isThumb($entry)) { $total++; } @@ -369,7 +369,7 @@ class ImageManager */ function isThumbDir($entry) { - if($this->config['thumbnail_dir'] == false + if (!$this->config['thumbnail_dir'] || strlen(trim($this->config['thumbnail_dir'])) == 0) Return false; else @@ -402,7 +402,7 @@ class ImageManager $thumbnail = $this->config['thumbnail_prefix'].$path_parts['basename']; - if($this->config['safe_mode'] == true + if ($this->config['safe_mode'] || strlen(trim($this->config['thumbnail_dir'])) == 0) { Return Files::makeFile($path_parts['dirname'],$thumbnail); @@ -436,7 +436,7 @@ class ImageManager $thumbnail = $this->config['thumbnail_prefix'].$path_parts['basename']; if($path_parts['dirname']=='\\') $path_parts['dirname']='/'; - if($this->config['safe_mode'] == true + if ($this->config['safe_mode'] || strlen(trim($this->config['thumbnail_dir'])) == 0) { $path = Files::fixPath($path_parts['dirname']); @@ -494,7 +494,7 @@ class ImageManager */ function processUploads() { - if($this->isValidBase() == false) + if (!$this->isValidBase()) return; $relative = null; @@ -571,7 +571,7 @@ class ImageManager } // Checking for a valid image by reading binary file (partially in most cases). - if($this->config['validate_images'] == true) + if ($this->config['validate_images']) { $imgInfo = @getImageSize($file['tmp_name']); if(!is_array($imgInfo)) @@ -756,7 +756,7 @@ class ImageManager { $fullpath = Files::makeFile($this->getBaseDir(),$relative); //check that the file is an image - if($this->config['validate_images'] == true) + if ($this->config['validate_images']) { if(!is_array($this->getImageInfo($fullpath))) return false; //hmmm not an Image!!??? @@ -821,7 +821,7 @@ class ImageManager */ function processNewDir() { - if($this->config['safe_mode'] == true) + if ($this->config['safe_mode']) Return false; if(isset($_GET['newDir']) && isset($_GET['dir'])) diff --git a/main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/editor.js b/main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/editor.js old mode 100644 new mode 100755 index 26f316f0cf..f34af1320b --- a/main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/editor.js +++ b/main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/editor.js @@ -19,7 +19,7 @@ { editor.window.document.getElementById("imgCanvas").style.display = "block"; editor.window.document.getElementById("background").style.display = "none"; - if (editor.window.watermarkingEnabled == true) + if (editor.window.watermarkingEnabled) { editor.window.dd.elements.floater.hide(); } @@ -55,7 +55,7 @@ { editor.window.document.getElementById("imgCanvas").style.display = "none"; editor.window.document.getElementById("background").style.display = "block"; - if (editor.window.watermarkingEnabled == true) + if (editor.window.watermarkingEnabled) { editor.window.dd.elements.floater.show(); editor.window.dd.elements.floater.moveTo(0, 0); diff --git a/main/inc/lib/fckeditor/editor/plugins/ImageManager/editor.php b/main/inc/lib/fckeditor/editor/plugins/ImageManager/editor.php index d1e7f0cf50..a2af63f8da 100755 --- a/main/inc/lib/fckeditor/editor/plugins/ImageManager/editor.php +++ b/main/inc/lib/fckeditor/editor/plugins/ImageManager/editor.php @@ -287,12 +287,12 @@ body {