tiki_links rebuilding Posted by amadeus_ 01 Oct 2005 16:36 UTC Does anyone know of a way to rebuild all the wiki links in the "tiki_links" table if it's gotten confused?
Posted by sylvie greverend 03 Oct 2005 10:47 UTC SO far I know, no If you can write some php.... use $tikilib->list_pages , $tikilib->get_pages and $tikilib->replace_link functions (see an exemple in the function update_page in tikilib.php)
Posted by amadeus_ 03 Oct 2005 12:27 UTC Thanks Sylvie. I used the following quick hack to rebuild my tiki_links table. Copy to clipboardglobal $tikilib; // Clear all links... $query = "delete from `tiki_links`"; $result = $tikilib->query($query); // Rebuild all links... $pages = $tikilib->list_pages(); foreach($pages['data'] as $page){ $data = $tikilib->get_page_info($page['pageName']); $links = $tikilib->get_pages($data['data']); foreach($links as $link){ $tikilib->replace_link($page['pageName'],$link); } } Seems to have worked fine.
Posted by Carsten Schmitz 25 Jan 2008 14:51 UTC Hi! I attached a working PHP file to rebuild the links. Regards Carsten rebuild_links.php (604 b)