@@ -13,7 +13,8 @@ |
||
| 13 | 13 | * @param string $current_username |
| 14 | 14 | * @return boolean True if username is available |
| 15 | 15 | */ |
| 16 | - function validate($username, $current_username = null) { |
|
| 16 | + function validate($username, $current_username = null) |
|
| 17 | + { |
|
| 17 | 18 | $user_table = Database::get_main_table(TABLE_MAIN_USER); |
| 18 | 19 | $username = Database::escape_string($username); |
| 19 | 20 | $current_username = Database::escape_string($current_username); |
@@ -61,134 +61,134 @@ |
||
| 61 | 61 | |
| 62 | 62 | if (isset($bundles['AsseticBundle']) && 0) { |
| 63 | 63 | $container->prependExtensionConfig( |
| 64 | - 'assetic', |
|
| 65 | - array( |
|
| 66 | - 'bundles' => array( |
|
| 64 | + 'assetic', |
|
| 65 | + array( |
|
| 66 | + 'bundles' => array( |
|
| 67 | 67 | 'ChamiloThemeBundle' |
| 68 | 68 | ), |
| 69 | - 'assets' => array( |
|
| 70 | - 'common_js' => array( |
|
| 71 | - 'inputs' => array( |
|
| 72 | - $jsAssets.'public/vendor/jquery/dist/jquery.js', |
|
| 73 | - $jsAssets.'public/vendor/jquery-ui/jquery-ui.js', |
|
| 74 | - $jsAssets.'public/vendor/underscore/underscore.js', |
|
| 75 | - $jsAssets.'public/vendor/backbone/backbone.js', |
|
| 76 | - $jsAssets.'public/vendor/marionette/lib/backbone.marionette.js', |
|
| 77 | - $jsAssets.'public/vendor/bootstrap/dist/js/bootstrap.min.js', |
|
| 78 | - $jsAssets.'public/vendor/bootbox/bootbox.js', |
|
| 79 | - $jsAssets.'public/js/dialogs.js', |
|
| 80 | - $jsAssets.'public/js/namespace.js', |
|
| 81 | - ), |
|
| 82 | - ), |
|
| 83 | - 'tools_js' => array( |
|
| 84 | - 'inputs' => array( |
|
| 85 | - '@common_js', |
|
| 86 | - $jsAssets.'public/vendor/momentjs/moment.js', |
|
| 87 | - $jsAssets.'public/vendor/holderjs/holder.js', |
|
| 88 | - $jsAssets.'public/vendor/spinjs/spin.js', |
|
| 89 | - ), |
|
| 90 | - ), |
|
| 91 | - 'admin_lte_js' => array( |
|
| 92 | - 'inputs' => array( |
|
| 93 | - $lteJs.'plugins/bootstrap-slider/bootstrap-slider.js', |
|
| 94 | - $lteJs.'plugins/datatables/jquery.dataTables.js', |
|
| 95 | - $lteJs.'plugins/datatables/dataTables.bootstrap.js', |
|
| 96 | - $lteJs.'plugins/slimScroll/jquery.slimscroll.js', |
|
| 97 | - $jsAssets.'public/js/adminLTE.js', |
|
| 98 | - ) |
|
| 99 | - ), |
|
| 100 | - 'admin_lte_css' => array( |
|
| 101 | - 'inputs' => array( |
|
| 69 | + 'assets' => array( |
|
| 70 | + 'common_js' => array( |
|
| 71 | + 'inputs' => array( |
|
| 72 | + $jsAssets.'public/vendor/jquery/dist/jquery.js', |
|
| 73 | + $jsAssets.'public/vendor/jquery-ui/jquery-ui.js', |
|
| 74 | + $jsAssets.'public/vendor/underscore/underscore.js', |
|
| 75 | + $jsAssets.'public/vendor/backbone/backbone.js', |
|
| 76 | + $jsAssets.'public/vendor/marionette/lib/backbone.marionette.js', |
|
| 77 | + $jsAssets.'public/vendor/bootstrap/dist/js/bootstrap.min.js', |
|
| 78 | + $jsAssets.'public/vendor/bootbox/bootbox.js', |
|
| 79 | + $jsAssets.'public/js/dialogs.js', |
|
| 80 | + $jsAssets.'public/js/namespace.js', |
|
| 81 | + ), |
|
| 82 | + ), |
|
| 83 | + 'tools_js' => array( |
|
| 84 | + 'inputs' => array( |
|
| 85 | + '@common_js', |
|
| 86 | + $jsAssets.'public/vendor/momentjs/moment.js', |
|
| 87 | + $jsAssets.'public/vendor/holderjs/holder.js', |
|
| 88 | + $jsAssets.'public/vendor/spinjs/spin.js', |
|
| 89 | + ), |
|
| 90 | + ), |
|
| 91 | + 'admin_lte_js' => array( |
|
| 92 | + 'inputs' => array( |
|
| 93 | + $lteJs.'plugins/bootstrap-slider/bootstrap-slider.js', |
|
| 94 | + $lteJs.'plugins/datatables/jquery.dataTables.js', |
|
| 95 | + $lteJs.'plugins/datatables/dataTables.bootstrap.js', |
|
| 96 | + $lteJs.'plugins/slimScroll/jquery.slimscroll.js', |
|
| 97 | + $jsAssets.'public/js/adminLTE.js', |
|
| 98 | + ) |
|
| 99 | + ), |
|
| 100 | + 'admin_lte_css' => array( |
|
| 101 | + 'inputs' => array( |
|
| 102 | 102 | |
| 103 | 103 | // $lteCss . 'jQueryUI/jquery-ui-1.10.3.custom.css', |
| 104 | - $cssAssets.'vendor/bootstrap/dist/css/bootstrap.min.css', |
|
| 105 | - $lteCss.'bootstrap-slider/slider.css', |
|
| 106 | - $lteCss.'datatables/dataTables.bootstrap.css', |
|
| 107 | - $cssAssets.'vendor/fontawesome/css/font-awesome.min.css', |
|
| 108 | - $cssAssets.'vendor/ionicons/css/ionicons.min.css', |
|
| 109 | - $lteCss.'AdminLTE.css', |
|
| 110 | - //$lteFont . 'fontawesome-webfont.eot', |
|
| 111 | - // $lteFont . 'ionicons.eot', |
|
| 112 | - ) |
|
| 113 | - ), |
|
| 114 | - 'admin_lte_forms_js' => array( |
|
| 115 | - 'inputs' => array( |
|
| 116 | - $lteJs.'plugins/colorpicker/bootstrap-colorpicker.js', |
|
| 117 | - $lteJs.'plugins/daterangepicker/daterangepicker.js', |
|
| 118 | - $lteJs.'plugins/timepicker/bootstrap-timepicker.js', |
|
| 119 | - $lteJs.'plugins/input-mask/jquery.inputmask.js', |
|
| 120 | - // $lteJs.'plugins/input-mask/*', |
|
| 121 | - ) |
|
| 122 | - ), |
|
| 123 | - 'admin_lte_forms_css' => array( |
|
| 124 | - 'inputs' => array( |
|
| 125 | - $lteCss.'colorpicker/bootstrap-colorpicker.css', |
|
| 126 | - $lteCss.'daterangepicker/daterangepicker-bs3.css', |
|
| 127 | - $lteCss.'timepicker/bootstrap-timepicker.css', |
|
| 128 | - ) |
|
| 129 | - ), |
|
| 130 | - 'admin_lte_wysiwyg' => array( |
|
| 131 | - 'inputs' => array( |
|
| 132 | - $lteJs.'plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.js', |
|
| 133 | - ) |
|
| 134 | - ), |
|
| 135 | - 'admin_lte_wysiwyg_css' => array( |
|
| 136 | - 'inputs' => array( |
|
| 137 | - $lteCss.'bootstrap-wysihtml5/bootstrap3-wysihtml5.css', |
|
| 138 | - ) |
|
| 139 | - ), |
|
| 140 | - 'admin_lte_morris' => array( |
|
| 141 | - 'inputs' => array( |
|
| 142 | - $lteJs.'plugins/morris/morris.js', |
|
| 143 | - ) |
|
| 144 | - ), |
|
| 145 | - 'admin_lte_morris_css' => array( |
|
| 146 | - 'inputs' => array( |
|
| 147 | - $lteCss.'morris/morris.css', |
|
| 148 | - ) |
|
| 149 | - ), |
|
| 150 | - 'admin_lte_flot' => array( |
|
| 151 | - 'inputs' => array( |
|
| 152 | - $lteJs.'plugins/flot/*', |
|
| 153 | - ) |
|
| 154 | - ), |
|
| 155 | - 'admin_lte_calendar' => array( |
|
| 156 | - 'inputs' => array( |
|
| 157 | - $jsAssets.'public/vendor/fullcalendar/dist/fullcalendar.min.js', |
|
| 158 | - ) |
|
| 159 | - ), |
|
| 160 | - 'admin_lte_calendar_css' => array( |
|
| 161 | - 'inputs' => array( |
|
| 162 | - $lteCss.'fullcalendar/fullcalendar.css', |
|
| 163 | - ) |
|
| 164 | - ), |
|
| 165 | - 'avatar_img' => array( |
|
| 166 | - 'inputs' => array( |
|
| 167 | - '@ChamiloThemeBundle/Resources/public/img/avatar.png' |
|
| 168 | - ) |
|
| 169 | - ), |
|
| 170 | - 'admin_lte_all' => array( |
|
| 171 | - 'inputs' => array( |
|
| 172 | - '@tools_js', |
|
| 173 | - '@admin_lte_forms_js', |
|
| 174 | - '@admin_lte_wysiwyg', |
|
| 175 | - '@admin_lte_morris', |
|
| 176 | - '@admin_lte_calendar', |
|
| 177 | - '@admin_lte_js', |
|
| 178 | - // '@admin_lte_flot', |
|
| 179 | - ) |
|
| 180 | - ), |
|
| 181 | - 'admin_lte_all_css' => array( |
|
| 182 | - 'inputs' => array( |
|
| 183 | - '@admin_lte_calendar_css', |
|
| 184 | - '@admin_lte_morris_css', |
|
| 185 | - '@admin_lte_wysiwyg_css', |
|
| 186 | - '@admin_lte_forms_css', |
|
| 187 | - '@admin_lte_css' |
|
| 188 | - ) |
|
| 189 | - ), |
|
| 190 | - ) |
|
| 191 | - ) |
|
| 104 | + $cssAssets.'vendor/bootstrap/dist/css/bootstrap.min.css', |
|
| 105 | + $lteCss.'bootstrap-slider/slider.css', |
|
| 106 | + $lteCss.'datatables/dataTables.bootstrap.css', |
|
| 107 | + $cssAssets.'vendor/fontawesome/css/font-awesome.min.css', |
|
| 108 | + $cssAssets.'vendor/ionicons/css/ionicons.min.css', |
|
| 109 | + $lteCss.'AdminLTE.css', |
|
| 110 | + //$lteFont . 'fontawesome-webfont.eot', |
|
| 111 | + // $lteFont . 'ionicons.eot', |
|
| 112 | + ) |
|
| 113 | + ), |
|
| 114 | + 'admin_lte_forms_js' => array( |
|
| 115 | + 'inputs' => array( |
|
| 116 | + $lteJs.'plugins/colorpicker/bootstrap-colorpicker.js', |
|
| 117 | + $lteJs.'plugins/daterangepicker/daterangepicker.js', |
|
| 118 | + $lteJs.'plugins/timepicker/bootstrap-timepicker.js', |
|
| 119 | + $lteJs.'plugins/input-mask/jquery.inputmask.js', |
|
| 120 | + // $lteJs.'plugins/input-mask/*', |
|
| 121 | + ) |
|
| 122 | + ), |
|
| 123 | + 'admin_lte_forms_css' => array( |
|
| 124 | + 'inputs' => array( |
|
| 125 | + $lteCss.'colorpicker/bootstrap-colorpicker.css', |
|
| 126 | + $lteCss.'daterangepicker/daterangepicker-bs3.css', |
|
| 127 | + $lteCss.'timepicker/bootstrap-timepicker.css', |
|
| 128 | + ) |
|
| 129 | + ), |
|
| 130 | + 'admin_lte_wysiwyg' => array( |
|
| 131 | + 'inputs' => array( |
|
| 132 | + $lteJs.'plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.js', |
|
| 133 | + ) |
|
| 134 | + ), |
|
| 135 | + 'admin_lte_wysiwyg_css' => array( |
|
| 136 | + 'inputs' => array( |
|
| 137 | + $lteCss.'bootstrap-wysihtml5/bootstrap3-wysihtml5.css', |
|
| 138 | + ) |
|
| 139 | + ), |
|
| 140 | + 'admin_lte_morris' => array( |
|
| 141 | + 'inputs' => array( |
|
| 142 | + $lteJs.'plugins/morris/morris.js', |
|
| 143 | + ) |
|
| 144 | + ), |
|
| 145 | + 'admin_lte_morris_css' => array( |
|
| 146 | + 'inputs' => array( |
|
| 147 | + $lteCss.'morris/morris.css', |
|
| 148 | + ) |
|
| 149 | + ), |
|
| 150 | + 'admin_lte_flot' => array( |
|
| 151 | + 'inputs' => array( |
|
| 152 | + $lteJs.'plugins/flot/*', |
|
| 153 | + ) |
|
| 154 | + ), |
|
| 155 | + 'admin_lte_calendar' => array( |
|
| 156 | + 'inputs' => array( |
|
| 157 | + $jsAssets.'public/vendor/fullcalendar/dist/fullcalendar.min.js', |
|
| 158 | + ) |
|
| 159 | + ), |
|
| 160 | + 'admin_lte_calendar_css' => array( |
|
| 161 | + 'inputs' => array( |
|
| 162 | + $lteCss.'fullcalendar/fullcalendar.css', |
|
| 163 | + ) |
|
| 164 | + ), |
|
| 165 | + 'avatar_img' => array( |
|
| 166 | + 'inputs' => array( |
|
| 167 | + '@ChamiloThemeBundle/Resources/public/img/avatar.png' |
|
| 168 | + ) |
|
| 169 | + ), |
|
| 170 | + 'admin_lte_all' => array( |
|
| 171 | + 'inputs' => array( |
|
| 172 | + '@tools_js', |
|
| 173 | + '@admin_lte_forms_js', |
|
| 174 | + '@admin_lte_wysiwyg', |
|
| 175 | + '@admin_lte_morris', |
|
| 176 | + '@admin_lte_calendar', |
|
| 177 | + '@admin_lte_js', |
|
| 178 | + // '@admin_lte_flot', |
|
| 179 | + ) |
|
| 180 | + ), |
|
| 181 | + 'admin_lte_all_css' => array( |
|
| 182 | + 'inputs' => array( |
|
| 183 | + '@admin_lte_calendar_css', |
|
| 184 | + '@admin_lte_morris_css', |
|
| 185 | + '@admin_lte_wysiwyg_css', |
|
| 186 | + '@admin_lte_forms_css', |
|
| 187 | + '@admin_lte_css' |
|
| 188 | + ) |
|
| 189 | + ), |
|
| 190 | + ) |
|
| 191 | + ) |
|
| 192 | 192 | ); |
| 193 | 193 | |
| 194 | 194 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | require_once api_get_path(SYS_PATH).'main/auth/external_login/functions.inc.php'; |
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | - * @return true if cas is configured |
|
| 13 | + * @return boolean if cas is configured |
|
| 14 | 14 | * |
| 15 | 15 | **/ |
| 16 | 16 | function cas_configured() |
@@ -37,6 +37,8 @@ discard block |
||
| 37 | 37 | * |
| 38 | 38 | * @param int Error code |
| 39 | 39 | * @param string Error message |
| 40 | + * @param integer $code |
|
| 41 | + * @param string $message |
|
| 40 | 42 | */ |
| 41 | 43 | public function __construct($code, $message) |
| 42 | 44 | { |
@@ -48,6 +50,7 @@ discard block |
||
| 48 | 50 | * Sets the error handler |
| 49 | 51 | * |
| 50 | 52 | * @param WSErrorHandler Error handler |
| 53 | + * @param WSSoapErrorHandler $handler |
|
| 51 | 54 | */ |
| 52 | 55 | public static function setErrorHandler($handler) |
| 53 | 56 | { |
@@ -86,6 +89,7 @@ discard block |
||
| 86 | 89 | * Handle method |
| 87 | 90 | * |
| 88 | 91 | * @param WSError Error |
| 92 | + * @return void |
|
| 89 | 93 | */ |
| 90 | 94 | public function handle($error); |
| 91 | 95 | } |
@@ -114,7 +118,7 @@ discard block |
||
| 114 | 118 | * Verifies the API key |
| 115 | 119 | * |
| 116 | 120 | * @param string Secret key |
| 117 | - * @return mixed WSError in case of failure, null in case of success |
|
| 121 | + * @return WSError|null WSError in case of failure, null in case of success |
|
| 118 | 122 | */ |
| 119 | 123 | protected function verifyKey($secret_key) |
| 120 | 124 | { |
@@ -501,6 +501,7 @@ |
||
| 501 | 501 | * @param string User id value |
| 502 | 502 | * @param int Set to 1 to subscribe, 0 to unsubscribe |
| 503 | 503 | * @param int Status (STUDENT or TEACHER) Used for subscription only |
| 504 | + * @param integer $state |
|
| 504 | 505 | * @return mixed True if subscription or unsubscription was successful, false otherwise |
| 505 | 506 | */ |
| 506 | 507 | protected function changeUserSubscription( |
@@ -642,6 +642,7 @@ |
||
| 642 | 642 | * @param string Session id field name |
| 643 | 643 | * @param string Session id value |
| 644 | 644 | * @param int State (1 to subscribe, 0 to unsubscribe) |
| 645 | + * @param integer $state |
|
| 645 | 646 | * @return mixed True on success, WSError otherwise |
| 646 | 647 | */ |
| 647 | 648 | protected function changeCourseSubscription( |
@@ -42,6 +42,7 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @param array Users |
| 44 | 44 | * @param int Set to 1 to enable and to 0 to disable |
| 45 | + * @param integer $state |
|
| 45 | 46 | * @return array Array of results |
| 46 | 47 | */ |
| 47 | 48 | protected function changeUsersActiveState($users, $state) |
@@ -257,6 +258,11 @@ discard block |
||
| 257 | 258 | * @param string Phone. |
| 258 | 259 | * @param string Expiration date |
| 259 | 260 | * @param array Extra fields. An array with elements of the form ('field_name' => 'name_of_the_field', 'field_value' => 'value_of_the_field'). |
| 261 | + * @param integer|null $visibility |
|
| 262 | + * @param string|null $email |
|
| 263 | + * @param string|null $language |
|
| 264 | + * @param string|null $phone |
|
| 265 | + * @param string|null $expiration_date |
|
| 260 | 266 | * @return mixed New user id generated by the system, WSError otherwise |
| 261 | 267 | */ |
| 262 | 268 | protected function createUserHelper( |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | if (isset($_POST['Submit']) && $_POST['Submit']) { |
| 195 | 195 | // changing the name |
| 196 | - $sql_update = "UPDATE $tbl_admin_languages SET original_name='{$_POST['txt_name']}' |
|
| 196 | + $sql_update = "update $tbl_admin_languages SET original_name='{$_POST['txt_name']}' |
|
| 197 | 197 | WHERE id='{$_POST['edit_id']}'"; |
| 198 | 198 | $result = Database::query($sql_update); |
| 199 | 199 | // changing the Platform language |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | foreach ($_POST['id'] as $index => $id) { |
| 211 | 211 | $ids[] = intval($id); |
| 212 | 212 | } |
| 213 | - $sql = "UPDATE $tbl_admin_languages SET available='1' WHERE id IN ('".implode("','", $ids)."')"; |
|
| 213 | + $sql = "update $tbl_admin_languages SET available='1' WHERE id IN ('".implode("','", $ids)."')"; |
|
| 214 | 214 | Database::query($sql); |
| 215 | 215 | } |
| 216 | 216 | break; |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | foreach ($_POST['id'] as $index => $id) { |
| 221 | 221 | $ids[] = intval($id); |
| 222 | 222 | } |
| 223 | - $sql = "UPDATE $tbl_admin_languages SET available='0' WHERE id IN ('".implode("','", $ids)."')"; |
|
| 223 | + $sql = "update $tbl_admin_languages SET available='0' WHERE id IN ('".implode("','", $ids)."')"; |
|
| 224 | 224 | Database::query($sql); |
| 225 | 225 | } |
| 226 | 226 | break; |
@@ -249,12 +249,12 @@ |
||
| 249 | 249 | if ($imagetype == "gif") { |
| 250 | 250 | $transindex = imagecolortransparent($source_img); |
| 251 | 251 | $palletsize = imagecolorstotal($source_img); |
| 252 | - //GIF89a for transparent and anim (first clip), either GIF87a |
|
| 252 | + //GIF89a for transparent and anim (first clip), either GIF87a |
|
| 253 | 253 | if ($transindex >= 0 && $transindex < $palletsize) { |
| 254 | - $transcol = imagecolorsforindex($source_img, $transindex); |
|
| 255 | - $transindex = imagecolorallocatealpha($crop, $transcol['red'], $transcol['green'], $transcol['blue'], 127); |
|
| 256 | - imagefill($crop, 0, 0, $transindex); |
|
| 257 | - imagecolortransparent($crop, $transindex); |
|
| 254 | + $transcol = imagecolorsforindex($source_img, $transindex); |
|
| 255 | + $transindex = imagecolorallocatealpha($crop, $transcol['red'], $transcol['green'], $transcol['blue'], 127); |
|
| 256 | + imagefill($crop, 0, 0, $transindex); |
|
| 257 | + imagecolortransparent($crop, $transindex); |
|
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | |