revert SCM screwup

This commit is contained in:
Shish
2008-12-14 15:57:26 -08:00
parent 69eab596b4
commit dfa7c32a22
5 changed files with 34 additions and 16 deletions

View File

@@ -9,7 +9,7 @@
class Tagger implements Extension {
var $theme;
public function receive_event ($event) {
public function receive_event(Event $event) {
if(is_null($this->theme))
$this->theme = get_theme_object($this);
@@ -43,10 +43,7 @@ add_event_listener(new Tagger());
// Tagger AJAX back-end
class TaggerXML implements Extension {
public function receive_event(Event $event) {
if(($event instanceof PageRequestEvent)
&& $event->page_name == "tagger"
&& $event->get_arg(0) == "tags")
{
if(($event instanceof PageRequestEvent) && $event->page_matches("tagger/tags")) {
global $page;
//$match_tags = null;
@@ -55,9 +52,9 @@ class TaggerXML implements Extension {
if (isset($_GET['s'])) { // tagger/tags[/...]?s=$string
// return matching tags in XML form
$tags = $this->match_tag_list($_GET['s']);
} else if($event->get_arg(1)) { // tagger/tags/$int
} else if($event->get_arg(0)) { // tagger/tags/$int
// return arg[1] AS image_id's tag list in XML form
$tags = $this->image_tag_list($event->get_arg(1));
$tags = $this->image_tag_list($event->get_arg(0));
}
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n".