diff --git a/lib/Data/AbstractData.php b/lib/Data/AbstractData.php index 5631d87..688954e 100644 --- a/lib/Data/AbstractData.php +++ b/lib/Data/AbstractData.php @@ -13,7 +13,7 @@ namespace PrivateBin\Data; /** - * privatebin_abstract + * AbstractData * * Abstract model for PrivateBin data access, implemented as a singleton. */ @@ -24,7 +24,7 @@ abstract class AbstractData * * @access protected * @static - * @var privatebin_abstract + * @var AbstractData */ protected static $_instance = null; diff --git a/lib/Model/AbstractModel.php b/lib/Model/AbstractModel.php index 767e7d1..7f3c669 100644 --- a/lib/Model/AbstractModel.php +++ b/lib/Model/AbstractModel.php @@ -45,7 +45,7 @@ abstract class AbstractModel * Configuration. * * @access protected - * @var configuration + * @var Configuration */ protected $_conf; @@ -53,7 +53,7 @@ abstract class AbstractModel * Data storage. * * @access protected - * @var privatebin_abstract + * @var AbstractData */ protected $_store; @@ -61,11 +61,11 @@ abstract class AbstractModel * Instance constructor. * * @access public - * @param configuration $configuration - * @param privatebin_abstract $storage + * @param Configuration $configuration + * @param AbstractData $storage * @return void */ - public function __construct(configuration $configuration, AbstractData $storage) + public function __construct(Configuration $configuration, AbstractData $storage) { $this->_conf = $configuration; $this->_store = $storage; diff --git a/lib/Persistence/PurgeLimiter.php b/lib/Persistence/PurgeLimiter.php index c76a4d9..e52d43c 100644 --- a/lib/Persistence/PurgeLimiter.php +++ b/lib/Persistence/PurgeLimiter.php @@ -74,12 +74,9 @@ class PurgeLimiter extends AbstractPersistence $file = 'purge_limiter.php'; $now = time(); + $content = '_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'privatebin_data'; + if (!is_dir($this->_path)) mkdir($this->_path); + ServerSalt::setPath($this->_path); $options = parse_ini_file(CONF, true); $options['purge']['limit'] = 0; $options['model'] = array( @@ -37,6 +43,8 @@ class ModelTest extends PHPUnit_Framework_TestCase public function tearDown() { /* Tear Down Routine */ + Helper::confRestore(); + Helper::rmDir($this->_path); } public function testBasicWorkflow()