From 038611bcb46c607851e04dcde813be012db5efb7 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Mon, 28 Dec 2015 03:17:55 +0100 Subject: [PATCH] add documentation --- boot.php | 12 +++++++++++- mod/help.php | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/boot.php b/boot.php index a51b7a42bd..4e6c9cf214 100644 --- a/boot.php +++ b/boot.php @@ -1961,11 +1961,21 @@ function current_load() { return max($load_arr); } -// much better way of dealing with c-style args +/** + * @brief get c-style args + * + * @return int + */ function argc() { return get_app()->argc; } +/** + * @brief Returns the value of a argv key + * + * @param int $x argv key + * @return string Value of the argv key + */ function argv($x) { if(array_key_exists($x,get_app()->argv)) return get_app()->argv[$x]; diff --git a/mod/help.php b/mod/help.php index ebade07ea7..974577876d 100644 --- a/mod/help.php +++ b/mod/help.php @@ -28,6 +28,8 @@ function help_content(&$a) { if ($a->argc > 1) { $path = ''; + // looping through the argv keys bigger than 0 to build + // a path relative to /help for($x = 1; $x < argc(); $x ++) { if(strlen($path)) $path .= '/';