Просмотр исходного кода

Merge branch 'master' of https://github.com/unaio/una

AntonLV 10 лет назад
Родитель
Сommit
5b2c7c59cd
3 измененных файлов с 5 добавлено и 100 удалено
  1. 0 94
      inc/classes/BxDolCacheEAccelerator.php
  2. 4 4
      install/sql/system.sql
  3. 1 2
      studio/classes/BxDolStudioToolsAudit.php

+ 0 - 94
inc/classes/BxDolCacheEAccelerator.php

@@ -1,94 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * CC-BY License - http://creativecommons.org/licenses/by/3.0/
- *
- * @defgroup    TridentCore Trident Core
- * @{
- */
-
-class BxDolCacheEAccelerator extends BxDolCache
-{
-    protected $iTTL = 3600;
-
-    /**
-     * Get data from shared memory cache
-     *
-     * @param  string $sKey - file name
-     * @param  int    $iTTL - time to live
-     * @return the    data is got from cache.
-     */
-    function getData($sKey, $iTTL = false)
-    {
-        $sData = eaccelerator_get($sKey);
-        return null === $sData ? null : unserialize($sData);
-    }
-
-    /**
-     * Save data in shared memory cache
-     *
-     * @param  string  $sKey      - file name
-     * @param  mixed   $mixedData - the data to be cached in the file
-     * @param  int     $iTTL      - time to live
-     * @return boolean result of operation.
-     */
-    function setData($sKey, $mixedData, $iTTL = false)
-    {
-        $bResult = eaccelerator_put($sKey, serialize($mixedData), false === $iTTL ? $this->iTTL : $iTTL);
-        return $bResult;
-    }
-
-    /**
-     * Delete cache from shared memory
-     *
-     * @param  string $sKey - file name
-     * @return result of the operation
-     */
-    function delData($sKey)
-    {
-        eaccelerator_lock($sKey);
-
-        eaccelerator_rm($sKey);
-
-        eaccelerator_unlock($sKey);
-
-        return true;
-    }
-
-    /**
-     * Check if eAccelerator is available
-     * @return boolean
-     */
-    function isAvailable()
-    {
-        return function_exists('eaccelerator_put');
-    }
-
-    /**
-     * Check if eaccelerator extension is loaded
-     * @return boolean
-     */
-    function isInstalled()
-    {
-        return extension_loaded('eaccelerator');
-    }
-
-    /**
-     * remove all data from cache by key prefix
-     * @return true on success
-     */
-    function removeAllByPrefix ($s)
-    {
-        $l = strlen($s);
-        $aKeys = eaccelerator_list_keys();
-        foreach ($aKeys as $aKey) {
-            $sKey = 0 === strpos($aKey['name'], ':') ? substr($aKey['name'], 1) : $aKey['name'];
-            if (0 == strncmp($sKey, $s, $l))
-                $this->delData($sKey);
-        }
-
-        return true;
-    }
-}
-
-/** @} */

+ 4 - 4
install/sql/system.sql

@@ -297,19 +297,19 @@ SET @iCategoryId = LAST_INSERT_ID();
 
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
 (@iCategoryId, 'sys_db_cache_enable', '_adm_stg_cpt_option_sys_db_cache_enable', 'on', 'checkbox', '', '', '', 10),
 (@iCategoryId, 'sys_db_cache_enable', '_adm_stg_cpt_option_sys_db_cache_enable', 'on', 'checkbox', '', '', '', 10),
-(@iCategoryId, 'sys_db_cache_engine', '_adm_stg_cpt_option_sys_db_cache_engine', 'File', 'select', 'File,EAccelerator,Memcache,APC,XCache', '', '', 11),
+(@iCategoryId, 'sys_db_cache_engine', '_adm_stg_cpt_option_sys_db_cache_engine', 'File', 'select', 'File,Memcache,APC,XCache', '', '', 11),
 
 
 (@iCategoryId, 'sys_cache_memcache_host', '_adm_stg_cpt_option_sys_cache_memcache_host', '', 'digit', '', '', '', 20),
 (@iCategoryId, 'sys_cache_memcache_host', '_adm_stg_cpt_option_sys_cache_memcache_host', '', 'digit', '', '', '', 20),
 (@iCategoryId, 'sys_cache_memcache_port', '_adm_stg_cpt_option_sys_cache_memcache_port', '11211', 'digit', '', '', '', 21),
 (@iCategoryId, 'sys_cache_memcache_port', '_adm_stg_cpt_option_sys_cache_memcache_port', '11211', 'digit', '', '', '', 21),
 
 
 (@iCategoryId, 'sys_page_cache_enable', '_adm_stg_cpt_option_sys_page_cache_enable', 'on', 'checkbox', '', '', '', 30),
 (@iCategoryId, 'sys_page_cache_enable', '_adm_stg_cpt_option_sys_page_cache_enable', 'on', 'checkbox', '', '', '', 30),
-(@iCategoryId, 'sys_page_cache_engine', '_adm_stg_cpt_option_sys_page_cache_engine', 'File', 'select', 'File,EAccelerator,Memcache,APC,XCache', '', '', 31),
+(@iCategoryId, 'sys_page_cache_engine', '_adm_stg_cpt_option_sys_page_cache_engine', 'File', 'select', 'File,Memcache,APC,XCache', '', '', 31),
 
 
 (@iCategoryId, 'sys_pb_cache_enable', '_adm_stg_cpt_option_sys_pb_cache_enable', 'on', 'checkbox', '', '', '', 40),
 (@iCategoryId, 'sys_pb_cache_enable', '_adm_stg_cpt_option_sys_pb_cache_enable', 'on', 'checkbox', '', '', '', 40),
-(@iCategoryId, 'sys_pb_cache_engine', '_adm_stg_cpt_option_sys_pb_cache_engine', 'File', 'select', 'File,EAccelerator,Memcache,APC,XCache', '', '', 41),
+(@iCategoryId, 'sys_pb_cache_engine', '_adm_stg_cpt_option_sys_pb_cache_engine', 'File', 'select', 'File,Memcache,APC,XCache', '', '', 41),
 
 
 (@iCategoryId, 'sys_template_cache_enable', '_adm_stg_cpt_option_sys_template_cache_enable', 'on', 'checkbox', '', '', '', 50),
 (@iCategoryId, 'sys_template_cache_enable', '_adm_stg_cpt_option_sys_template_cache_enable', 'on', 'checkbox', '', '', '', 50),
-(@iCategoryId, 'sys_template_cache_engine', '_adm_stg_cpt_option_sys_template_cache_engine', 'FileHtml', 'select', 'FileHtml,EAccelerator,Memcache,APC,XCache', '', '', 51),
+(@iCategoryId, 'sys_template_cache_engine', '_adm_stg_cpt_option_sys_template_cache_engine', 'FileHtml', 'select', 'FileHtml,Memcache,APC,XCache', '', '', 51),
 (@iCategoryId, 'sys_template_cache_css_enable', '_adm_stg_cpt_option_sys_template_cache_css_enable', 'on', 'checkbox', '', '', '', 55),
 (@iCategoryId, 'sys_template_cache_css_enable', '_adm_stg_cpt_option_sys_template_cache_css_enable', 'on', 'checkbox', '', '', '', 55),
 (@iCategoryId, 'sys_template_cache_js_enable', '_adm_stg_cpt_option_sys_template_cache_js_enable', 'on', 'checkbox', '', '', '', 56),
 (@iCategoryId, 'sys_template_cache_js_enable', '_adm_stg_cpt_option_sys_template_cache_js_enable', 'on', 'checkbox', '', '', '', 56),
 (@iCategoryId, 'sys_template_cache_minify_css_enable', '_adm_stg_cpt_option_sys_template_cache_minify_css_enable', 'on', 'checkbox', '', '', '', 57),
 (@iCategoryId, 'sys_template_cache_minify_css_enable', '_adm_stg_cpt_option_sys_template_cache_minify_css_enable', 'on', 'checkbox', '', '', '', 57),

+ 1 - 2
studio/classes/BxDolStudioToolsAudit.php

@@ -46,7 +46,7 @@ class BxDolStudioToolsAudit extends BxDol
             BX_DOL_AUDIT_OK => _t('_sys_audit_title_ok'),
             BX_DOL_AUDIT_OK => _t('_sys_audit_title_ok'),
         );
         );
 
 
