diff --git a/config.ini.php b/config.ini.php index d0f9ca7..842cb98 100644 --- a/config.ini.php +++ b/config.ini.php @@ -8,14 +8,14 @@ DEBUG_MODE = ON [SERVER] -SERVER = 127.0.0.1 +SERVER = localhost PORT = 11211 [AUTH] PASSWORD = 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 [MISC] -PHP_TIMEZONE = Europe/London +PHP_TIMEZONE = UTC diff --git a/delete.php b/delete.php index 3ccec78..46a9c2f 100644 --- a/delete.php +++ b/delete.php @@ -11,19 +11,9 @@ $config = parse_ini_file('config.ini.php', true); - /* - * Because of an API change on Memcache's side, the PHP module's 'delete' - * doesn't work (it hasn't been updated). I've used raw sockets instead. - * - * See http://pecl.php.net/bugs/bug.php?id=16927 for bug report. - */ - - $fs = fsockopen($config['SERVER']['SERVER'], $config['SERVER']['PORT']); - - fwrite($fs, 'delete ' . $_GET['delete_item'] . "\r\n"); - - fclose($fs); - + $MEMCACHE = new Memcache(); + $MEMCACHE->connect($config['SERVER']['SERVER'], $config['SERVER']['PORT']); + $MEMCACHE->delete($_GET['delete_item']); } header("Location: index.php"); diff --git a/scripts/reload.js b/scripts/reload.js index 73f45bf..e7a82cc 100644 --- a/scripts/reload.js +++ b/scripts/reload.js @@ -13,10 +13,14 @@ function setRefreshInterval(){ interval = setInterval('pageReload()', 1000 * document.getElementById('refresh_rate').value); } -function pageReload(){ +function pageReload(flush){ $("img#loading_gif").removeClass("hidden"); - $("div#content").load("viewer.php", colourExpired); + if (flush) + $("div#content").load("viewer.php?flush=1", colourExpired); + else + $("div#content").load("viewer.php", colourExpired); + setTimeout(function(){$("img#loading_gif").addClass("hidden")}, 100); } diff --git a/template/header.html b/template/header.html index 58235aa..8dcfd5d 100644 --- a/template/header.html +++ b/template/header.html @@ -19,6 +19,7 @@