speed hax and niceurl forcing from r34
This commit is contained in:
parent
913bb09cc6
commit
5121e99dbe
4 changed files with 18 additions and 5 deletions
|
@ -500,9 +500,12 @@ class Image {
|
|||
$tmpl = str_replace('$filename', $_escape($base_fname), $tmpl);
|
||||
$tmpl = str_replace('$title', $_escape($config->get_string("title")), $tmpl);
|
||||
|
||||
$plte = new ParseLinkTemplateEvent($tmpl, $this);
|
||||
send_event($plte);
|
||||
$tmpl = $plte->link;
|
||||
// nothing seems to use this, sending the event out to 50 exts is a lot of overhead
|
||||
if(!SPEED_HAX) {
|
||||
$plte = new ParseLinkTemplateEvent($tmpl, $this);
|
||||
send_event($plte);
|
||||
$tmpl = $plte->link;
|
||||
}
|
||||
|
||||
return $tmpl;
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ function make_link($page=null, $query=null) {
|
|||
|
||||
if(is_null($page)) $page = $config->get_string('main_page');
|
||||
|
||||
if($config->get_bool('nice_urls', false)) {
|
||||
if(FORCE_NICE_URLS || $config->get_bool('nice_urls', false)) {
|
||||
#$full = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"];
|
||||
$full = $_SERVER["PHP_SELF"];
|
||||
$base = str_replace("/index.php", "", $full);
|
||||
|
|
|
@ -118,7 +118,15 @@ class CommentListTheme extends Themelet {
|
|||
global $user;
|
||||
|
||||
$tfe = new TextFormattingEvent($comment->comment);
|
||||
send_event($tfe);
|
||||
|
||||
// sending this event to all ~50 exts has a lot of overhead
|
||||
if(SPEED_HAX) {
|
||||
$bb = new BBCode();
|
||||
$bb->receive_event($tfe);
|
||||
}
|
||||
else {
|
||||
send_event($tfe);
|
||||
}
|
||||
|
||||
$i_uid = int_escape($comment->owner_id);
|
||||
$h_name = html_escape($comment->owner_name);
|
||||
|
|
|
@ -59,6 +59,8 @@ define("CACHE_DIR", false);
|
|||
define("VERSION", 'trunk');
|
||||
define("SCORE_VERSION", 's2hack/'.VERSION);
|
||||
define("COOKIE_PREFIX", 'shm');
|
||||
define("SPEED_HAX", false);
|
||||
define("FORCE_NICE_URLS", false);
|
||||
|
||||
if(empty($database_dsn) && !file_exists("config.php")) {
|
||||
header("Location: install.php");
|
||||
|
|
Reference in a new issue