Prechádzať zdrojové kódy

首页显示项目名称变更为后台可管理方式

提取后台数据库中字段的值
NoNZero 9 rokov pred
rodič
commit
22da2dce56
1 zmenil súbory, kde vykonal 4 pridanie a 2 odobranie
  1. 4 2
      protected/controller/LoginController.php

+ 4 - 2
protected/controller/LoginController.php

@@ -2,6 +2,7 @@
 
 
 Doo::loadClass('auth');
 Doo::loadClass('auth');
 Doo::loadClass('profile');
 Doo::loadClass('profile');
+Doo::loadModelAt('aconfig', 'admin');
 
 
 /**
 /**
  * MainController
  * MainController
@@ -11,7 +12,7 @@ Doo::loadClass('profile');
  */
  */
 class LoginController extends DooController {
 class LoginController extends DooController {
 
 
-    private $data, $auth, $profile;
+    private $data, $auth, $profile,$aconfig;
 
 
     public function beforeRun($resource, $action) {
     public function beforeRun($resource, $action) {
         $uGroups = $this->profile->getUidByname($this->auth->getUid());
         $uGroups = $this->profile->getUidByname($this->auth->getUid());
@@ -25,6 +26,7 @@ class LoginController extends DooController {
     public function __construct() {
     public function __construct() {
         $this->auth = new Auth();
         $this->auth = new Auth();
         $this->profile = new Uprofile();
         $this->profile = new Uprofile();
+        $this->aconfig = new AConfig();
         $this->data['rootUrl'] = Doo::conf()->APP_URL;
         $this->data['rootUrl'] = Doo::conf()->APP_URL;
     }
     }
 
 
@@ -81,7 +83,7 @@ class LoginController extends DooController {
             }
             }
         }
         }
         $this->data['_token_'] = $this->generateFormHash($this->create_randomstr());
         $this->data['_token_'] = $this->generateFormHash($this->create_randomstr());
-        $this->data['proName'] = DOO::conf()->PRO_NAME;
+        $this->data['proName'] = $this->aconfig->getOne(array('select' => 'proName', 'asArray' => TRUE))['proName'];
         $this->data['ver'] = DOO::conf()->ver;
         $this->data['ver'] = DOO::conf()->ver;
         $this->render('login', $this->data);
         $this->render('login', $this->data);
     }
     }