openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

ConfigurationSrcAction.class.php (631B)


      1 <?php
      2 namespace cms\action\configuration;
      3 use cms\action\ConfigurationAction;
      4 use cms\action\Method;
      5 use util\Request;
      6 use util\Session;
      7 
      8 
      9 class ConfigurationSrcAction extends ConfigurationAction implements Method {
     10     public function view() {
     11         $conf = Request::getConfig();
     12         unset( $conf['language']);
     13 
     14         // Mask passwords.
     15         array_walk_recursive($conf,function(&$item,$key)
     16         {
     17             if($key=='password'){
     18                 $item='*************';
     19             }
     20         });
     21 
     22         $this->setTemplateVar('source', \util\YAML::dump($conf,4,0,true));
     23     }
     24     public function post() {
     25     }
     26 }