equal
deleted
inserted
replaced
132 static $cdata_cache = array(); |
132 static $cdata_cache = array(); |
133 $pathskey = $paths->get_pathskey($this->page_id, $this->namespace); |
133 $pathskey = $paths->get_pathskey($this->page_id, $this->namespace); |
134 if ( isset($cdata_cache[$pathskey]) ) |
134 if ( isset($cdata_cache[$pathskey]) ) |
135 { |
135 { |
136 $this->cdata = $cdata_cache[$pathskey]; |
136 $this->cdata = $cdata_cache[$pathskey]; |
137 $this->exists = $cdata_cache[$pathskey]['page_exists']; |
137 $this->exists =$cdata_cache[$pathskey]['page_exists']; |
138 $this->title = $cdata_cache[$pathskey]['name']; |
138 $this->title = $cdata_cache[$pathskey]['name']; |
139 return null; |
139 return null; |
140 } |
140 } |
141 |
141 |
142 $this->exists = false; |
142 $this->exists = false; |
554 else |
554 else |
555 { |
555 { |
556 $standard_404 .= '<h3>' . $lang->get('page_msg_404_title') . '</h3> |
556 $standard_404 .= '<h3>' . $lang->get('page_msg_404_title') . '</h3> |
557 <p>' . $lang->get('page_msg_404_body'); |
557 <p>' . $lang->get('page_msg_404_body'); |
558 } |
558 } |
559 if ( $session->get_permissions('create_page') ) |
559 if ( $session->check_acl_scope('create_page', $this->namespace) && $session->get_permissions('create_page') ) |
560 { |
560 { |
561 $standard_404 .= ' ' . $lang->get('page_msg_404_create', array( |
561 $standard_404 .= ' ' . $lang->get('page_msg_404_create', array( |
562 'create_flags' => 'href="'.makeUrlNS($this->namespace, $this->page_id, 'do=edit', true).'" onclick="ajaxEditor(); return false;"', |
562 'create_flags' => 'href="'.makeUrlNS($this->namespace, $this->page_id, 'do=edit', true).'" onclick="ajaxEditor(); return false;"', |
563 'mainpage_link' => makeUrl(get_main_page(), false, true) |
563 'mainpage_link' => makeUrl(get_main_page(), false, true) |
564 )); |
564 )); |
568 $standard_404 .= ' ' . $lang->get('page_msg_404_gohome', array( |
568 $standard_404 .= ' ' . $lang->get('page_msg_404_gohome', array( |
569 'mainpage_link' => makeUrl(get_main_page(), false, true) |
569 'mainpage_link' => makeUrl(get_main_page(), false, true) |
570 )); |
570 )); |
571 } |
571 } |
572 $standard_404 .= '</p>'; |
572 $standard_404 .= '</p>'; |
573 if ( $session->get_permissions('history_rollback') ) |
573 if ( $session->check_acl_scope('history_rollback', $this->namespace) && $session->get_permissions('history_rollback') ) |
574 { |
574 { |
575 $e = $db->sql_query('SELECT * FROM ' . table_prefix . 'logs WHERE action=\'delete\' AND page_id=\'' . $this->page_id . '\' AND namespace=\'' . $this->namespace . '\' ORDER BY time_id DESC;'); |
575 $e = $db->sql_query('SELECT * FROM ' . table_prefix . 'logs WHERE action=\'delete\' AND page_id=\'' . $this->page_id . '\' AND namespace=\'' . $this->namespace . '\' ORDER BY time_id DESC;'); |
576 if ( !$e ) |
576 if ( !$e ) |
577 { |
577 { |
578 $db->_die('The deletion log could not be selected.'); |
578 $db->_die('The deletion log could not be selected.'); |
759 else |
759 else |
760 { |
760 { |
761 $html .= $lang->get('catedit_catbox_lbl_uncategorized'); |
761 $html .= $lang->get('catedit_catbox_lbl_uncategorized'); |
762 } |
762 } |
763 |
763 |
764 $can_edit = ( $session->get_permissions('edit_cat') && ( !$paths->page_protected || $session->get_permissions('even_when_protected') ) ); |
764 $can_edit = ( $session->check_acl_scope('edit_cat', $this->namespace) && $session->get_permissions('edit_cat') && ( !$paths->page_protected || $session->get_permissions('even_when_protected') ) ); |
765 if ( $can_edit ) |
765 if ( $can_edit ) |
766 { |
766 { |
767 $edit_link = '<a href="' . makeUrl($paths->page, 'do=catedit', true) . '" onclick="ajaxCatEdit(); return false;">' . $lang->get('catedit_catbox_link_edit') . '</a>'; |
767 $edit_link = '<a href="' . makeUrl($paths->page, 'do=catedit', true) . '" onclick="ajaxCatEdit(); return false;">' . $lang->get('catedit_catbox_link_edit') . '</a>'; |
768 $html .= ' [ ' . $edit_link . ' ]'; |
768 $html .= ' [ ' . $edit_link . ' ]'; |
769 } |
769 } |