Fixed function name and add the timeline cleaning for wikirev/page deletion.
This commit is contained in:
parent
99dd3aa1d6
commit
b03422fc18
@ -144,7 +144,7 @@ class IDF_Timeline extends Pluf_Model
|
|||||||
* @param mixed Item to be removed
|
* @param mixed Item to be removed
|
||||||
* @return bool Success
|
* @return bool Success
|
||||||
*/
|
*/
|
||||||
public static function insert($item)
|
public static function remove($item)
|
||||||
{
|
{
|
||||||
if ($item->id > 0) {
|
if ($item->id > 0) {
|
||||||
$sql = new Pluf_SQL('model_id=%s AND model_class=%s',
|
$sql = new Pluf_SQL('model_id=%s AND model_class=%s',
|
||||||
|
@ -135,6 +135,14 @@ class IDF_WikiPage extends Pluf_Model
|
|||||||
return Pluf_Text::cleanString(html_entity_decode($str, ENT_QUOTES, 'UTF-8'));
|
return Pluf_Text::cleanString(html_entity_decode($str, ENT_QUOTES, 'UTF-8'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We drop the information from the timeline.
|
||||||
|
*/
|
||||||
|
function preDelete()
|
||||||
|
{
|
||||||
|
IDF_Timeline::remove($this);
|
||||||
|
}
|
||||||
|
|
||||||
function get_current_revision()
|
function get_current_revision()
|
||||||
{
|
{
|
||||||
$db = $this->getDbConnection();
|
$db = $this->getDbConnection();
|
||||||
|
@ -111,6 +111,14 @@ class IDF_WikiRevision extends Pluf_Model
|
|||||||
return $this->content;
|
return $this->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We drop the information from the timeline.
|
||||||
|
*/
|
||||||
|
function preDelete()
|
||||||
|
{
|
||||||
|
IDF_Timeline::remove($this);
|
||||||
|
}
|
||||||
|
|
||||||
function preSave($create=false)
|
function preSave($create=false)
|
||||||
{
|
{
|
||||||
if ($this->id == '') {
|
if ($this->id == '') {
|
||||||
|
Loading…
Reference in New Issue
Block a user