2 Reads the recently updated pages list from the database (like
3 "UpdatedPages") and tries to save it in another database table
4 (this example does so in my privately used webcms for speed purposes).
9 function save_newest_pages()
12 $result = ewiki_db::GETALL(array("lastmodified", "flags", "version"));
13 while ($row = $result->get()) {
14 if (($row["flags"] & EWIKI_DB_F_TYPE) == EWIKI_DB_F_TEXT) {
15 $sorted[$row["id"]] = $row["lastmodified"];
21 foreach ($sorted as $id=>$uu) {
22 $o .= '·<a href="/wiki/?id=' . urlencode($id) . '">' .
23 preg_replace('/(\w{15}[a-zäöüß]*)(\w{3,5})/', '$1­$2', $id) . "</a><br>\n";
24 if ($n++ >= 15) break;
28 mysql_query("UPDATE text_table SET html='$o' WHERE filename='wiki-updated' ")