e = get_extension((int)safe_get("id")); if ($this->e == null) { header("Location: index.html"); break; } $this->page = safe_get("page"); $this->rev = safe_get("rev"); $this->diff = safe_get("diff"); $this->undo_rev = safe_get("undo"); } public function is_submitted() { return false;//($this->undo_rev != ""); } public function output() { if ($this->rev != "") $this->output_rev(); else if ($this->diff != "") $this->output_diff(); else if ($this->undo_rev != "") $this->output_undo(); else $this->output_history(); } public function go() { if ($this->undo_rev != "") return $this->undo(); return true; } private function output_rev() { $a = html::a( make_ext_link($this->e->id(), $this->page), $this->page); echo html::wrap_div("bt_ext_old_rev", sprintf(loc("ext_old_rev"), $a)); echo wiki::page($this->page, $this->rev); } private function output_diff() { echo wiki::diff($this->page, $this->diff); } private function output_undo() { echo wiki::diff($this->page, $this->undo_rev, "cur"); } private function output_history() { $title = sprintf( loc("ext_history"), html::a("ext.html?id=" . $this->e->id(), $this->page)); echo " " . html::wrap_div("ext_history_title", $title) . "
" . loc("ext_history_time") . " | " . loc("ext_history_user") . " | " . loc("ext_history_comment") . " | |
---|---|---|---|
" . $diff . " | " . html::a($url, make_simple_date($e["time"])) . " | " . $e["user"] . " | " . $c . " |