function folio_control_breadcrumb_recursive_find($page_ident, $url, $username) { // Find the root page information. $page = folio_page_select($page_ident); if (!$page) { // No results returned. Silent fail, as this could be a new record. return ''; } else { // Test for exit condition if ($page->parentpage_ident == -1 || $page->parentpage_ident == $page->page_ident) { // Exit, we've reach the homepage. return "<a href='{$url}{$username}/page/" . folio_page_encodetitle($page->title) . "'>" . stripslashes($page->title) . "</a> > "; } else { // Recurse. return folio_control_breadcrumb_recursive_find($page->parentpage_ident, $url, $username) . "<a href='{$url}{$username}/page/" . folio_page_encodetitle($page->title) . "'>" . stripslashes($page->title) . "</a> > "; } } }
if ($page) { $page_title = $page->title; $page_ident = $page->page_ident; } else { // Homepage hasn't been created yet. $page_title = 'Home Page'; $page_ident = -1; error('You can not view history for the Homepage when it has not yet been created'); } } else { // Transate the page & user vars into an int $page_ident $page_ident = folio_page_translatetitle($username, $page_title); } // If we found a matching page, retrieve record & permissions. if ($page_ident != -1) { $page = folio_page_select($page_ident); $permissions = folio_page_security_select($page_ident); } else { $page = false; $permissions = false; } // Test to see if we have permissions $ok = folio_page_permission($page, $permissions, 'read', $profile_id); // If we have permissions to view the page, then continue loading controls. // Also has the side effect of not loading other controls if the page hasn't been // created yet. if ($ok && $page) { // Run the command to actually retrieve the content. $body = folio_control_historypagelist($username, $page, $page_owner); // Reset the side menu after defining the comment on variables. $comment_on_type = 'page';
$page = folio_homepage($username); if ($page) { $page_title = $page->title; $page_ident = $page->page_ident; } else { // Homepage hasn't been created yet. $page_title = 'Home Page'; $page_ident = -1; } } else { // Transate the page & user vars into an int $page_ident $page_ident = folio_page_translatetitle($username, $page_title); } // If we found a matching page, retrieve record & permissions. if ($page_ident != -1) { $page = folio_page_select($page_ident, -1); $permissions = folio_page_security_select($page_ident); } else { $page = false; $permissions = false; } // Test to see if we have permissions $ok = folio_page_permission($page, $permissions, 'read', $profile_id); // If we have permissions to view the page, then continue loading controls. // Also has the side effect of not loading other controls if the page hasnt' been // created yet. if ($ok) { // Reset the side menu after defining the comment on variables. $comment_on_type = 'page'; $comment_on_ident = $page_ident; $comment_on_username = $username;