Changeset 1061:f522c5a73b4e
- Timestamp:
- 12/10/12 07:43:16 (13 years ago)
- Branch:
- twig
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/auth.php
r1059 r1061 303 303 $_ctx->change_pwd = $core->auth->allowPassChange() && $form->new_pwd != '' && $form->new_pwd_c != '' && $form->login_data != ''; 304 304 $_ctx->recover = $form->recover = $core->auth->allowPassChange() && !empty($_REQUEST['recover']); 305 $_ctx->safe_mode = $form->safe_mode = !empty($_REQUEST['safe_mode']); 305 $_ctx->setSafeMode(!empty($_REQUEST['safe_mode'])); 306 $form->safe_mode = !empty($_REQUEST['safe_mode']); 306 307 $_ctx->akey = false; 307 308 -
inc/admin/class.dc.admincontext.php
r1060 r1061 41 41 42 42 'version' => DC_VERSION, 43 'vendor_name' => DC_VENDOR_NAME 43 'vendor_name' => DC_VENDOR_NAME, 44 45 'safe_mode' => isset($_SESSION['sess_safe_mode']) && $_SESSION['sess_safe_mode'] 44 46 ); 45 47 } … … 152 154 } 153 155 156 public function setSafeMode($safe_mode) 157 { 158 $this->protected_globals['safe_mode'] = (boolean) $safe_mode; 159 return $this; 160 } 161 154 162 /** 155 163 Set information message … … 210 218 protected function getBlogs() 211 219 { 220 $blog_id = ''; 221 212 222 # Blogs list 213 223 $blogs = array(); 214 224 if ($this->core->auth->blog_count > 1 && $this->core->auth->blog_count < 20) { 225 $blog_id = $this->core->blog->id; 215 226 $rs_blogs = $this->core->getBlogs(array('order'=>'LOWER(blog_name)','limit'=>20)); 216 227 while ($rs_blogs->fetch()) { … … 231 242 $form 232 243 ->addField( 233 new dcFieldCombo('switchblog',$ this->core->blog->id,$blogs,array(244 new dcFieldCombo('switchblog',$blog_id,$blogs,array( 234 245 'label' => __('Blogs:')))) 235 246 ->addField(
Note: See TracChangeset
for help on using the changeset viewer.