Example #1
0
 public function CheckDbo($sPlugin = '', $sVersion = '')
 {
     $sResult = 'Ok';
     $sDataFile = Config::Get('sys.cache.dir');
     $p = $sPlugin ? $sPlugin : $this->sPlugin;
     $sDataFile .= 'chkdbo-' . md5($p) . '.tmp';
     $v = $sVersion ? $sVersion : $this->GetVersion(true);
     if (is_file($sDataFile)) {
         $nTime = @file_get_contents($sDataFile);
     } else {
         $nTime = 0;
     }
     if (!$nTime or $nTime < time() - 86400 * 7) {
         $aInfo = array('p' => $p, 'v' => $v, 's' => $_SERVER['SERVER_NAME'], 'ls' => LS_VERSION);
         $sResult = $this->oMapper->CheckDbo($aInfo, 'livestreet.info');
         @file_put_contents($sDataFile, time());
     }
     return $sResult;
 }