mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-04-26 22:56:27 -04:00
replaced the term "paste" with the more generic "document"
kudos @Ribas160
This commit is contained in:
@@ -88,7 +88,7 @@ abstract class AbstractModel
|
||||
public function setId($id)
|
||||
{
|
||||
if (!self::isValidId($id)) {
|
||||
throw new Exception('Invalid paste ID.', 60);
|
||||
throw new Exception('Invalid document ID.', 60);
|
||||
}
|
||||
$this->_id = $id;
|
||||
}
|
||||
@@ -129,14 +129,6 @@ abstract class AbstractModel
|
||||
*/
|
||||
abstract public function store();
|
||||
|
||||
/**
|
||||
* Delete the current instance.
|
||||
*
|
||||
* @access public
|
||||
* @throws Exception
|
||||
*/
|
||||
abstract public function delete();
|
||||
|
||||
/**
|
||||
* Test if current instance exists in store.
|
||||
*
|
||||
|
||||
+1
-12
@@ -71,17 +71,6 @@ class Comment extends AbstractModel
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the comment.
|
||||
*
|
||||
* @access public
|
||||
* @throws Exception
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
throw new Exception('To delete a comment, delete its parent paste', 64);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if comment exists in store.
|
||||
*
|
||||
@@ -131,7 +120,7 @@ class Comment extends AbstractModel
|
||||
public function setParentId($id)
|
||||
{
|
||||
if (!self::isValidId($id)) {
|
||||
throw new Exception('Invalid paste ID.', 65);
|
||||
throw new Exception('Invalid document ID.', 65);
|
||||
}
|
||||
$this->_data['parentid'] = $id;
|
||||
}
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ class Paste extends AbstractModel
|
||||
$this->_data
|
||||
) === false
|
||||
) {
|
||||
throw new Exception('Error saving paste. Sorry.', 76);
|
||||
throw new Exception('Error saving document. Sorry.', 76);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user