@@ -80,7 +80,7 @@ |
||
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | 82 | * Validates the received active connection data with the database |
| 83 | - * @return bool Return the loginFailed variable value to local.inc.php |
|
| 83 | + * @return null|false Return the loginFailed variable value to local.inc.php |
|
| 84 | 84 | */ |
| 85 | 85 | public function check_user() |
| 86 | 86 | { |
@@ -327,7 +327,7 @@ |
||
| 327 | 327 | * @param array $arr1 first array |
| 328 | 328 | * @param array $arr2 second array |
| 329 | 329 | * |
| 330 | - * @return array difference between the two arrays |
|
| 330 | + * @return string difference between the two arrays |
|
| 331 | 331 | */ |
| 332 | 332 | function diff($arr1, $arr2) |
| 333 | 333 | { |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * @param string Name of common tag to place each line in |
| 158 | 158 | * @param string Name of the root element. A root element should always be given. |
| 159 | 159 | * @param string Encoding in which the data is provided |
| 160 | - * @return void Prompts the user for a file download |
|
| 160 | + * @return boolean Prompts the user for a file download |
|
| 161 | 161 | */ |
| 162 | 162 | public static function export_complex_table_xml( |
| 163 | 163 | $data, |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | * @param string $name |
| 284 | 284 | * @param string $format |
| 285 | 285 | * |
| 286 | - * @return bool |
|
| 286 | + * @return false|null |
|
| 287 | 287 | */ |
| 288 | 288 | public static function htmlToOdt($html, $name, $format = 'odt') |
| 289 | 289 | { |
@@ -115,13 +115,13 @@ discard block |
||
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
| 118 | - * Export tabular data to XML-file |
|
| 119 | - * @param array Simple array of data to put in XML |
|
| 120 | - * @param string Name of file to be given to the user |
|
| 121 | - * @param string Name of common tag to place each line in |
|
| 122 | - * @param string Name of the root element. A root element should always be given. |
|
| 123 | - * @param string Encoding in which the data is provided |
|
| 124 | - */ |
|
| 118 | + * Export tabular data to XML-file |
|
| 119 | + * @param array Simple array of data to put in XML |
|
| 120 | + * @param string Name of file to be given to the user |
|
| 121 | + * @param string Name of common tag to place each line in |
|
| 122 | + * @param string Name of the root element. A root element should always be given. |
|
| 123 | + * @param string Encoding in which the data is provided |
|
| 124 | + */ |
|
| 125 | 125 | public static function arrayToXml( |
| 126 | 126 | $data, |
| 127 | 127 | $filename = 'export', |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | foreach ($data as $row) { |
| 201 | 201 | $string .= "\n".str_repeat("\t", $level).'<'.$row['name'].'>'; |
| 202 | 202 | if (is_array($row['value'])) { |
| 203 | - $string .= self::_export_complex_table_xml_helper($row['value'], $level + 1)."\n"; |
|
| 203 | + $string .= self::_export_complex_table_xml_helper($row['value'], $level + 1)."\n"; |
|
| 204 | 204 | $string .= str_repeat("\t", $level).'</'.$row['name'].'>'; |
| 205 | 205 | } else { |
| 206 | 206 | $string .= $row['value']; |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * |
| 17 | 17 | * @param string Mobile phone number to be validated |
| 18 | 18 | * @param string Not using it. Just to respect the declaration |
| 19 | - * @return boolean Returns true if valid, false otherwise. |
|
| 19 | + * @return integer Returns true if valid, false otherwise. |
|
| 20 | 20 | */ |
| 21 | 21 | function validate($mobilePhoneNumber, $options = null) |
| 22 | 22 | { |
@@ -626,7 +626,7 @@ |
||
| 626 | 626 | |
| 627 | 627 | /** |
| 628 | 628 | * Get first SMS plugin name |
| 629 | - * @return string|boolean |
|
| 629 | + * @return string|false |
|
| 630 | 630 | */ |
| 631 | 631 | public function getSMSPluginName() |
| 632 | 632 | { |
@@ -254,13 +254,13 @@ |
||
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | /** |
| 257 | - * @param string $region |
|
| 258 | - * @param array $plugins |
|
| 259 | - * @param mixed $template |
|
| 260 | - * @param bool $forced |
|
| 261 | - * |
|
| 262 | - * @return null|string |
|
| 263 | - */ |
|
| 257 | + * @param string $region |
|
| 258 | + * @param array $plugins |
|
| 259 | + * @param mixed $template |
|
| 260 | + * @param bool $forced |
|
| 261 | + * |
|
| 262 | + * @return null|string |
|
| 263 | + */ |
|
| 264 | 264 | public function load_region($region, $template, $plugins, $forced = false) |
| 265 | 265 | { |
| 266 | 266 | if ($region == 'course_tool_plugin') { |
@@ -425,7 +425,7 @@ |
||
| 425 | 425 | // Extra options |
| 426 | 426 | $plugin_settings = api_get_settings_params( |
| 427 | 427 | array( |
| 428 | - "subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins','setting') |
|
| 428 | + "subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins', 'setting') |
|
| 429 | 429 | ) |
| 430 | 430 | ); |
| 431 | 431 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
| 132 | - * @return array |
|
| 132 | + * @return string[] |
|
| 133 | 133 | */ |
| 134 | 134 | public function get_status_list() |
| 135 | 135 | { |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | /** |
| 273 | 273 | * @param int $id |
| 274 | 274 | * |
| 275 | - * @return bool |
|
| 275 | + * @return null|false |
|
| 276 | 276 | */ |
| 277 | 277 | public function delete($id) |
| 278 | 278 | { |
@@ -326,6 +326,7 @@ discard block |
||
| 326 | 326 | |
| 327 | 327 | /** |
| 328 | 328 | * Gets an element |
| 329 | + * @param integer $gradebook_id |
|
| 329 | 330 | */ |
| 330 | 331 | public function get_skill_info($skill_id, $gradebook_id) |
| 331 | 332 | { |
@@ -544,7 +545,7 @@ discard block |
||
| 544 | 545 | * Gets an element |
| 545 | 546 | * @param int $id |
| 546 | 547 | * |
| 547 | - * @return array|mixed |
|
| 548 | + * @return integer |
|
| 548 | 549 | */ |
| 549 | 550 | public function get($id) |
| 550 | 551 | { |
@@ -885,7 +886,7 @@ discard block |
||
| 885 | 886 | /** |
| 886 | 887 | * Get user's skills |
| 887 | 888 | * |
| 888 | - * @param int $userId User's id |
|
| 889 | + * @param integer $user_id User's id |
|
| 889 | 890 | * @param bool $get_skill_data |
| 890 | 891 | */ |
| 891 | 892 | public function get_user_skills($user_id, $get_skill_data = false) |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | public function updateProfileInfo($profileId, $name, $description) |
| 44 | 44 | { |
| 45 | 45 | $profileId = intval($profileId); |
| 46 | - $sql = "UPDATE $this->table SET |
|
| 46 | + $sql = "update $this->table SET |
|
| 47 | 47 | name = '$name', |
| 48 | 48 | description = '$description' |
| 49 | 49 | WHERE id = $profileId "; |
@@ -85,6 +85,7 @@ |
||
| 85 | 85 | /** |
| 86 | 86 | * @author Sebastien Piraux <[email protected]> |
| 87 | 87 | * @param sql : a sql query (as a string) |
| 88 | + * @param integer $X |
|
| 88 | 89 | * @desc Return many results of a query in a X column tab |
| 89 | 90 | * in $resu[$i][0], $resu[$i][1],$resu[$i][2],... |
| 90 | 91 | * this function is more 'standard' but use a little |
@@ -330,6 +330,7 @@ discard block |
||
| 330 | 330 | /** |
| 331 | 331 | * Sets the footer visibility |
| 332 | 332 | * @param bool true if we show the footer |
| 333 | + * @param boolean $status |
|
| 333 | 334 | */ |
| 334 | 335 | public function set_footer($status) |
| 335 | 336 | { |
@@ -370,6 +371,7 @@ discard block |
||
| 370 | 371 | /** |
| 371 | 372 | * Sets the header visibility |
| 372 | 373 | * @param bool true if we show the header |
| 374 | + * @param boolean $status |
|
| 373 | 375 | */ |
| 374 | 376 | public function set_header($status) |
| 375 | 377 | { |
@@ -615,7 +615,7 @@ |
||
| 615 | 615 | return [ |
| 616 | 616 | '_p' => $_p, |
| 617 | 617 | '_s' => $_s, |
| 618 | - // '_u' => $user_info, |
|
| 618 | + // '_u' => $user_info, |
|
| 619 | 619 | 'template' => 'default' // @todo setup template folder in config.yml; |
| 620 | 620 | ]; |
| 621 | 621 | } |
@@ -607,7 +607,7 @@ |
||
| 607 | 607 | |
| 608 | 608 | if (is_file(api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/editor.css')) { |
| 609 | 609 | $css[] = api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/editor.css'; |
| 610 | - }else{ |
|
| 610 | + } else { |
|
| 611 | 611 | $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'editor.css'); |
| 612 | 612 | } |
| 613 | 613 | |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | $content = '<div class="help">'; |
| 316 | 316 | $content .= Display::url( |
| 317 | 317 | Display::return_icon('help.large.png', get_lang('Help')), |
| 318 | - api_get_path(WEB_CODE_PATH) . 'help/help.php?open=' . $help, |
|
| 318 | + api_get_path(WEB_CODE_PATH).'help/help.php?open='.$help, |
|
| 319 | 319 | [ |
| 320 | 320 | 'class' => 'ajax', |
| 321 | 321 | 'data-title' => get_lang('Help') |
@@ -638,12 +638,12 @@ discard block |
||
| 638 | 638 | foreach ($bowerCSSFiles as $file) { |
| 639 | 639 | $css[] = api_get_path(WEB_PATH).'web/assets/'.$file; |
| 640 | 640 | } |
| 641 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/bootstrap-select/css/bootstrap-select.min.css'; |
|
| 642 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chosen/chosen.css'; |
|
| 643 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/style.css'; |
|
| 641 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/bootstrap-select/css/bootstrap-select.min.css'; |
|
| 642 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chosen/chosen.css'; |
|
| 643 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css'; |
|
| 644 | 644 | |
| 645 | 645 | if (api_is_global_chat_enabled()) { |
| 646 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chat/css/chat.css'; |
|
| 646 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css'; |
|
| 647 | 647 | } |
| 648 | 648 | |
| 649 | 649 | //THEME CSS STYLE |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | |
| 696 | 696 | if (is_file(api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/editor.css')) { |
| 697 | 697 | $css[] = api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/editor.css'; |
| 698 | - }else{ |
|
| 698 | + } else { |
|
| 699 | 699 | $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'editor.css'); |
| 700 | 700 | } |
| 701 | 701 | |
@@ -730,7 +730,7 @@ discard block |
||
| 730 | 730 | |
| 731 | 731 | $style_print = ''; |
| 732 | 732 | if (is_readable(api_get_path(SYS_CSS_PATH).$this->theme.'/print.css')) { |
| 733 | - $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH) . $this->theme . '/print.css'), |
|
| 733 | + $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH).$this->theme.'/print.css'), |
|
| 734 | 734 | 'print'); |
| 735 | 735 | } |
| 736 | 736 | $this->assign('css_style_print', $style_print); |
@@ -753,10 +753,10 @@ discard block |
||
| 753 | 753 | |
| 754 | 754 | $isoCode = api_get_language_isocode(); |
| 755 | 755 | |
| 756 | - $selectLink = 'bootstrap-select/js/i18n/defaults-' . $isoCode . '_' . strtoupper($isoCode) . '.min.js'; |
|
| 756 | + $selectLink = 'bootstrap-select/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js'; |
|
| 757 | 757 | |
| 758 | 758 | if ($isoCode == 'en') { |
| 759 | - $selectLink = 'bootstrap-select/js/i18n/defaults-' . $isoCode . '_US.min.js'; |
|
| 759 | + $selectLink = 'bootstrap-select/js/i18n/defaults-'.$isoCode.'_US.min.js'; |
|
| 760 | 760 | } |
| 761 | 761 | // JS files |
| 762 | 762 | $js_files = array( |
@@ -809,8 +809,8 @@ discard block |
||
| 809 | 809 | } |
| 810 | 810 | |
| 811 | 811 | if ($isoCode != 'en') { |
| 812 | - $bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-' . $isoCode . '.js'; |
|
| 813 | - $bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-' . $isoCode . '.min.js'; |
|
| 812 | + $bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-'.$isoCode.'.js'; |
|
| 813 | + $bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-'.$isoCode.'.min.js'; |
|
| 814 | 814 | } |
| 815 | 815 | |
| 816 | 816 | foreach ($bowerJsFiles as $file) { |
@@ -959,14 +959,14 @@ discard block |
||
| 959 | 959 | $this->assign('section_name', 'section-'.$this_section); |
| 960 | 960 | |
| 961 | 961 | //Defaul root chamilo favicon |
| 962 | - $favico = '<link rel="shortcut icon" href="' . api_get_path(WEB_PATH) . 'favicon.ico" type="image/x-icon" />'; |
|
| 962 | + $favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_PATH).'favicon.ico" type="image/x-icon" />'; |
|
| 963 | 963 | |
| 964 | 964 | //Added to verify if in the current Chamilo Theme exist a favicon |
| 965 | - $favicoThemeUrl = api_get_path(SYS_CSS_PATH) . 'themes/' . $this->theme . '/images/'; |
|
| 965 | + $favicoThemeUrl = api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/images/'; |
|
| 966 | 966 | |
| 967 | 967 | //If exist pick the current chamilo theme favicon |
| 968 | - if (is_file($favicoThemeUrl . 'favicon.ico')) { |
|
| 969 | - $favico = '<link rel="shortcut icon" href="' . api_get_path(WEB_CSS_PATH). 'themes/' . $this->theme . '/images/favicon.ico" type="image/x-icon" />'; |
|
| 968 | + if (is_file($favicoThemeUrl.'favicon.ico')) { |
|
| 969 | + $favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/images/favicon.ico" type="image/x-icon" />'; |
|
| 970 | 970 | } |
| 971 | 971 | |
| 972 | 972 | if (api_is_multiple_url_enabled()) { |
@@ -996,7 +996,7 @@ discard block |
||
| 996 | 996 | if (api_get_setting('show_link_bug_notification') == 'true' && $this->user_is_logged_in) { |
| 997 | 997 | $rightFloatMenu = '<div class="report"> |
| 998 | 998 | <a href="https://github.com/chamilo/chamilo-lms/wiki/How-to-report-issues" target="_blank"> |
| 999 | - '. $iconBug . ' |
|
| 999 | + '. $iconBug.' |
|
| 1000 | 1000 | </a> |
| 1001 | 1001 | </div>'; |
| 1002 | 1002 | } |
@@ -1012,7 +1012,7 @@ discard block |
||
| 1012 | 1012 | $url = api_get_path(WEB_CODE_PATH).'ticket/tickets.php?project_id=1&'.$courseParams; |
| 1013 | 1013 | $rightFloatMenu .= '<div class="report"> |
| 1014 | 1014 | <a href="'.$url.'" target="_blank"> |
| 1015 | - '. $iconTicket . ' |
|
| 1015 | + '. $iconTicket.' |
|
| 1016 | 1016 | </a> |
| 1017 | 1017 | </div>'; |
| 1018 | 1018 | } |
@@ -1119,7 +1119,7 @@ discard block |
||
| 1119 | 1119 | |
| 1120 | 1120 | // Block Breadcrumb |
| 1121 | 1121 | //$breadcrumb = return_breadcrumb($interbreadcrumb, $language_file, $nameTools); |
| 1122 | - $breadcrumb = ''; |
|
| 1122 | + $breadcrumb = ''; |
|
| 1123 | 1123 | $this->assign('breadcrumb', $breadcrumb); |
| 1124 | 1124 | |
| 1125 | 1125 | //Extra content |
@@ -1139,13 +1139,13 @@ discard block |
||
| 1139 | 1139 | $socialMeta = ''; |
| 1140 | 1140 | $metaTitle = api_get_setting('meta_title'); |
| 1141 | 1141 | if (!empty($metaTitle)) { |
| 1142 | - $socialMeta .= '<meta name="twitter:card" content="summary" />' . "\n"; |
|
| 1142 | + $socialMeta .= '<meta name="twitter:card" content="summary" />'."\n"; |
|
| 1143 | 1143 | $metaSite = api_get_setting('meta_twitter_site'); |
| 1144 | 1144 | if (!empty($metaSite)) { |
| 1145 | - $socialMeta .= '<meta name="twitter:site" content="' . $metaSite . '" />' . "\n"; |
|
| 1145 | + $socialMeta .= '<meta name="twitter:site" content="'.$metaSite.'" />'."\n"; |
|
| 1146 | 1146 | $metaCreator = api_get_setting('meta_twitter_creator'); |
| 1147 | 1147 | if (!empty($metaCreator)) { |
| 1148 | - $socialMeta .= '<meta name="twitter:creator" content="' . $metaCreator . '" />' . "\n"; |
|
| 1148 | + $socialMeta .= '<meta name="twitter:creator" content="'.$metaCreator.'" />'."\n"; |
|
| 1149 | 1149 | } |
| 1150 | 1150 | } |
| 1151 | 1151 | |
@@ -1157,19 +1157,19 @@ discard block |
||
| 1157 | 1157 | if (!$userId && !$skillId) { |
| 1158 | 1158 | // no combination of user and skill ID has been defined, |
| 1159 | 1159 | // so print the normal OpenGraph meta tags |
| 1160 | - $socialMeta .= '<meta property="og:title" content="' . $metaTitle . '" />' . "\n"; |
|
| 1161 | - $socialMeta .= '<meta property="og:url" content="' . api_get_path(WEB_PATH) . '" />' . "\n"; |
|
| 1160 | + $socialMeta .= '<meta property="og:title" content="'.$metaTitle.'" />'."\n"; |
|
| 1161 | + $socialMeta .= '<meta property="og:url" content="'.api_get_path(WEB_PATH).'" />'."\n"; |
|
| 1162 | 1162 | |
| 1163 | 1163 | $metaDescription = api_get_setting('meta_description'); |
| 1164 | 1164 | if (!empty($metaDescription)) { |
| 1165 | - $socialMeta .= '<meta property="og:description" content="' . $metaDescription . '" />' . "\n"; |
|
| 1165 | + $socialMeta .= '<meta property="og:description" content="'.$metaDescription.'" />'."\n"; |
|
| 1166 | 1166 | } |
| 1167 | 1167 | |
| 1168 | 1168 | $metaImage = api_get_setting('meta_image_path'); |
| 1169 | 1169 | if (!empty($metaImage)) { |
| 1170 | - if (is_file(api_get_path(SYS_PATH) . $metaImage)) { |
|
| 1171 | - $path = api_get_path(WEB_PATH) . $metaImage; |
|
| 1172 | - $socialMeta .= '<meta property="og:image" content="' . $path . '" />' . "\n"; |
|
| 1170 | + if (is_file(api_get_path(SYS_PATH).$metaImage)) { |
|
| 1171 | + $path = api_get_path(WEB_PATH).$metaImage; |
|
| 1172 | + $socialMeta .= '<meta property="og:image" content="'.$path.'" />'."\n"; |
|
| 1173 | 1173 | } |
| 1174 | 1174 | } |
| 1175 | 1175 | } |
@@ -1484,7 +1484,7 @@ discard block |
||
| 1484 | 1484 | 'sessionVar' => basename(__FILE__, '.php'), |
| 1485 | 1485 | 'imageOptions' => array( |
| 1486 | 1486 | 'font_size' => 20, |
| 1487 | - 'font_path' => api_get_path(SYS_FONTS_PATH) . 'opensans/', |
|
| 1487 | + 'font_path' => api_get_path(SYS_FONTS_PATH).'opensans/', |
|
| 1488 | 1488 | 'font_file' => 'OpenSans-Regular.ttf', |
| 1489 | 1489 | //'output' => 'gif' |
| 1490 | 1490 | ) |