Exemple #1
0
     } else {
         gb::$title[] = $post->title;
     }
     gb::$is_post = true;
     # empty prefix and 404 -- try page
     if (gb::$is_404 === true && gb::$posts_prefix === '') {
         if ($preview_pathspec !== null) {
             $post = GBPage::findByName($preview_pathspec, $version);
         } else {
             $post = GBPage::find(urldecode($gb_request_uri), $version);
         }
         if ($post !== false) {
             gb::$title[] = $post->title;
             gb::$is_404 = false;
         }
         gb::$is_post = false;
         gb::$is_page = true;
     }
 } else {
     # page
     if ($preview_pathspec !== null) {
         $post = GBPage::findByName($preview_pathspec, $version);
     } else {
         $post = GBPage::find(urldecode($gb_request_uri), $version);
     }
     if ($post === false) {
         gb::$is_404 = true;
     } else {
         gb::$title[] = $post->title;
     }
     gb::$is_page = true;