commit 199220fcf5ad450a60ae3d8507475366949afcae
parent 3281b73bf8f24075412a96039d7a6f983f1c887a
Author: Jan Dankert <devnull@localhost>
Date: Thu, 1 Dec 2011 22:58:56 +0100
Neue Methode \"nextSubAction()\", Aktivieren der Suche.
Diffstat:
3 files changed, 38 insertions(+), 6 deletions(-)
diff --git a/action/Action.class.php b/action/Action.class.php
@@ -558,6 +558,22 @@ class Action
/**
+ * Ruft eine weitere Subaction auf.
+ *
+ * @param String $subActionName Name der n�chsten Subaction. Es muss eine Methode mit diesem Namen geben.
+ */
+ protected function nextSubAction( $subActionName )
+ {
+ $this->subActionName = $subActionName;
+
+ Logger::trace("next subaction is '$subActionName'");
+
+ $methodName = $subActionName.($_SERVER['REQUEST_METHOD'] == 'POST'?'Post':'View');
+ $this->$methodName();
+ }
+
+
+ /**
* Ermitteln, ob Benutzer Administratorrechte besitzt
* @return Boolean TRUE, falls der Benutzer ein Administrator ist.
*/
diff --git a/action/LanguageAction.class.php b/action/LanguageAction.class.php
@@ -158,6 +158,11 @@ class LanguageAction extends Action
$this->language->delete();
}
+
+ function propView()
+ {
+ $this->nextSubAction('advanced');
+ }
/**
* Speichern der Sprache
diff --git a/action/SearchAction.class.php b/action/SearchAction.class.php
@@ -38,11 +38,22 @@ class SearchAction extends Action
}
+ public function showView()
+ {
+ $this->nextSubAction('content');
+ }
+
+ public function showAction()
+ {
+ $this->nextSubAction('content');
+ }
+
+
/**
* Durchf?hren der Suche
* und Anzeige der Ergebnisse
*/
- function searchcontent()
+ public function contentPost()
{
global $conf_php;
@@ -82,7 +93,7 @@ class SearchAction extends Action
/**
*
*/
- function explainResult( $listObjectIds, $listTemplateIds )
+ private function explainResult( $listObjectIds, $listTemplateIds )
{
$resultList = array();
@@ -122,7 +133,7 @@ class SearchAction extends Action
* Durchf?hren der Suche
* und Anzeige der Ergebnisse
*/
- function searchprop()
+ public function propPost()
{
global $conf_php;
@@ -177,7 +188,7 @@ class SearchAction extends Action
* Durchf?hren der Suche
* und Anzeige der Ergebnisse
*/
- function quicksearchView()
+ public function quicksearchView()
{
global $conf;
@@ -247,7 +258,7 @@ class SearchAction extends Action
}
- function prop()
+ public function propView()
{
$user = Session::getUser();
$this->setTemplateVar( 'users' ,User::listAll() );
@@ -255,7 +266,7 @@ class SearchAction extends Action
}
- function content()
+ public function contentView()
{
$user = Session::getUser();
$this->setTemplateVar( 'users' ,User::listAll() );