mirror of
https://github.com/typemill/typemill.git
synced 2025-08-07 22:56:32 +02:00
event system and plugins
This commit is contained in:
@@ -18,7 +18,7 @@ class VersionCheck
|
||||
try {
|
||||
$version = file_get_contents('http://typemill.net/tma1/checkversion', false, $context);
|
||||
|
||||
if ($version)
|
||||
if ($version)
|
||||
{
|
||||
$version = json_decode($version);
|
||||
return $version->version;
|
||||
|
@@ -10,7 +10,7 @@ class WriteCache extends Write
|
||||
* @return boolean for an invalid cache (false) and for a valid cache (true).
|
||||
*/
|
||||
public function validate($folderName, $fileName, $duration)
|
||||
{
|
||||
{
|
||||
if(isset($_SERVER['HTTP_CACHE_CONTROL']) && $_SERVER['HTTP_CACHE_CONTROL'] == 'max-age=0')
|
||||
{
|
||||
return false;
|
||||
@@ -26,7 +26,7 @@ class WriteCache extends Write
|
||||
$this->writeFile($folderName, $fileName, time());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$lastRefresh = file_get_contents($folderName . DIRECTORY_SEPARATOR . $fileName);
|
||||
|
||||
if(time() - $lastRefresh > $duration)
|
||||
|
Reference in New Issue
Block a user