X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=banana%2Fspool.inc.php;h=9e078f24dd12d64b10c9806d3ceeaa8498e9d8a3;hb=9090c67309e46afcb82a2f260ce9d3ecd306e38f;hp=f657d554d596f0bb3f0a2f2d30450663baa57960;hpb=4cc7f7784c76df6d5c618bada3ebc07e8d994849;p=banana.git diff --git a/banana/spool.inc.php b/banana/spool.inc.php index f657d55..9e078f2 100644 --- a/banana/spool.inc.php +++ b/banana/spool.inc.php @@ -124,7 +124,7 @@ class BananaSpool function _readFromFile() { - $file = dirname(dirname(__FILE__))."/spool/spool-{$this->group}.dat"; + $file = $this->_spoolfile(); if (file_exists($file)) { $this = unserialize(file_get_contents($file)); } @@ -132,7 +132,7 @@ class BananaSpool function _saveToFile() { - $file = dirname(dirname(__FILE__))."/spool/spool-{$this->group}.dat"; + $file = $this->_spoolfile(); uasort($this->overview, "spoolcompare"); $this->roots = Array(); @@ -145,6 +145,14 @@ class BananaSpool file_put_contents($file, serialize($this)); } + function _spoolfile() + { + global $banana; + $url = parse_url($banana->host); + $file = $url['host'].'_'.$url['port'].'_'.$this->group; + return dirname(dirname(__FILE__)).'/spool/'.$file; + } + function _updateSpool($arg) { global $banana;