From e6eaec23627d68d7b02a1d0ff6ad1c568bdaaa2a Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Fri, 26 Jul 2024 08:06:35 +0200 Subject: [PATCH] memcached fix in util scripts Signed-off-by: Janos SUTO --- util/automated-search.php | 6 +----- util/daily-report.php | 6 +----- util/generate_stats.php | 5 +---- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/util/automated-search.php b/util/automated-search.php index c2e42067..c628d031 100755 --- a/util/automated-search.php +++ b/util/automated-search.php @@ -135,13 +135,9 @@ $sphx = new DB(SPHINX_DRIVER, SPHINX_HOSTNAME, "", "", SPHINX_DATABASE, ""); Registry::set('sphx', $sphx); - if(MEMCACHED_ENABLED) { $memcache = new Memcached(); - foreach ($memcached_servers as $m){ - $memcache->addServer($m[0], $m[1]); - } - + $memcache->addServer($memcached_server[0], $memcached_server[1]); Registry::set('memcache', $memcache); } diff --git a/util/daily-report.php b/util/daily-report.php index 05551a7a..24e17574 100644 --- a/util/daily-report.php +++ b/util/daily-report.php @@ -60,13 +60,9 @@ Registry::set('admin_user', 1); - if(MEMCACHED_ENABLED) { $memcache = new Memcached(); - foreach ($memcached_servers as $m){ - $memcache->addServer($m[0], $m[1]); - } - + $memcache->addServer($memcached_server[0], $memcached_server[1]); Registry::set('memcache', $memcache); } diff --git a/util/generate_stats.php b/util/generate_stats.php index ffddffe1..c3873482 100644 --- a/util/generate_stats.php +++ b/util/generate_stats.php @@ -55,10 +55,7 @@ if(MEMCACHED_ENABLED) { $memcache = new Memcached(); - foreach ($memcached_servers as $m){ - $memcache->addServer($m[0], $m[1]); - } - + $memcache->addServer($memcached_server[0], $memcached_server[1]); Registry::set('memcache', $memcache); }