2 # this file contains various useful helper functions, to interfer
3 # with the ewiki database from within another site engine
5 # may be there is something useful in here for you, too
10 function save_newest_pages()
13 foreach (ewiki_database("GETALL", array("lastmodified", "flags", "version")) as $row) {
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' ")