#!/usr/bin/php4 page_exists($p)) { $tikilib->create_page($p, 0, 'to do', time(), 'automatic import from RestoreHelp script', 'RestoreHelp', 'RestoreHelp', 'to do'); echo ', not found, is created,'; } if ($structlib->page_is_in_structure($p)) { $alls = $structlib->get_page_structures($p, 'Help'); if (count($alls)) { echo ". It is in Help structure with Id "; echo $alls[0]["req_page_ref_id"]; $tikilib->remove_from_structure($alls[0]["req_page_ref_id"]); echo ": erased and"; } } $afterid = $structlib->s_create_page($structId, $afterid, $p); echo " created with id : $afterid"; echo "\n"; } }