git-archimport-id: opensource@polytechnique.org--2005/banana--mainline--1.0--patch-11
function _readFromFile()
{
function _readFromFile()
{
- $file = dirname(dirname(__FILE__))."/spool/spool-{$this->group}.dat";
+ $file = $this->_spoolfile();
if (file_exists($file)) {
$this = unserialize(file_get_contents($file));
}
if (file_exists($file)) {
$this = unserialize(file_get_contents($file));
}
- $file = dirname(dirname(__FILE__))."/spool/spool-{$this->group}.dat";
+ $file = $this->_spoolfile();
uasort($this->overview, "spoolcompare");
$this->roots = Array();
uasort($this->overview, "spoolcompare");
$this->roots = Array();
file_put_contents($file, serialize($this));
}
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;
function _updateSpool($arg)
{
global $banana;