Пример #1
0
     $final_path = 'lightbox';
 } else {
     $final_path = $page['template'];
 }
 $info = isset($page_types[$page['template']]) ? $page_types[$page['template']] : array();
 if (!empty($matches[1])) {
     foreach ($match_variables as $index => $name) {
         // For some reason double urldecoding is necessary for rewritten URLs
         if (isset($matches[$index + 1]) && !empty($matches[$index + 1])) {
             $routed_variables[$name] = urldecode(urldecode($matches[$index + 1]));
         }
     }
     $identifiers = array('id', 'slug', 'content_id', 'content_slug', 'album_id', 'album_slug');
     foreach ($identifiers as $identifier) {
         if (isset($routed_variables[$identifier]) && preg_match('/[a-z0-9]{32}/', $routed_variables[$identifier])) {
             Koken::$public = false;
             break;
         }
     }
 }
 if ($redirect) {
     if (strpos($redirect, 'soft:') !== false) {
         $redirect_type = '302 Moved Temporarily';
         $redirect = str_replace('soft:', '', $redirect);
     } else {
         $redirect_type = '301 Moved Permanently';
     }
     if (strpos($redirect, '/') === 0) {
         $redirect_to = $redirect;
     } else {
         $redirect_to = Koken::$site['urls'][$redirect];