includes/template.php
changeset 1068 4bcefa85649c
parent 1066 bead71f28f63
child 1069 d54e7620bd3e
equal deleted inserted replaced
1067:4058c844ee38 1068:4bcefa85649c
  1230       var msg_loading_component = \'' . addslashes($lang->get('ajax_msg_loading_component')) . '\';
  1230       var msg_loading_component = \'' . addslashes($lang->get('ajax_msg_loading_component')) . '\';
  1231       var AES_BITS = '.AES_BITS.';
  1231       var AES_BITS = '.AES_BITS.';
  1232       var AES_BLOCKSIZE = '.AES_BLOCKSIZE.';
  1232       var AES_BLOCKSIZE = '.AES_BLOCKSIZE.';
  1233       var pagepass = \''. ( ( isset($_REQUEST['pagepass']) ) ? sha1($_REQUEST['pagepass']) : '' ) .'\';
  1233       var pagepass = \''. ( ( isset($_REQUEST['pagepass']) ) ? sha1($_REQUEST['pagepass']) : '' ) .'\';
  1234       var ENANO_LANG_ID = ' . $lang->lang_id . ';
  1234       var ENANO_LANG_ID = ' . $lang->lang_id . ';
  1235       var ENANO_PAGE_TYPE = "' . addslashes($this->namespace_string) . '";
  1235       var ENANO_PAGE_TYPE = "' . addslashes($this->namespace_string) . '";';
  1236       var editNotice = \'' . $this->get_wiki_edit_notice() . '\';';
       
  1237     
  1236     
  1238     foreach($paths->nslist as $k => $c)
  1237     foreach($paths->nslist as $k => $c)
  1239     {
  1238     {
  1240       $js_dynamic .= "namespace_list['{$k}'] = '$c';";
  1239       $js_dynamic .= "namespace_list['{$k}'] = '$c';";
  1241     }
  1240     }
  2616     global $cache;
  2615     global $cache;
  2617     
  2616     
  2618     if ( getConfig('wiki_edit_notice', 0) != 1 )
  2617     if ( getConfig('wiki_edit_notice', 0) != 1 )
  2619       return '';
  2618       return '';
  2620     
  2619     
  2621     if ( $cached = $cache->fetch('wiki_edit_notice') )
       
  2622       return $cached;
       
  2623     
       
  2624     $notice = RenderMan::render(getConfig('wiki_edit_notice_text'));
  2620     $notice = RenderMan::render(getConfig('wiki_edit_notice_text'));
  2625     $notice = trim($notice);
       
  2626     $notice = addslashes($notice);
       
  2627     $notice = str_replace("\n\n", "\n", $notice);
       
  2628     $notice = str_replace("\n", "\\\n", $notice);
       
  2629     $cache->store('wiki_edit_notice', $notice, 60);
       
  2630     return $notice;
  2621     return $notice;
  2631   }
  2622   }
  2632   
  2623   
  2633 } // class template
  2624 } // class template
  2634 
  2625