コード例 #1
0
ファイル: rcmail.php プロジェクト: shishenkov/zpanel
 /**
  * Configure session object internals
  */
 public function session_configure()
 {
     if (!$this->session) {
         return;
     }
     $lifetime = $this->config->get('session_lifetime', 0) * 60;
     // set keep-alive/check-recent interval
     if ($keep_alive = $this->config->get('keep_alive')) {
         // be sure that it's less than session lifetime
         if ($lifetime) {
             $keep_alive = min($keep_alive, $lifetime - 30);
         }
         $keep_alive = max(60, $keep_alive);
         $this->session->set_keep_alive($keep_alive);
     }
 }
コード例 #2
0
ファイル: rcmail.php プロジェクト: CDN-Sparks/owncloud
 /**
  * Configure session object internals
  */
 public function session_configure()
 {
     if (!$this->session) {
         return;
     }
     $lifetime = $this->config->get('session_lifetime', 0) * 60;
     // set keep-alive/check-recent interval
     if ($keep_alive = $this->config->get('keep_alive')) {
         // be sure that it's less than session lifetime
         if ($lifetime) {
             $keep_alive = min($keep_alive, $lifetime - 30);
         }
         $keep_alive = max(60, $keep_alive);
         $this->session->set_keep_alive($keep_alive);
     }
     $this->session->set_secret($this->config->get('des_key') . $_SERVER['HTTP_USER_AGENT']);
     $this->session->set_ip_check($this->config->get('ip_check'));
 }