mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-22 14:30:41 -04:00
folding Persistance\TrafficLimiter into Data\Filesystem
This commit is contained in:
parent
3429d293d3
commit
b5a6ce323e
8 changed files with 100 additions and 30 deletions
|
@ -54,7 +54,7 @@ class Model
|
|||
*/
|
||||
public function getPaste($pasteId = null)
|
||||
{
|
||||
$paste = new Paste($this->_conf, $this->_getStore());
|
||||
$paste = new Paste($this->_conf, $this->getStore());
|
||||
if ($pasteId !== null) {
|
||||
$paste->setId($pasteId);
|
||||
}
|
||||
|
@ -67,9 +67,9 @@ class Model
|
|||
public function purge()
|
||||
{
|
||||
PurgeLimiter::setConfiguration($this->_conf);
|
||||
PurgeLimiter::setStore($this->_getStore());
|
||||
PurgeLimiter::setStore($this->getStore());
|
||||
if (PurgeLimiter::canPurge()) {
|
||||
$this->_getStore()->purge($this->_conf->getKey('batchsize', 'purge'));
|
||||
$this->getStore()->purge($this->_conf->getKey('batchsize', 'purge'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ class Model
|
|||
*
|
||||
* @return Data\AbstractData
|
||||
*/
|
||||
private function _getStore()
|
||||
public function getStore()
|
||||
{
|
||||
if ($this->_store === null) {
|
||||
$this->_store = forward_static_call(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue