mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-06-04 13:09:05 -04:00
removing dead code and improving code coverage
This commit is contained in:
parent
5b67721a6a
commit
be1e7babc0
5 changed files with 19 additions and 21 deletions
|
@ -145,7 +145,7 @@ class Comment extends AbstractModel
|
|||
public function getParentId()
|
||||
{
|
||||
if (!array_key_exists('parentid', $this->_data)) {
|
||||
$this->_data['parentid'] = '';
|
||||
$this->_data['parentid'] = $this->getPaste()->getId();
|
||||
}
|
||||
return $this->_data['parentid'];
|
||||
}
|
||||
|
|
|
@ -183,23 +183,6 @@ class Paste extends AbstractModel
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if paste is of burn-after-reading type.
|
||||
*
|
||||
* @access public
|
||||
* @throws Exception
|
||||
* @return bool
|
||||
*/
|
||||
public function isBurnafterreading()
|
||||
{
|
||||
if (!array_key_exists('adata', $this->_data) && !array_key_exists('data', $this->_data)) {
|
||||
$this->get();
|
||||
}
|
||||
return
|
||||
(array_key_exists('adata', $this->_data) && $this->_data['adata'][3] === 1) ||
|
||||
(array_key_exists('burnafterreading', $this->_data['meta']) && $this->_data['meta']['burnafterreading']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if paste has discussions enabled.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue