| 1 | <?php |
|---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
|---|
| 3 | # |
|---|
| 4 | # This file is part of Dotclear 2. |
|---|
| 5 | # |
|---|
| 6 | # Copyright (c) 2003-2014 Olivier Meunier & Association Dotclear |
|---|
| 7 | # Licensed under the GPL version 2.0 license. |
|---|
| 8 | # See LICENSE file or |
|---|
| 9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
|---|
| 10 | # |
|---|
| 11 | # -- END LICENSE BLOCK ----------------------------------------- |
|---|
| 12 | |
|---|
| 13 | require dirname(__FILE__).'/../inc/admin/prepend.php'; |
|---|
| 14 | |
|---|
| 15 | dcPage::check('usage,contentadmin'); |
|---|
| 16 | |
|---|
| 17 | $page_title = __('My preferences'); |
|---|
| 18 | |
|---|
| 19 | $user_name = $core->auth->getInfo('user_name'); |
|---|
| 20 | $user_firstname = $core->auth->getInfo('user_firstname'); |
|---|
| 21 | $user_displayname = $core->auth->getInfo('user_displayname'); |
|---|
| 22 | $user_email = $core->auth->getInfo('user_email'); |
|---|
| 23 | $user_url = $core->auth->getInfo('user_url'); |
|---|
| 24 | $user_lang = $core->auth->getInfo('user_lang'); |
|---|
| 25 | $user_tz = $core->auth->getInfo('user_tz'); |
|---|
| 26 | $user_post_status = $core->auth->getInfo('user_post_status'); |
|---|
| 27 | |
|---|
| 28 | $user_options = $core->auth->getOptions(); |
|---|
| 29 | if (empty($user_options['editor']) || !is_array($user_options['editor'])) { |
|---|
| 30 | $user_options['editor'] = array(); |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | $core->auth->user_prefs->addWorkspace('dashboard'); |
|---|
| 34 | $user_dm_doclinks = $core->auth->user_prefs->dashboard->doclinks; |
|---|
| 35 | $user_dm_dcnews = $core->auth->user_prefs->dashboard->dcnews; |
|---|
| 36 | $user_dm_quickentry = $core->auth->user_prefs->dashboard->quickentry; |
|---|
| 37 | $user_dm_nofavicons = $core->auth->user_prefs->dashboard->nofavicons; |
|---|
| 38 | |
|---|
| 39 | $core->auth->user_prefs->addWorkspace('accessibility'); |
|---|
| 40 | $user_acc_nodragdrop = $core->auth->user_prefs->accessibility->nodragdrop; |
|---|
| 41 | |
|---|
| 42 | $core->auth->user_prefs->addWorkspace('interface'); |
|---|
| 43 | $user_ui_enhanceduploader = $core->auth->user_prefs->interface->enhanceduploader; |
|---|
| 44 | $user_ui_hidemoreinfo = $core->auth->user_prefs->interface->hidemoreinfo; |
|---|
| 45 | $user_ui_htmlfontsize = $core->auth->user_prefs->interface->htmlfontsize; |
|---|
| 46 | if ($core->auth->isSuperAdmin()) { |
|---|
| 47 | $user_ui_hide_std_favicon = $core->auth->user_prefs->interface->hide_std_favicon; |
|---|
| 48 | } |
|---|
| 49 | $user_ui_iconset = @$core->auth->user_prefs->interface->iconset; |
|---|
| 50 | $user_ui_nofavmenu = $core->auth->user_prefs->interface->nofavmenu; |
|---|
| 51 | $user_ui_media_by_page = ($core->auth->user_prefs->interface->media_by_page ?: 30); |
|---|
| 52 | $user_ui_media_nb_last_dirs = $core->auth->user_prefs->interface->media_nb_last_dirs; |
|---|
| 53 | |
|---|
| 54 | $default_tab = !empty($_GET['tab']) ? html::escapeHTML($_GET['tab']) : 'user-profile'; |
|---|
| 55 | |
|---|
| 56 | if (!empty($_GET['append']) || !empty($_GET['removed']) || !empty($_GET['neworder']) || |
|---|
| 57 | !empty($_GET['replaced']) || !empty($_POST['appendaction']) || !empty($_POST['removeaction']) || |
|---|
| 58 | !empty($_GET['db-updated'])) { |
|---|
| 59 | $default_tab = 'user-favorites'; |
|---|
| 60 | } elseif (!empty($_GET['updated'])) { |
|---|
| 61 | $default_tab = 'user-options'; |
|---|
| 62 | } |
|---|
| 63 | if (($default_tab != 'user-profile') && ($default_tab != 'user-options') && ($default_tab != 'user-favorites')) { |
|---|
| 64 | $default_tab = 'user-profile'; |
|---|
| 65 | } |
|---|
| 66 | |
|---|
| 67 | # Editors combo |
|---|
| 68 | $editors_combo = dcAdminCombos::getEditorsCombo(); |
|---|
| 69 | $editors = array_keys($editors_combo); |
|---|
| 70 | |
|---|
| 71 | # Format by editors |
|---|
| 72 | $formaters = $core->getFormaters(); |
|---|
| 73 | $format_by_editors = array(); |
|---|
| 74 | foreach ($formaters as $editor => $formats) { |
|---|
| 75 | foreach ($formats as $format) { |
|---|
| 76 | $format_by_editors[$format][$editor] = $editor; |
|---|
| 77 | } |
|---|
| 78 | } |
|---|
| 79 | $available_formats = array('' => ''); |
|---|
| 80 | foreach (array_keys($format_by_editors) as $format) { |
|---|
| 81 | $available_formats[$format] = $format; |
|---|
| 82 | if (!isset($user_options['editor'][$format])) { |
|---|
| 83 | $user_options['editor'][$format] = ''; |
|---|
| 84 | } |
|---|
| 85 | } |
|---|
| 86 | $status_combo = dcAdminCombos::getPostStatusescombo(); |
|---|
| 87 | |
|---|
| 88 | $iconsets_combo = array(__('Default') => ''); |
|---|
| 89 | $iconsets_root = dirname(__FILE__).'/images/iconset/'; |
|---|
| 90 | if (is_dir($iconsets_root) && is_readable($iconsets_root)) { |
|---|
| 91 | if (($d = @dir($iconsets_root)) !== false) { |
|---|
| 92 | while (($entry = $d->read()) !== false) { |
|---|
| 93 | if ($entry != '.' && $entry != '..' && substr($entry, 0, 1) != '.' && is_dir($iconsets_root.'/'.$entry)) { |
|---|
| 94 | $iconsets_combo[$entry] = $entry; |
|---|
| 95 | } |
|---|
| 96 | } |
|---|
| 97 | } |
|---|
| 98 | } |
|---|
| 99 | |
|---|
| 100 | # Base font size (50% = 8px, 62.5% = 10px, 75% = 12px) |
|---|
| 101 | $htmlfontsize_combo = array( |
|---|
| 102 | __('Smaller') => '50%', |
|---|
| 103 | __('Default') => '62.5%', |
|---|
| 104 | __('Larger') => '75%' |
|---|
| 105 | ); |
|---|
| 106 | |
|---|
| 107 | # Language codes |
|---|
| 108 | $lang_combo = dcAdminCombos::getAdminLangsCombo(); |
|---|
| 109 | |
|---|
| 110 | # Get 3rd parts xhtml editor flags |
|---|
| 111 | $rte = array( |
|---|
| 112 | 'blog_descr' => array(true,__('Blog description (in blog parameters)')), |
|---|
| 113 | 'cat_descr' => array(true,__('Category description')) |
|---|
| 114 | ); |
|---|
| 115 | $rte = new ArrayObject($rte); |
|---|
| 116 | $core->callBehavior('adminRteFlags',$core,$rte); |
|---|
| 117 | # Load user settings |
|---|
| 118 | $rte_flags = @$core->auth->user_prefs->interface->rte_flags; |
|---|
| 119 | if (is_array($rte_flags)) { |
|---|
| 120 | foreach ($rte_flags as $fk => $fv) { |
|---|
| 121 | if (isset($rte[$fk])) { |
|---|
| 122 | $rte[$fk][0] = $fv; |
|---|
| 123 | } |
|---|
| 124 | } |
|---|
| 125 | } |
|---|
| 126 | |
|---|
| 127 | # Get default colums (admin lists) |
|---|
| 128 | $cols = array( |
|---|
| 129 | 'posts' => array(__('Posts'), array( |
|---|
| 130 | 'date' => array(true,__('Date')), |
|---|
| 131 | 'category' => array(true,__('Category')), |
|---|
| 132 | 'author' => array(true,__('Author')), |
|---|
| 133 | 'comments' => array(true,__('Comments')), |
|---|
| 134 | 'trackbacks' => array(true,__('Trackbacks')) |
|---|
| 135 | )) |
|---|
| 136 | ); |
|---|
| 137 | $cols = new arrayObject($cols); |
|---|
| 138 | $core->callBehavior('adminColumnsLists',$core,$cols); |
|---|
| 139 | # Load user settings |
|---|
| 140 | $cols_user = @$core->auth->user_prefs->interface->cols; |
|---|
| 141 | if (is_array($cols_user)) { |
|---|
| 142 | foreach ($cols_user as $ct => $cv) { |
|---|
| 143 | foreach ($cv as $cn => $cd) { |
|---|
| 144 | if (isset($cols[$ct][1][$cn])) { |
|---|
| 145 | $cols[$ct][1][$cn][0] = $cd; |
|---|
| 146 | } |
|---|
| 147 | } |
|---|
| 148 | } |
|---|
| 149 | } |
|---|
| 150 | |
|---|
| 151 | # Add or update user |
|---|
| 152 | if (isset($_POST['user_name'])) |
|---|
| 153 | { |
|---|
| 154 | try |
|---|
| 155 | { |
|---|
| 156 | $pwd_check = !empty($_POST['cur_pwd']) && $core->auth->checkPassword($core->auth->crypt($_POST['cur_pwd'])); |
|---|
| 157 | |
|---|
| 158 | if ($core->auth->allowPassChange() && !$pwd_check && $user_email != $_POST['user_email']) { |
|---|
| 159 | throw new Exception(__('If you want to change your email or password you must provide your current password.')); |
|---|
| 160 | } |
|---|
| 161 | |
|---|
| 162 | $cur = $core->con->openCursor($core->prefix.'user'); |
|---|
| 163 | |
|---|
| 164 | $cur->user_name = $user_name = $_POST['user_name']; |
|---|
| 165 | $cur->user_firstname = $user_firstname = $_POST['user_firstname']; |
|---|
| 166 | $cur->user_displayname = $user_displayname = $_POST['user_displayname']; |
|---|
| 167 | $cur->user_email = $user_email = $_POST['user_email']; |
|---|
| 168 | $cur->user_url = $user_url = $_POST['user_url']; |
|---|
| 169 | $cur->user_lang = $user_lang = $_POST['user_lang']; |
|---|
| 170 | $cur->user_tz = $user_tz = $_POST['user_tz']; |
|---|
| 171 | |
|---|
| 172 | $cur->user_options = new ArrayObject($user_options); |
|---|
| 173 | |
|---|
| 174 | if ($core->auth->allowPassChange() && !empty($_POST['new_pwd'])) |
|---|
| 175 | { |
|---|
| 176 | if (!$pwd_check) { |
|---|
| 177 | throw new Exception(__('If you want to change your email or password you must provide your current password.')); |
|---|
| 178 | } |
|---|
| 179 | |
|---|
| 180 | if ($_POST['new_pwd'] != $_POST['new_pwd_c']) { |
|---|
| 181 | throw new Exception(__("Passwords don't match")); |
|---|
| 182 | } |
|---|
| 183 | |
|---|
| 184 | $cur->user_pwd = $_POST['new_pwd']; |
|---|
| 185 | } |
|---|
| 186 | |
|---|
| 187 | # --BEHAVIOR-- adminBeforeUserUpdate |
|---|
| 188 | $core->callBehavior('adminBeforeUserProfileUpdate',$cur,$core->auth->userID()); |
|---|
| 189 | |
|---|
| 190 | # Udate user |
|---|
| 191 | $core->updUser($core->auth->userID(),$cur); |
|---|
| 192 | |
|---|
| 193 | # --BEHAVIOR-- adminAfterUserUpdate |
|---|
| 194 | $core->callBehavior('adminAfterUserProfileUpdate',$cur,$core->auth->userID()); |
|---|
| 195 | |
|---|
| 196 | dcPage::addSuccessNotice(__('Personal information has been successfully updated.')); |
|---|
| 197 | |
|---|
| 198 | $core->adminurl->redirect("admin.user.preferences"); |
|---|
| 199 | } |
|---|
| 200 | catch (Exception $e) |
|---|
| 201 | { |
|---|
| 202 | $core->error->add($e->getMessage()); |
|---|
| 203 | } |
|---|
| 204 | } |
|---|
| 205 | |
|---|
| 206 | # Update user options |
|---|
| 207 | if (isset($_POST['user_editor'])) |
|---|
| 208 | { |
|---|
| 209 | try |
|---|
| 210 | { |
|---|
| 211 | $cur = $core->con->openCursor($core->prefix.'user'); |
|---|
| 212 | |
|---|
| 213 | $cur->user_name = $user_name; |
|---|
| 214 | $cur->user_firstname = $user_firstname; |
|---|
| 215 | $cur->user_displayname = $user_displayname; |
|---|
| 216 | $cur->user_email = $user_email; |
|---|
| 217 | $cur->user_url = $user_url; |
|---|
| 218 | $cur->user_lang = $user_lang; |
|---|
| 219 | $cur->user_tz = $user_tz; |
|---|
| 220 | |
|---|
| 221 | $cur->user_post_status = $user_post_status = $_POST['user_post_status']; |
|---|
| 222 | |
|---|
| 223 | $user_options['edit_size'] = (integer) $_POST['user_edit_size']; |
|---|
| 224 | if ($user_options['edit_size'] < 1) { |
|---|
| 225 | $user_options['edit_size'] = 10; |
|---|
| 226 | } |
|---|
| 227 | $user_options['post_format'] = $_POST['user_post_format']; |
|---|
| 228 | $user_options['editor'] = $_POST['user_editor']; |
|---|
| 229 | $user_options['enable_wysiwyg'] = !empty($_POST['user_wysiwyg']); |
|---|
| 230 | $user_options['toolbar_bottom'] = !empty($_POST['user_toolbar_bottom']); |
|---|
| 231 | |
|---|
| 232 | $cur->user_options = new ArrayObject($user_options); |
|---|
| 233 | |
|---|
| 234 | # --BEHAVIOR-- adminBeforeUserOptionsUpdate |
|---|
| 235 | $core->callBehavior('adminBeforeUserOptionsUpdate',$cur,$core->auth->userID()); |
|---|
| 236 | |
|---|
| 237 | # Update user prefs |
|---|
| 238 | $core->auth->user_prefs->accessibility->put('nodragdrop',!empty($_POST['user_acc_nodragdrop']),'boolean'); |
|---|
| 239 | $core->auth->user_prefs->interface->put('enhanceduploader',!empty($_POST['user_ui_enhanceduploader']),'boolean'); |
|---|
| 240 | $core->auth->user_prefs->interface->put('hidemoreinfo',!empty($_POST['user_ui_hidemoreinfo']),'boolean'); |
|---|
| 241 | $core->auth->user_prefs->interface->put('htmlfontsize',$_POST['user_ui_htmlfontsize'],'string'); |
|---|
| 242 | if ($core->auth->isSuperAdmin()) { |
|---|
| 243 | # Applied to all users |
|---|
| 244 | $core->auth->user_prefs->interface->put('hide_std_favicon',!empty($_POST['user_ui_hide_std_favicon']),'boolean',null,true,true); |
|---|
| 245 | } |
|---|
| 246 | $core->auth->user_prefs->interface->put('media_by_page',(integer)$_POST['user_ui_media_by_page'],'integer'); |
|---|
| 247 | $core->auth->user_prefs->interface->put('media_nb_last_dirs',(integer)$_POST['user_ui_media_nb_last_dirs'],'integer'); |
|---|
| 248 | $core->auth->user_prefs->interface->put('media_last_dirs',array(),'array',null,false); |
|---|
| 249 | $core->auth->user_prefs->interface->put('media_fav_dirs',array(),'array',null,false); |
|---|
| 250 | |
|---|
| 251 | # Update user columns (lists) |
|---|
| 252 | $cu = array(); |
|---|
| 253 | foreach ($cols as $col_type => $cols_list) { |
|---|
| 254 | $ct = array(); |
|---|
| 255 | foreach ($cols_list[1] as $col_name => $col_data) { |
|---|
| 256 | $ct[$col_name] = isset($_POST['cols_'.$col_type]) && in_array($col_name,$_POST['cols_'.$col_type],true) ? true : false; |
|---|
| 257 | } |
|---|
| 258 | if (count($ct)) { |
|---|
| 259 | $cu[$col_type] = $ct; |
|---|
| 260 | } |
|---|
| 261 | } |
|---|
| 262 | $core->auth->user_prefs->interface->put('cols',$cu,'array'); |
|---|
| 263 | |
|---|
| 264 | # Update user xhtml editor flags |
|---|
| 265 | $rf = array(); |
|---|
| 266 | foreach ($rte as $rk => $rv) { |
|---|
| 267 | $rf[$rk] = isset($_POST['rte_flags']) && in_array($rk,$_POST['rte_flags'],true) ? true : false; |
|---|
| 268 | } |
|---|
| 269 | $core->auth->user_prefs->interface->put('rte_flags',$rf,'array'); |
|---|
| 270 | |
|---|
| 271 | # Update user |
|---|
| 272 | $core->updUser($core->auth->userID(),$cur); |
|---|
| 273 | |
|---|
| 274 | # --BEHAVIOR-- adminAfterUserOptionsUpdate |
|---|
| 275 | $core->callBehavior('adminAfterUserOptionsUpdate',$cur,$core->auth->userID()); |
|---|
| 276 | |
|---|
| 277 | dcPage::addSuccessNotice(__('Personal options has been successfully updated.')); |
|---|
| 278 | $core->adminurl->redirect("admin.user.preferences",array(),'#user-options'); |
|---|
| 279 | } |
|---|
| 280 | catch (Exception $e) |
|---|
| 281 | { |
|---|
| 282 | $core->error->add($e->getMessage()); |
|---|
| 283 | } |
|---|
| 284 | } |
|---|
| 285 | |
|---|
| 286 | # Dashboard options |
|---|
| 287 | if (isset($_POST['db-options'])) { |
|---|
| 288 | try |
|---|
| 289 | { |
|---|
| 290 | # --BEHAVIOR-- adminBeforeUserOptionsUpdate |
|---|
| 291 | $core->callBehavior('adminBeforeDashboardOptionsUpdate',$core->auth->userID()); |
|---|
| 292 | |
|---|
| 293 | # Update user prefs |
|---|
| 294 | $core->auth->user_prefs->dashboard->put('doclinks',!empty($_POST['user_dm_doclinks']),'boolean'); |
|---|
| 295 | $core->auth->user_prefs->dashboard->put('dcnews',!empty($_POST['user_dm_dcnews']),'boolean'); |
|---|
| 296 | $core->auth->user_prefs->dashboard->put('quickentry',!empty($_POST['user_dm_quickentry']),'boolean'); |
|---|
| 297 | $core->auth->user_prefs->dashboard->put('nofavicons',empty($_POST['user_dm_nofavicons']),'boolean'); |
|---|
| 298 | $core->auth->user_prefs->interface->put('iconset',(!empty($_POST['user_ui_iconset']) ? $_POST['user_ui_iconset'] : '')); |
|---|
| 299 | $core->auth->user_prefs->interface->put('nofavmenu',empty($_POST['user_ui_nofavmenu']),'boolean'); |
|---|
| 300 | |
|---|
| 301 | # --BEHAVIOR-- adminAfterUserOptionsUpdate |
|---|
| 302 | $core->callBehavior('adminAfterDashboardOptionsUpdate',$core->auth->userID()); |
|---|
| 303 | |
|---|
| 304 | dcPage::addSuccessNotice(__('Dashboard options has been successfully updated.')); |
|---|
| 305 | $core->adminurl->redirect("admin.user.preferences",array(),'#user-favorites'); |
|---|
| 306 | } |
|---|
| 307 | catch (Exception $e) |
|---|
| 308 | { |
|---|
| 309 | $core->error->add($e->getMessage()); |
|---|
| 310 | } |
|---|
| 311 | } |
|---|
| 312 | |
|---|
| 313 | # Add selected favorites |
|---|
| 314 | if (!empty($_POST['appendaction'])) |
|---|
| 315 | { |
|---|
| 316 | try { |
|---|
| 317 | if (empty($_POST['append'])) { |
|---|
| 318 | throw new Exception(__('No favorite selected')); |
|---|
| 319 | } |
|---|
| 320 | $user_favs = $core->favs->getFavoriteIDs(false); |
|---|
| 321 | foreach ($_POST['append'] as $k => $v) |
|---|
| 322 | { |
|---|
| 323 | if ($core->favs->exists($v)) { |
|---|
| 324 | $user_favs[] = $v; |
|---|
| 325 | } |
|---|
| 326 | } |
|---|
| 327 | $core->favs->setFavoriteIDs($user_favs,false); |
|---|
| 328 | |
|---|
| 329 | if (!$core->error->flag()) { |
|---|
| 330 | dcPage::addSuccessNotice(__('Favorites have been successfully added.')); |
|---|
| 331 | $core->adminurl->redirect("admin.user.preferences",array(),'#user-favorites'); |
|---|
| 332 | } |
|---|
| 333 | } catch (Exception $e) { |
|---|
| 334 | $core->error->add($e->getMessage()); |
|---|
| 335 | } |
|---|
| 336 | } |
|---|
| 337 | |
|---|
| 338 | # Delete selected favorites |
|---|
| 339 | if (!empty($_POST['removeaction'])) |
|---|
| 340 | { |
|---|
| 341 | try { |
|---|
| 342 | if (empty($_POST['remove'])) { |
|---|
| 343 | throw new Exception(__('No favorite selected')); |
|---|
| 344 | } |
|---|
| 345 | $user_fav_ids = array(); |
|---|
| 346 | foreach ($core->favs->getFavoriteIDs(false) as $v) { |
|---|
| 347 | $user_fav_ids[$v]=true; |
|---|
| 348 | } |
|---|
| 349 | foreach ($_POST['remove'] as $v) |
|---|
| 350 | { |
|---|
| 351 | if (isset($user_fav_ids[$v])) { |
|---|
| 352 | unset($user_fav_ids[$v]); |
|---|
| 353 | } |
|---|
| 354 | } |
|---|
| 355 | $core->favs->setFavoriteIDs(array_keys($user_fav_ids),false); |
|---|
| 356 | if (!$core->error->flag()) { |
|---|
| 357 | dcPage::addSuccessNotice(__('Favorites have been successfully removed.')); |
|---|
| 358 | $core->adminurl->redirect("admin.user.preferences",array(),'#user-favorites'); |
|---|
| 359 | } |
|---|
| 360 | } catch (Exception $e) { |
|---|
| 361 | $core->error->add($e->getMessage()); |
|---|
| 362 | } |
|---|
| 363 | } |
|---|
| 364 | |
|---|
| 365 | # Order favs |
|---|
| 366 | $order = array(); |
|---|
| 367 | if (empty($_POST['favs_order']) && !empty($_POST['order'])) { |
|---|
| 368 | $order = $_POST['order']; |
|---|
| 369 | asort($order); |
|---|
| 370 | $order = array_keys($order); |
|---|
| 371 | } elseif (!empty($_POST['favs_order'])) { |
|---|
| 372 | $order = explode(',',$_POST['favs_order']); |
|---|
| 373 | } |
|---|
| 374 | |
|---|
| 375 | if (!empty($_POST['saveorder']) && !empty($order)) |
|---|
| 376 | { |
|---|
| 377 | foreach ($order as $k => $v) { |
|---|
| 378 | if (!$core->favs->exists($v)) { |
|---|
| 379 | unset($order[$k]); |
|---|
| 380 | } |
|---|
| 381 | } |
|---|
| 382 | $core->favs->setFavoriteIDs($order,false); |
|---|
| 383 | if (!$core->error->flag()) { |
|---|
| 384 | dcPage::addSuccessNotice(__('Favorites have been successfully updated.')); |
|---|
| 385 | $core->adminurl->redirect("admin.user.preferences",array(),'#user-favorites'); |
|---|
| 386 | } |
|---|
| 387 | } |
|---|
| 388 | |
|---|
| 389 | # Replace default favorites by current set (super admin only) |
|---|
| 390 | if (!empty($_POST['replace']) && $core->auth->isSuperAdmin()) { |
|---|
| 391 | $user_favs = $core->favs->getFavoriteIDs(false); |
|---|
| 392 | $core->favs->setFavoriteIDs($user_favs,true); |
|---|
| 393 | |
|---|
| 394 | if (!$core->error->flag()) { |
|---|
| 395 | dcPage::addSuccessNotice(__('Default favorites have been successfully updated.')); |
|---|
| 396 | $core->adminurl->redirect("admin.user.preferences",array(),'#user-favorites'); |
|---|
| 397 | } |
|---|
| 398 | } |
|---|
| 399 | |
|---|
| 400 | /* DISPLAY |
|---|
| 401 | -------------------------------------------------------- */ |
|---|
| 402 | dcPage::open($page_title, |
|---|
| 403 | dcPage::jsLoad('js/_preferences.js'). |
|---|
| 404 | ($user_acc_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')). |
|---|
| 405 | dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). |
|---|
| 406 | dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). |
|---|
| 407 | dcPage::jsLoad('js/jquery/jquery.pwstrength.js'). |
|---|
| 408 | '<script type="text/javascript">'."\n". |
|---|
| 409 | "\$(function() {\n". |
|---|
| 410 | " \$('#new_pwd').pwstrength({texts: ['". |
|---|
| 411 | sprintf(__('Password strength: %s'),__('very weak'))."', '". |
|---|
| 412 | sprintf(__('Password strength: %s'),__('weak'))."', '". |
|---|
| 413 | sprintf(__('Password strength: %s'),__('mediocre'))."', '". |
|---|
| 414 | sprintf(__('Password strength: %s'),__('strong'))."', '". |
|---|
| 415 | sprintf(__('Password strength: %s'),__('very strong'))."']});\n". |
|---|
| 416 | "});\n". |
|---|
| 417 | "</script>\n". |
|---|
| 418 | dcPage::jsPageTabs($default_tab). |
|---|
| 419 | dcPage::jsConfirmClose('user-form','opts-forms','favs-form'). |
|---|
| 420 | |
|---|
| 421 | # --BEHAVIOR-- adminPreferencesHeaders |
|---|
| 422 | $core->callBehavior('adminPreferencesHeaders'), |
|---|
| 423 | |
|---|
| 424 | dcPage::breadcrumb( |
|---|
| 425 | array( |
|---|
| 426 | html::escapeHTML($core->auth->userID()) => '', |
|---|
| 427 | $page_title => '' |
|---|
| 428 | )) |
|---|
| 429 | ); |
|---|
| 430 | |
|---|
| 431 | # User profile |
|---|
| 432 | echo '<div class="multi-part" id="user-profile" title="'.__('My profile').'">'; |
|---|
| 433 | |
|---|
| 434 | echo |
|---|
| 435 | '<h3>'.__('My profile').'</h3>'. |
|---|
| 436 | '<form action="'.$core->adminurl->get("admin.user.preferences").'" method="post" id="user-form">'. |
|---|
| 437 | |
|---|
| 438 | '<p><label for="user_name">'.__('Last Name:').'</label>'. |
|---|
| 439 | form::field('user_name',20,255,html::escapeHTML($user_name)).'</p>'. |
|---|
| 440 | |
|---|
| 441 | '<p><label for="user_firstname">'.__('First Name:').'</label>'. |
|---|
| 442 | form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).'</p>'. |
|---|
| 443 | |
|---|
| 444 | '<p><label for="user_displayname">'.__('Display name:').'</label>'. |
|---|
| 445 | form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).'</p>'. |
|---|
| 446 | |
|---|
| 447 | '<p><label for="user_email">'.__('Email:').'</label>'. |
|---|
| 448 | form::field('user_email',20,255,html::escapeHTML($user_email)).'</p>'. |
|---|
| 449 | |
|---|
| 450 | '<p><label for="user_url">'.__('URL:').'</label>'. |
|---|
| 451 | form::field('user_url',30,255,html::escapeHTML($user_url)).'</p>'. |
|---|
| 452 | |
|---|
| 453 | '<p><label for="user_lang">'.__('Language for my interface:').'</label>'. |
|---|
| 454 | form::combo('user_lang',$lang_combo,$user_lang,'l10n').'</p>'. |
|---|
| 455 | |
|---|
| 456 | '<p><label for="user_tz">'.__('My timezone:').'</label>'. |
|---|
| 457 | form::combo('user_tz',dt::getZones(true,true),$user_tz).'</p>'; |
|---|
| 458 | |
|---|
| 459 | |
|---|
| 460 | if ($core->auth->allowPassChange()) |
|---|
| 461 | { |
|---|
| 462 | echo |
|---|
| 463 | '<h4 class="vertical-separator pretty-title">'.__('Change my password').'</h4>'. |
|---|
| 464 | |
|---|
| 465 | '<div class="pw-table">'. |
|---|
| 466 | '<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'. |
|---|
| 467 | form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'. |
|---|
| 468 | '<div id="pwindicator">'. |
|---|
| 469 | ' <div class="bar"></div>'. |
|---|
| 470 | ' <p class="label no-margin"></p>'. |
|---|
| 471 | '</div>'. |
|---|
| 472 | '</div>'. |
|---|
| 473 | |
|---|
| 474 | '<p><label for="new_pwd_c">'.__('Confirm new password:').'</label>'. |
|---|
| 475 | form::password('new_pwd_c',20,255).'</p>'. |
|---|
| 476 | |
|---|
| 477 | '<p><label for="cur_pwd">'.__('Your current password:').'</label>'. |
|---|
| 478 | form::password('cur_pwd',20,255).'</p>'. |
|---|
| 479 | '<p class="form-note warn">'. |
|---|
| 480 | __('If you have changed your email or password you must provide your current password to save these modifications.'). |
|---|
| 481 | '</p>'; |
|---|
| 482 | } |
|---|
| 483 | |
|---|
| 484 | echo |
|---|
| 485 | '<p class="clear vertical-separator">'. |
|---|
| 486 | $core->formNonce(). |
|---|
| 487 | '<input type="submit" accesskey="s" value="'.__('Update my profile').'" /></p>'. |
|---|
| 488 | '</form>'. |
|---|
| 489 | |
|---|
| 490 | '</div>'; |
|---|
| 491 | |
|---|
| 492 | # User options : some from actual user profile, dashboard modules, ... |
|---|
| 493 | echo '<div class="multi-part" id="user-options" title="'.__('My options').'">'; |
|---|
| 494 | |
|---|
| 495 | echo |
|---|
| 496 | '<form action="'.$core->adminurl->get("admin.user.preferences").'#user-options" method="post" id="opts-forms">'. |
|---|
| 497 | '<h3>'.__('My options').'</h3>'; |
|---|
| 498 | |
|---|
| 499 | echo |
|---|
| 500 | '<div class="fieldset">'. |
|---|
| 501 | '<h4 id="user_options_interface">'.__('Interface').'</h4>'. |
|---|
| 502 | |
|---|
| 503 | '<p><label for="user_ui_enhanceduploader" class="classic">'. |
|---|
| 504 | form::checkbox('user_ui_enhanceduploader',1,$user_ui_enhanceduploader).' '. |
|---|
| 505 | __('Activate enhanced uploader in media manager').'</label></p>'. |
|---|
| 506 | |
|---|
| 507 | '<p><label for="user_acc_nodragdrop" class="classic">'. |
|---|
| 508 | form::checkbox('user_acc_nodragdrop',1,$user_acc_nodragdrop).' '. |
|---|
| 509 | __('Disable javascript powered drag and drop for ordering items').'</label></p>'. |
|---|
| 510 | '<p class="clear form-note">'.__('If checked, numeric fields will allow to type the elements\' ordering number.').'</p>'. |
|---|
| 511 | |
|---|
| 512 | '<p><label for="user_ui_hidemoreinfo" class="classic">'. |
|---|
| 513 | form::checkbox('user_ui_hidemoreinfo',1,$user_ui_hidemoreinfo).' '. |
|---|
| 514 | __('Hide all secondary information and notes').'</label></p>'. |
|---|
| 515 | |
|---|
| 516 | '<p><label for="user_ui_htmlfontsize" class="classic">'.__('Font size:').'</label>'.' '. |
|---|
| 517 | form::combo('user_ui_htmlfontsize',$htmlfontsize_combo,$user_ui_htmlfontsize).'</p>'; |
|---|
| 518 | |
|---|
| 519 | echo |
|---|
| 520 | '<p><label for="user_ui_media_by_page" class="classic">'.__('Number of elements displayed per page in media manager:').'</label> '. |
|---|
| 521 | form::field('user_ui_media_by_page',5,3,(integer) $user_ui_media_by_page).'</p>'; |
|---|
| 522 | |
|---|
| 523 | echo |
|---|
| 524 | '<p><label for="user_ui_media_nb_last_dirs" class="classic">'.__('Number of recent folders proposed in media manager:').'</label> '. |
|---|
| 525 | form::field('user_ui_media_nb_last_dirs',5,3,(integer) $user_ui_media_nb_last_dirs).'</p>'. |
|---|
| 526 | '<p class="clear form-note">'.__('Leave empty to ignore, displayed only if Javascript is enabled in your browser.').'</p>'; |
|---|
| 527 | |
|---|
| 528 | if ($core->auth->isSuperAdmin()) { |
|---|
| 529 | echo |
|---|
| 530 | '<p><label for="user_ui_hide_std_favicon" class="classic">'. |
|---|
| 531 | form::checkbox('user_ui_hide_std_favicon',1,$user_ui_hide_std_favicon).' '. |
|---|
| 532 | __('Do not use standard favicon').'</label> '. |
|---|
| 533 | '<span class="clear form-note warn">'.__('This will be applied for all users').'.</span>'. |
|---|
| 534 | '</p>';//Opera sucks; |
|---|
| 535 | } |
|---|
| 536 | |
|---|
| 537 | echo |
|---|
| 538 | '</div>'; |
|---|
| 539 | |
|---|
| 540 | echo |
|---|
| 541 | '<div class="fieldset">'. |
|---|
| 542 | '<h4 id="user_options_columns">'.__('Optional columns displayed in lists').'</h4>'; |
|---|
| 543 | $odd = true; |
|---|
| 544 | foreach ($cols as $col_type => $col_list) { |
|---|
| 545 | echo '<div class="two-boxes '.($odd ? 'odd' : 'even').'">'; |
|---|
| 546 | echo '<h5>'.$col_list[0].'</h5>'; |
|---|
| 547 | foreach ($col_list[1] as $col_name => $col_data) { |
|---|
| 548 | echo |
|---|
| 549 | '<p><label for="cols_'.$col_type.'-'.$col_name.'" class="classic">'. |
|---|
| 550 | form::checkbox(array('cols_'.$col_type.'[]','cols_'.$col_type.'-'.$col_name),$col_name,$col_data[0]).$col_data[1].'</label>'; |
|---|
| 551 | } |
|---|
| 552 | echo '</div>'; |
|---|
| 553 | $odd = !$odd; |
|---|
| 554 | } |
|---|
| 555 | echo '</div>'; |
|---|
| 556 | |
|---|
| 557 | echo |
|---|
| 558 | '<div class="fieldset">'. |
|---|
| 559 | '<h4 id="user_options_edition">'.__('Edition').'</h4>'; |
|---|
| 560 | |
|---|
| 561 | echo '<div class="two-boxes odd">'; |
|---|
| 562 | foreach ($format_by_editors as $format => $editors) { |
|---|
| 563 | echo |
|---|
| 564 | '<p class="field"><label for="user_editor_'.$format.'">'.sprintf(__('Preferred editor for %s:'),$format).'</label>'. |
|---|
| 565 | form::combo( |
|---|
| 566 | array('user_editor['.$format.']', 'user_editor_'.$format), |
|---|
| 567 | array_merge(array(__('Choose an editor') => ''),$editors), |
|---|
| 568 | $user_options['editor'][$format] |
|---|
| 569 | ).'</p>'; |
|---|
| 570 | } |
|---|
| 571 | echo |
|---|
| 572 | '<p class="field"><label for="user_post_format">'.__('Preferred format:').'</label>'. |
|---|
| 573 | form::combo('user_post_format',$available_formats,$user_options['post_format']).'</p>'; |
|---|
| 574 | |
|---|
| 575 | echo |
|---|
| 576 | '<p class="field"><label for="user_post_status">'.__('Default entry status:').'</label>'. |
|---|
| 577 | form::combo('user_post_status',$status_combo,$user_post_status).'</p>'. |
|---|
| 578 | |
|---|
| 579 | '<p class="field"><label for="user_edit_size">'.__('Entry edit field height:').'</label>'. |
|---|
| 580 | form::field('user_edit_size',5,4,(integer) $user_options['edit_size']).'</p>'. |
|---|
| 581 | |
|---|
| 582 | '<p><label for="user_wysiwyg" class="classic">'. |
|---|
| 583 | form::checkbox('user_wysiwyg',1,$user_options['enable_wysiwyg']).' '. |
|---|
| 584 | __('Enable WYSIWYG mode').'</label></p>'. |
|---|
| 585 | |
|---|
| 586 | '<p><label for="user_toolbar_bottom" class="classic">'. |
|---|
| 587 | form::checkbox('user_toolbar_bottom',1,$user_options['toolbar_bottom']).' '. |
|---|
| 588 | __('Display editor\'s toolbar at bottom of textarea (if possible)').'</label></p>'. |
|---|
| 589 | |
|---|
| 590 | '</div>'; |
|---|
| 591 | |
|---|
| 592 | echo '<div class="two-boxes even">'; |
|---|
| 593 | echo '<h5>'.__('Use xhtml editor for:').'</h5>'; |
|---|
| 594 | foreach ($rte as $rk => $rv) { |
|---|
| 595 | echo |
|---|
| 596 | '<p><label for="rte_'.$rk.'" class="classic">'. |
|---|
| 597 | form::checkbox(array('rte_flags[]','rte_'.$rk),$rk,$rv[0]).$rv[1].'</label>'; |
|---|
| 598 | } |
|---|
| 599 | echo '</div>'; |
|---|
| 600 | |
|---|
| 601 | echo '</div>'; // fieldset |
|---|
| 602 | |
|---|
| 603 | echo |
|---|
| 604 | '<h4 class="pretty-title">'.__('Other options').'</h4>'; |
|---|
| 605 | |
|---|
| 606 | # --BEHAVIOR-- adminPreferencesForm |
|---|
| 607 | $core->callBehavior('adminPreferencesForm',$core); |
|---|
| 608 | |
|---|
| 609 | echo |
|---|
| 610 | '<p class="clear vertical-separator">'. |
|---|
| 611 | $core->formNonce(). |
|---|
| 612 | '<input type="submit" accesskey="s" value="'.__('Save my options').'" /></p>'. |
|---|
| 613 | '</form>'; |
|---|
| 614 | |
|---|
| 615 | echo '</div>'; |
|---|
| 616 | |
|---|
| 617 | # My dashboard |
|---|
| 618 | echo '<div class="multi-part" id="user-favorites" title="'.__('My dashboard').'">'; |
|---|
| 619 | $ws = $core->auth->user_prefs->addWorkspace('favorites'); |
|---|
| 620 | echo '<h3>'.__('My dashboard').'</h3>'; |
|---|
| 621 | |
|---|
| 622 | echo '<form action="'.$core->adminurl->get("admin.user.preferences").'" method="post" id="favs-form" class="two-boxes odd">'; |
|---|
| 623 | |
|---|
| 624 | echo '<div id="my-favs" class="fieldset"><h4>'.__('My favorites').'</h4>'; |
|---|
| 625 | |
|---|
| 626 | $count = 0; |
|---|
| 627 | $user_fav = $core->favs->getFavoriteIDs(false); |
|---|
| 628 | foreach ($user_fav as $id) { |
|---|
| 629 | $fav = $core->favs->getFavorite($id); |
|---|
| 630 | if ($fav != false) { |
|---|
| 631 | // User favorites only |
|---|
| 632 | if ($count == 0) echo '<ul class="fav-list">'; |
|---|
| 633 | $count++; |
|---|
| 634 | echo '<li id="fu-'.$id.'">'.'<label for="fuk-'.$id.'">'. |
|---|
| 635 | '<img src="'.dc_admin_icon_url($fav['small-icon']).'" alt="" /> '.'<span class="zoom"><img src="'.dc_admin_icon_url($fav['large-icon']).'" alt="" /></span>'. |
|---|
| 636 | form::field(array('order['.$id.']'),2,3,$count,'position','',false,'title="'.sprintf(__('position of %s'),$fav['title']).'"'). |
|---|
| 637 | form::hidden(array('dynorder[]','dynorder-'.$id.''),$id). |
|---|
| 638 | form::checkbox(array('remove[]','fuk-'.$id),$id).__($fav['title']).'</label>'. |
|---|
| 639 | '</li>'; |
|---|
| 640 | } |
|---|
| 641 | } |
|---|
| 642 | if ($count > 0) echo '</ul>'; |
|---|
| 643 | if ($count > 0) { |
|---|
| 644 | echo |
|---|
| 645 | '<div class="clear">'. |
|---|
| 646 | '<p>'.form::hidden('favs_order',''). |
|---|
| 647 | $core->formNonce(). |
|---|
| 648 | '<input type="submit" name="saveorder" value="'.__('Save order').'" /> '. |
|---|
| 649 | |
|---|
| 650 | '<input type="submit" class="delete" name="removeaction" '. |
|---|
| 651 | 'value="'.__('Delete selected favorites').'" '. |
|---|
| 652 | 'onclick="return window.confirm(\''.html::escapeJS( |
|---|
| 653 | __('Are you sure you want to remove selected favorites?')).'\');" /></p>'. |
|---|
| 654 | |
|---|
| 655 | ($core->auth->isSuperAdmin() ? |
|---|
| 656 | '<div class="info">'. |
|---|
| 657 | '<p>'.__('If you are a super administrator, you may define this set of favorites to be used by default on all blogs of this installation.').'</p>'. |
|---|
| 658 | '<p><input class="reset" type="submit" name="replace" value="'.__('Define as default favorites').'" />'.'</p>'. |
|---|
| 659 | '</div>' |
|---|
| 660 | : |
|---|
| 661 | ''). |
|---|
| 662 | |
|---|
| 663 | '</div>'; |
|---|
| 664 | } else { |
|---|
| 665 | echo |
|---|
| 666 | '<p>'.__('Currently no personal favorites.').'</p>'; |
|---|
| 667 | } |
|---|
| 668 | |
|---|
| 669 | $avail_fav = $core->favs->getFavorites($core->favs->getAvailableFavoritesIDs()); |
|---|
| 670 | $default_fav_ids = array(); |
|---|
| 671 | foreach($core->favs->getFavoriteIDs(true) as $v) { |
|---|
| 672 | $default_fav_ids[$v]=true; |
|---|
| 673 | } |
|---|
| 674 | echo '</div>'; # /box my-fav |
|---|
| 675 | |
|---|
| 676 | echo '<div class="fieldset" id="available-favs">'; |
|---|
| 677 | # Available favorites |
|---|
| 678 | echo '<h5 class="pretty-title">'.__('Other available favorites').'</h5>'; |
|---|
| 679 | $count = 0; |
|---|
| 680 | function cmp($a,$b) { |
|---|
| 681 | if ($a['title'] == $b['title']) { |
|---|
| 682 | return 0; |
|---|
| 683 | } |
|---|
| 684 | return ($a['title'] < $b['title']) ? -1 : 1; |
|---|
| 685 | } |
|---|
| 686 | uasort($avail_fav,'cmp'); |
|---|
| 687 | |
|---|
| 688 | foreach ($avail_fav as $k => $v) { |
|---|
| 689 | if (in_array($k,$user_fav)) { |
|---|
| 690 | unset($avail_fav[$k]); |
|---|
| 691 | } |
|---|
| 692 | } |
|---|
| 693 | foreach ($avail_fav as $k=>$fav) { |
|---|
| 694 | if ($count == 0) echo '<ul class="fav-list">'; |
|---|
| 695 | $count++; |
|---|
| 696 | echo '<li id="fa-'.$k.'">'.'<label for="fak-'.$k.'">'. |
|---|
| 697 | '<img src="'.dc_admin_icon_url($fav['small-icon']).'" alt="" /> '. |
|---|
| 698 | '<span class="zoom"><img src="'.dc_admin_icon_url($fav['large-icon']).'" alt="" /></span>'. |
|---|
| 699 | form::checkbox(array('append[]','fak-'.$k),$k). |
|---|
| 700 | $fav['title'].'</label>'. |
|---|
| 701 | (isset($default_fav_ids[$k]) ? ' <span class="default-fav"><img src="images/selected.png" alt="'.__('(default favorite)').'" /></span>' : ''). |
|---|
| 702 | '</li>'; |
|---|
| 703 | } |
|---|
| 704 | if ($count > 0) echo '</ul>'; |
|---|
| 705 | echo |
|---|
| 706 | '<p>'. |
|---|
| 707 | $core->formNonce(). |
|---|
| 708 | '<input type="submit" name="appendaction" value="'.__('Add to my favorites').'" /></p>'; |
|---|
| 709 | echo '</div>'; # /available favorites |
|---|
| 710 | |
|---|
| 711 | echo '</form>'; |
|---|
| 712 | |
|---|
| 713 | echo |
|---|
| 714 | '<form action="'.$core->adminurl->get("admin.user.preferences").'" method="post" id="db-forms" class="two-boxes even">'. |
|---|
| 715 | |
|---|
| 716 | '<div class="fieldset">'. |
|---|
| 717 | '<h4>'.__('Menu').'</h4>'. |
|---|
| 718 | '<p><label for="user_ui_nofavmenu" class="classic">'. |
|---|
| 719 | form::checkbox('user_ui_nofavmenu',1,!$user_ui_nofavmenu).' '. |
|---|
| 720 | __('Display favorites at the top of the menu').'</label></p></div>'; |
|---|
| 721 | |
|---|
| 722 | echo |
|---|
| 723 | '<div class="fieldset">'. |
|---|
| 724 | '<h4>'.__('Dashboard icons').'</h4>'. |
|---|
| 725 | '<p><label for="user_dm_nofavicons" class="classic">'. |
|---|
| 726 | form::checkbox('user_dm_nofavicons',1,!$user_dm_nofavicons).' '. |
|---|
| 727 | __('Display dashboard icons').'</label></p>'; |
|---|
| 728 | |
|---|
| 729 | if (count($iconsets_combo) > 1) { |
|---|
| 730 | echo |
|---|
| 731 | '<p><label for="user_ui_iconset" class="classic">'.__('Iconset:').'</label> '. |
|---|
| 732 | form::combo('user_ui_iconset',$iconsets_combo,$user_ui_iconset).'</p>'; |
|---|
| 733 | } else { |
|---|
| 734 | echo '<p class="hidden">'.form::hidden('user_ui_iconset','').'</p>'; |
|---|
| 735 | } |
|---|
| 736 | echo |
|---|
| 737 | '</div>'; |
|---|
| 738 | |
|---|
| 739 | echo |
|---|
| 740 | '<div class="fieldset">'. |
|---|
| 741 | '<h4>'.__('Dashboard modules').'</h4>'. |
|---|
| 742 | |
|---|
| 743 | '<p><label for="user_dm_doclinks" class="classic">'. |
|---|
| 744 | form::checkbox('user_dm_doclinks',1,$user_dm_doclinks).' '. |
|---|
| 745 | __('Display documentation links').'</label></p>'. |
|---|
| 746 | |
|---|
| 747 | '<p><label for="user_dm_dcnews" class="classic">'. |
|---|
| 748 | form::checkbox('user_dm_dcnews',1,$user_dm_dcnews).' '. |
|---|
| 749 | __('Display Dotclear news').'</label></p>'. |
|---|
| 750 | |
|---|
| 751 | '<p><label for="user_dm_quickentry" class="classic">'. |
|---|
| 752 | form::checkbox('user_dm_quickentry',1,$user_dm_quickentry).' '. |
|---|
| 753 | __('Display quick entry form').'</label><br class="clear" />'. //Opera sucks |
|---|
| 754 | '</p>'; |
|---|
| 755 | echo '</div>'; |
|---|
| 756 | |
|---|
| 757 | # --BEHAVIOR-- adminDashboardOptionsForm |
|---|
| 758 | $core->callBehavior('adminDashboardOptionsForm',$core); |
|---|
| 759 | |
|---|
| 760 | echo |
|---|
| 761 | '<p>'. |
|---|
| 762 | form::hidden('db-options','-'). |
|---|
| 763 | $core->formNonce(). |
|---|
| 764 | '<input type="submit" accesskey="s" value="'.__('Save my dashboard options').'" /></p>'. |
|---|
| 765 | '</form>'; |
|---|
| 766 | |
|---|
| 767 | echo '</div>'; # /multipart-user-favorites |
|---|
| 768 | |
|---|
| 769 | dcPage::helpBlock('core_user_pref'); |
|---|
| 770 | dcPage::close(); |
|---|