Пример #1
0
function xanth_page_page_creation($hook_primary_id, $hook_secondary_id)
{
    //retrieve path
    $path = xXanthPath::get_current();
    if ($path == NULL) {
        xanth_log(LOG_LEVEL_ERROR, 'Invalid xanth path', 'page', __FUNCTION__);
    }
    $page = new xPage($path);
    echo $page->render();
}
Пример #2
0
 /**
  * Return a valid xCmsPath object on success, false on parsing error.
  */
 function get_current()
 {
     if (isset($_GET['p'])) {
         $p = $_GET['p'];
     } else {
         return new xXanthPath();
     }
     return xXanthPath::_parse($p);
 }