Merge branch 'master' of github.com:shish/shimmie2

This commit is contained in:
Shish 2012-01-18 18:00:10 +00:00
commit a75d8744c9
2 changed files with 9 additions and 0 deletions

View File

@ -43,6 +43,14 @@ class Artists implements Extension {
if ($event instanceof PageRequestEvent)
$this->handle_commands($event);
if ($event instanceof SearchTermParseEvent) {
$matches = array();
if(preg_match("/^author=(.*)$/", $event->term, $matches)) {
$char = $matches[1];
$event->add_querylet(new Querylet("Author = :author_char", array("author_char"=>$char)));
}
}
}
public function try_install() {

View File

@ -63,6 +63,7 @@ class BBCode extends FormatterExtension {
$text = preg_replace("/\[li\](.*?)\[\/li\]/s", "<li>\\1</li>", $text);
$text = preg_replace("#\[\*\]#s", "<li>", $text);
$text = preg_replace("#<br><(li|ul|ol|/ul|/ol)>#s", "<\\1>", $text);
$text = preg_replace("#\[align=(left|center|right)\](.*?)\[\/align\]#s", "<div style='text-align:\\1;'>\\2</div>", $text);
$text = $this->filter_spoiler($text);
$text = $this->insert_code($text);
return $text;