- function cache_replace($search, $replace, $search_key, $array)
- {
- global $ARRAY;
- if ((FILE_READABLE($this->cache_inc)) && (is_writeable($this->cache_inc)))
- {
+ function writeArray ($array) {
+ if (is_resource($this->pointer)) {
+ foreach ($array as $k => $v) {
+ if (is_array($v)) {
+ // Multi line(s) found
+ $LINE = "";
+ foreach($v as $k2 => $v2) {
+ // Put every array element in a row...
+ $LINE .= $this->rewriteEntry($k, $v2);
+ }
+ } else {
+ // Single line found
+ $LINE = $this->rewriteEntry($k, $v);
+ }
+
+ // Write line(s)
+ fwrite($this->pointer, $LINE);
+ } // END - foreach
+ } else {
+ // Cannot write array!
+ ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+ }
+ }
+
+ // Unused method
+ function replaceEntry ($search, $replace, $search_key, $array) {
+ if ((FILE_READABLE($this->inc)) && (is_writeable($this->inc))) {