various fix backports

git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.2@1006 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2008-08-26 09:06:29 +00:00
parent 9d868750e2
commit 90fcccdab0
4 changed files with 3 additions and 6 deletions

View File

@ -71,8 +71,6 @@ class GenericPage {
// ============================================== // ==============================================
public function display() { public function display() {
global $config;
header("Content-type: {$this->type}"); header("Content-type: {$this->type}");
switch($this->mode) { switch($this->mode) {

View File

@ -174,8 +174,6 @@ function _count_execs($db, $sql, $inputarray) {
} }
function get_theme_object($file, $class) { function get_theme_object($file, $class) {
global $config;
$theme = $config->get_string("theme", "default");
if(class_exists("Custom$class")) { if(class_exists("Custom$class")) {
$class = "Custom$class"; $class = "Custom$class";
return new $class(); return new $class();

View File

@ -16,8 +16,8 @@ class BBCode extends Extension {
$text = preg_replace("/\[code\](.*?)\[\/code\]/s", "<pre>\\1</pre>", $text); $text = preg_replace("/\[code\](.*?)\[\/code\]/s", "<pre>\\1</pre>", $text);
$text = preg_replace("/&gt;&gt;(\d+)/s", "<a href='".make_link("post/view/\\1")."'>&gt;&gt;\\1</a>", $text); $text = preg_replace("/&gt;&gt;(\d+)/s", "<a href='".make_link("post/view/\\1")."'>&gt;&gt;\\1</a>", $text);
$text = preg_replace("/&gt;&gt;([^\d].+)/", "<blockquote><small>\\1</small></blockquote>", $text); $text = preg_replace("/&gt;&gt;([^\d].+)/", "<blockquote><small>\\1</small></blockquote>", $text);
$text = preg_replace("/\[url=((?:https?|ftp|irc):\/\/.*?)\](.*?)\[\/url\]/s", "<a href='\\1'>\\2</a>", $text); $text = preg_replace("/\[url=((?:https?|ftp|irc|mailto):\/\/.*?)\](.*?)\[\/url\]/s", "<a href='\\1'>\\2</a>", $text);
$text = preg_replace("/\[url\]((?:https?|ftp|irc):\/\/.*?)\[\/url\]/s", "<a href='\\1'>\\1</a>", $text); $text = preg_replace("/\[url\]((?:https?|ftp|irc|mailto):\/\/.*?)\[\/url\]/s", "<a href='\\1'>\\1</a>", $text);
$text = preg_replace("/\[\[([^\|\]]+)\|([^\]]+)\]\]/s", "<a href='".make_link("wiki/\\1")."'>\\2</a>", $text); $text = preg_replace("/\[\[([^\|\]]+)\|([^\]]+)\]\]/s", "<a href='".make_link("wiki/\\1")."'>\\2</a>", $text);
$text = preg_replace("/\[\[([^\]]+)\]\]/s", "<a href='".make_link("wiki/\\1")."'>\\1</a>", $text); $text = preg_replace("/\[\[([^\]]+)\]\]/s", "<a href='".make_link("wiki/\\1")."'>\\1</a>", $text);
$text = str_replace("\n", "\n<br>", $text); $text = str_replace("\n", "\n<br>", $text);

View File

@ -41,6 +41,7 @@ class CustomIndexTheme extends IndexTheme {
<p><form action='$h_search_link' method='GET'> <p><form action='$h_search_link' method='GET'>
<input name='search' type='text' <input name='search' type='text'
value='$h_search_string' autocomplete='off' /> value='$h_search_string' autocomplete='off' />
<input type='hidden' name='q' value='/post/list'>
<input type='submit' value='Find' style='display: none;' /> <input type='submit' value='Find' style='display: none;' />
</form> </form>
<div id='search_completions'></div>"; <div id='search_completions'></div>";