Esempio n. 1
0
 public function getCheckCurrentPsConfig()
 {
     static $allowed_array;
     if (empty($allowed_array)) {
         $allowed_array = array();
         $allowed_array['fopen'] = ConfigurationTest::test_fopen() || ConfigurationTest::test_curl();
         $allowed_array['root_writable'] = $this->getRootWritable();
         $admin_dir = trim(str_replace($this->prodRootDir, '', $this->adminDir), DIRECTORY_SEPARATOR);
         $allowed_array['admin_au_writable'] = ConfigurationTest::test_dir($admin_dir . DIRECTORY_SEPARATOR . $this->autoupgradeDir, false, $report);
         $allowed_array['shop_deactivated'] = !Configuration::get('PS_SHOP_ENABLE') || isset($_SERVER['HTTP_HOST']) && in_array($_SERVER['HTTP_HOST'], array('127.0.0.1', 'localhost'));
         $allowed_array['cache_deactivated'] = !(defined('_PS_CACHE_ENABLED_') && _PS_CACHE_ENABLED_);
         $allowed_array['module_version_ok'] = $this->checkAutoupgradeLastVersion();
         if (version_compare(_PS_VERSION_, '1.5.0.0', '<')) {
             $allowed_array['test_mobile'] = ConfigurationTest::test_mobile();
         }
     }
     return $allowed_array;
 }