Skip to content

Commit 0966526

Browse files
committed
Changed sPath for cachefile to full path
1 parent 4069ace commit 0966526

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

syntax.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ public function render($mode, Doku_Renderer $renderer, $data) {
130130
// SQLCOMP FUNCTONS
131131
//------------------------------------------------------------------------//
132132

133-
private $sPath = "data/cache/sql/";
134-
135133
/**
136134
* Layout
137135
*/
@@ -219,8 +217,6 @@ private function _save($filename,$rs,$timestamp){
219217
$handle = fopen($filename,"w");
220218
fwrite($handle,$Cache);
221219
fclose($handle);
222-
223-
224220
}
225221

226222
private function _query($data,$type=null) {
@@ -237,13 +233,14 @@ private function _query($data,$type=null) {
237233

238234
$Update = false;
239235
if($opts['refresh'] > 0) {
240-
if(!is_dir($this->sPath)) {
241-
if (!@mkdir($this->sPath)) {
236+
$sPath = DOKU_INC . "data/cache/sql/";
237+
if(!is_dir($sPath)) {
238+
if (!@mkdir($sPath)) {
242239
msg($this->_error($this->getLang("cachedir")), -1);
243240
return;
244241
}
245242
}
246-
$filename = $this->sPath.md5(implode('',$dbcon));
243+
$filename = $sPath.md5(implode('',$dbcon));
247244
$Cache = $this->_load($filename);
248245
$Update = true;
249246
if(is_array($Cache)){

0 commit comments

Comments
 (0)