We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 2843e2ed authored by Evan Prodromou's avatar Evan Prodromou

force re-render on all notices whether or not they're already rendered

darcs-hash:20080729183154-84dde-680e676d3f1f953ed0a8259598aaee04c012dc60.gz
parent 4577182d
...@@ -35,13 +35,11 @@ $notice = new Notice(); ...@@ -35,13 +35,11 @@ $notice = new Notice();
$cnt = $notice->find(); $cnt = $notice->find();
while ($notice->fetch()) { while ($notice->fetch()) {
if (!$notice->rendered) { common_log(LOG_INFO, 'Pre-rendering notice #' . $notice->id);
common_log(LOG_INFO, 'Pre-rendering notice #' . $notice->id); $original = clone($notice);
$original = clone($notice); $notice->rendered = common_render_content($notice->content, $notice);
$notice->rendered = common_render_content($notice->content, $notice); $result = $notice->update($original);
$result = $notice->update($original); if (!$result) {
if (!$result) { common_log_db_error($notice, 'UPDATE', __FILE__);
common_log_db_error($notice, 'UPDATE', __FILE__);
}
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment