Changeset 2969:96c0a5e3ff75
- Timestamp:
- 03/19/15 04:06:56 (9 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/blog_pref.php
r2921 r2969 163 163 { 164 164 $cur = $core->con->openCursor($core->prefix.'blog'); 165 if ($core->auth->isSuperAdmin()) { 166 $cur->blog_id = $_POST['blog_id']; 167 $cur->blog_url = preg_replace('/\?+$/','?',$_POST['blog_url']); 168 if (in_array($_POST['blog_status'],$status_combo)) { 169 $cur->blog_status = (integer) $_POST['blog_status']; 170 } 171 } 165 $cur->blog_id = $_POST['blog_id']; 166 $cur->blog_url = preg_replace('/\?+$/','?', $_POST['blog_url']); 172 167 $cur->blog_name = $_POST['blog_name']; 173 168 $cur->blog_desc = $_POST['blog_desc']; 169 170 if ($core->auth->isSuperAdmin() && in_array($_POST['blog_status'], $status_combo)) { 171 $cur->blog_status = (int) $_POST['blog_status']; 172 } 174 173 175 174 $media_img_t_size = abs((integer) $_POST['media_img_t_size']); … … 350 349 '<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p> '. 351 350 '<p class="form-note warn">'.__('Please note that changing your blog ID may require changes in your public index.php file.').'</p>'; 351 } else { 352 /* 353 Only super admins can change the blog ID and URL, but we need to pass 354 their values to the POST request via hidden html input values so as 355 to allow admins to update other settings. 356 Otherwise dcCore::getBlogCursor() throws an exception. 357 */ 358 echo form::field('blog_id', 30, 32, html::escapeHTML($blog_id), '', '', false, 'hidden="hidden"'); 359 echo form::field('blog_url', 50, 255, html::escapeHTML($blog_url), '', '', false, 'hidden="hidden"'); 352 360 } 353 361
Note: See TracChangeset
for help on using the changeset viewer.