1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 07:36:32 +02:00

Allow for non-hashed cache files. File-Handler getRemoteContent() debugging methods added.

This commit is contained in:
Cameron
2016-06-01 08:58:32 -07:00
parent 26636f318c
commit f259efec1f
3 changed files with 23 additions and 6 deletions

View File

@@ -43,9 +43,9 @@ class ecache {
/** /**
* Set the MD5 Hash * Set the MD5 Hash
*/ */
public function setMD5($text) public function setMD5($text, $hash=true)
{ {
$this->CachePageMD5 = md5($text); $this->CachePageMD5 = ($hash === true) ? md5($text) : $text;
return $this; return $this;
} }

View File

@@ -101,6 +101,11 @@ class e_file
private $authKey = false; // Used when retrieving files from e107.org. private $authKey = false; // Used when retrieving files from e107.org.
private $error = null;
private $errornum = null;
/** /**
* Constructor * Constructor
*/ */
@@ -170,6 +175,17 @@ class e_file
} }
public function getErrorMessage()
{
return $this->error;
}
public function getErrorCode()
{
return $this->errornum;
}
/** /**
* Read files from given path * Read files from given path

View File

@@ -925,7 +925,8 @@ class e_media
} }
$cache = e107::getCache(); $cache = e107::getCache();
$cache->setMD5('_'.$prefix.$type); $cachTag = !empty($prefix) ? "glyphs_".$prefix : "glyphs";
$cache->setMD5($cachTag, false);
if($data = $cache->retrieve($type,360,true)) if($data = $cache->retrieve($type,360,true))
{ {