From 42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 1 Oct 2014 11:30:27 +0200 Subject: Many PHPDocs, some unused and dyn declared vars many PHPDocs some unused variables some dynamically declared variables declared --- inc/actions.php | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index 5cf63a6ca..68b71a36a 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -221,6 +221,9 @@ function act_sendheaders($headers) { * Sanitize the action command * * @author Andreas Gohr + * + * @param array|string $act + * @return string */ function act_clean($act){ // check if the action was given as array key @@ -245,6 +248,9 @@ function act_clean($act){ * Add all allowed commands here. * * @author Andreas Gohr + * + * @param array|string $act + * @return string */ function act_validate($act) { global $conf; @@ -284,10 +290,12 @@ function act_validate($act) { * Run permissionchecks * * @author Andreas Gohr + * + * @param string $act action command + * @return string action command */ function act_permcheck($act){ global $INFO; - global $conf; if(in_array($act,array('save','preview','edit','recover'))){ if($INFO['exists']){ @@ -330,6 +338,9 @@ function act_permcheck($act){ * Handle 'draftdel' * * Deletes the draft for the current page and user + * + * @param string $act action command + * @return string action command */ function act_draftdel($act){ global $INFO; @@ -342,6 +353,9 @@ function act_draftdel($act){ * Saves a draft on preview * * @todo this currently duplicates code from ajax.php :-/ + * + * @param string $act action command + * @return string action command */ function act_draftsave($act){ global $INFO; @@ -372,6 +386,9 @@ function act_draftsave($act){ * returns a new action. * * @author Andreas Gohr + * + * @param string $act action command + * @return string action command */ function act_save($act){ global $ID; @@ -410,6 +427,9 @@ function act_save($act){ * Revert to a certain revision * * @author Andreas Gohr + * + * @param string $act action command + * @return string action command */ function act_revert($act){ global $ID; @@ -457,6 +477,9 @@ function act_revert($act){ * Do a redirect after receiving post data * * Tries to add the section id as hash mark after section editing + * + * @param string $id page id + * @param string $preact action command before redirect */ function act_redirect($id,$preact){ global $PRE; @@ -478,7 +501,7 @@ function act_redirect($id,$preact){ /** * Execute the redirect * - * @param array $opts id and fragment for the redirect + * @param array $opts id and fragment for the redirect and the preact */ function act_redirect_execute($opts){ $go = wl($opts['id'],'',true); @@ -492,6 +515,9 @@ function act_redirect_execute($opts){ * Handle 'login', 'logout' * * @author Andreas Gohr + * + * @param string $act action command + * @return string action command */ function act_auth($act){ global $ID; @@ -527,6 +553,9 @@ function act_auth($act){ * Handle 'edit', 'preview', 'recover' * * @author Andreas Gohr + * + * @param string $act action command + * @return string action command */ function act_edit($act){ global $ID; @@ -591,6 +620,9 @@ function act_edit($act){ * * @author Andreas Gohr * @author Michael Klier + * + * @param string $act action command + * @return string action command */ function act_export($act){ global $ID; @@ -671,6 +703,8 @@ function act_export($act){ * Handle sitemap delivery * * @author Michael Hamann + * + * @param string $act action command */ function act_sitemap($act) { global $conf; @@ -719,6 +753,10 @@ function act_sitemap($act) { * Throws exception on error. * * @author Adrian Lang + * + * @param string $act action command + * @return string action command + * @throws Exception if (un)subscribing fails */ function act_subscription($act){ global $lang; @@ -778,6 +816,9 @@ function act_subscription($act){ * default action for the event ACTION_HANDLE_SUBSCRIBE. * * @author Adrian Lang + * + * @param array &$params the parameters: target, style and action + * @throws Exception */ function subscription_handle_post(&$params) { global $INFO; -- cgit v1.2.3