1
0
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:
Sebastian
2017-11-17 17:44:02 +01:00
parent 53aaba7a57
commit f3f2c0cb07
45 changed files with 3654 additions and 130 deletions

View File

@@ -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;

View File

@@ -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)