// Normalize

This commit is contained in:
rMalie
2012-01-25 14:40:12 +00:00
parent 8db038f0e8
commit ccbf3acc8d
21 changed files with 202 additions and 206 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ abstract class CacheCore
// Get all table from the query and save them in cache
if (preg_match_all('/('._DB_PREFIX_.'[a-z_-]*)`?.*/i', $query, $res))
foreach($res[1] as $table)
foreach ($res[1] as $table)
if (!isset($this->sql_tables_cached[$table][$key]))
$this->sql_tables_cached[$table][$key] = true;
$this->set(self::SQL_TABLES_NAME, $this->sql_tables_cached);
+1 -1
View File
@@ -132,7 +132,7 @@ class CacheFsCore extends Cache
if (!$directory)
$directory = _PS_CACHEFS_DIRECTORY_;
$chars = '0123456789abcdef';
for ($i = 0; $i < strlen($chars); $i++)
for ($i = 0, $length = strlen($chars); $i < $length; $i++)
{
$new_dir = $directory.$chars[$i].'/';
if (mkdir($new_dir))
+2 -2
View File
@@ -53,7 +53,7 @@ class CacheMemcacheCore extends Cache
if ($this->memcache->getExtendedStats('cachedump', (int)$slab_id))
foreach ($dump as $entries)
foreach ($entries as $entry)
$this->keys[$entry] = 0;;
$this->keys[$entry] = 0;
}
public function __destruct()
@@ -70,7 +70,7 @@ class CacheMemcacheCore extends Cache
$servers = CacheMemcache::getMemcachedServers();
if (!$servers)
return false;
foreach ($servers AS $server)
foreach ($servers as $server)
$this->memcache->addServer($server['ip'], $server['port'], $server['weight']);
$this->is_connected = true;