-        $this->sMinPhpVer = '5.3.0';
+        $this->sMinPhpVer = '5.4.0';
         $this->aPhpSettings = array (
         $this->aPhpSettings = array (
             'allow_url_fopen' => array('op' => '=', 'val' => true, 'type' => 'bool'),
             'allow_url_fopen' => array('op' => '=', 'val' => true, 'type' => 'bool'),
             'allow_url_include' => array('op' => '=', 'val' => false, 'type' => 'bool'),
             'allow_url_include' => array('op' => '=', 'val' => false, 'type' => 'bool'),
@@ -569,7 +569,6 @@ class BxDolStudioToolsAudit extends BxDol
     protected function getPhpAccelerator ()
     protected function getPhpAccelerator ()
     {
     {
         $aAccelerators = array (
         $aAccelerators = array (
-            'eAccelerator' => array('op' => 'module', 'val' => 'eaccelerator'),
             'APC' => array('op' => 'module', 'val' => 'apc'),
             'APC' => array('op' => 'module', 'val' => 'apc'),
             'XCache' => array('op' => 'module', 'val' => 'xcache'),
             'XCache' => array('op' => 'module', 'val' => 'xcache'),
         	'ZendOPcache' => array('op' => 'module', 'val' => 'Zend OPcache'),
         	'ZendOPcache' => array('op' => 'module', 'val' => 'Zend OPcache'),