/mvc/models/sitemap
[return to app]1
<?php
2 /**
3 * Retrieve the page URLs required to build a sitemap
4 */
5 class sitemapModel extends model {
6 /**
7 * Retrieve the URLs. Adjust this for your application.
8 *
9 * By default this only returns your wiki-generated pages (if there are any)
10 *
11 * @return array
12 */
13 public function getUrls() {
14 $sql = 'select controller, wikiaction from wikicache';
15 if ($res = $this->db->query($sql)) {
16 while ($row = $res->fetch_assoc()) {
17 $return[] = $row['controller'] . ($row['wikiaction'] != 'index' ? '/' . $row['wikiaction'] : '');
18 }
19 }
20 return (isset($return) ? $return : array());
21 }
22 }