Indefero

Indefero Commit Details


Date:2008-11-23 04:20:08 (16 years 29 days ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:99dd3aa1d65b11d8c8127bea6a2c457be2dec32f
Parents: d9ffac099f77baed06bc1afc2e99969c062f89eb
Message:Remove the corresponding information from the timeline on deletion.

Changes:

File differences

src/IDF/Timeline.php
130130
131131
132132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
133159
$t->create();
return true;
}
/**
* Remove an item from the timeline.
*
* You must call this function when you delete items wich are
* tracked in the timeline. Just add the call:
*
* IDF_Timeline::remove($this);
*
* in the preDelete() method of your object.
*
* @param mixed Item to be removed
* @return bool Success
*/
public static function insert($item)
{
if ($item->id > 0) {
$sql = new Pluf_SQL('model_id=%s AND model_class=%s',
array($item->id, $item->_model));
$items = Pluf::factory('IDF_Timeline')->getList(array('filter'=>$sql->gen()));
foreach ($items as $tl) {
$tl->delete();
}
}
return true;
}
}
src/IDF/Upload.php
155155
156156
157157
158
159
160
161
162
163
164
165
158166
159167
160168
}
/**
* We drop the information from the timeline.
*/
function preDelete()
{
IDF_Timeline::remove($this);
}
/**
* Returns the timeline fragment for the file.
*
*

Archive Download the corresponding diff file

Page rendered in 0.08138s using 13 queries.