aboutsummaryrefslogtreecommitdiffstats
path: root/include/help.php
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2019-01-18 22:17:10 +0100
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2019-01-23 22:25:47 +0100
commit13e0151cd2569832588cc9a973bcf40d850edd53 (patch)
tree1d2054ca8b9edd9435d1ffa4c2584afea9121102 /include/help.php
parent51a7be29f50c4c62a2afb0ed155df43af9351fad (diff)
downloadvolse-hubzilla-13e0151cd2569832588cc9a973bcf40d850edd53.tar.gz
volse-hubzilla-13e0151cd2569832588cc9a973bcf40d850edd53.tar.bz2
volse-hubzilla-13e0151cd2569832588cc9a973bcf40d850edd53.zip
Correct and extend Doxygen comments.
Correct some documentation errors for Doxygen and add more comments. Document some undefined variables with @FIXME.
Diffstat (limited to 'include/help.php')
-rw-r--r--include/help.php30
1 files changed, 17 insertions, 13 deletions
diff --git a/include/help.php b/include/help.php
index 61dbc7bb3..e82fa96da 100644
--- a/include/help.php
+++ b/include/help.php
@@ -7,9 +7,10 @@ use \Michelf\MarkdownExtra;
* @brief
*
* @param string $path
- * @return string|unknown
+ * @param string $suffix (optional) default null
+ * @return string
*/
-function get_help_fullpath($path,$suffix=null) {
+function get_help_fullpath($path, $suffix = null) {
$docroot = (\App::$override_helproot) ? \App::$override_helproot : 'doc/';
$docroot = (substr($docroot,-1)!='/') ? $docroot .= '/' : $docroot;
@@ -49,8 +50,8 @@ function get_help_fullpath($path,$suffix=null) {
/**
* @brief
*
- * @param string $tocpath
- * @return string|unknown
+ * @param string $tocpath (optional) default false
+ * @return string
*/
function get_help_content($tocpath = false) {
@@ -171,16 +172,20 @@ function preg_callback_help_include($matches) {
}
/**
- * @brief
+ * @brief Determines help language.
+ *
+ * If the language was specified in the URL, override the language preference
+ * of the browser. Default to English if both of these are absent.
*
- * @return boolean|array
+ * @return array Associative array with:
+ * * \e string \b language - 2-letter ISO 639-1 code ("en")
+ * * \e boolean \b from_url - true if language from URL overrides browser default
*/
function determine_help_language() {
$lang_detect = new Text_LanguageDetect();
// Set this mode to recognize language by the short code like "en", "ru", etc.
$lang_detect->setNameMode(2);
- // If the language was specified in the URL, override the language preference
- // of the browser. Default to English if both of these are absent.
+
if($lang_detect->languageExists(argv(1))) {
$lang = argv(1);
$from_url = true;
@@ -211,10 +216,10 @@ function find_doc_file($s) {
}
/**
- * @brief
+ * @brief Search in doc files.
*
- * @param string $s
- * @return number|mixed|unknown|boolean
+ * @param string $s The search string to search for
+ * @return array
*/
function search_doc_files($s) {
@@ -275,7 +280,6 @@ function doc_rank_sort($s1, $s2) {
*
* @return string
*/
-
function load_context_help() {
$path = App::$cmd;
@@ -305,7 +309,7 @@ function load_context_help() {
* @brief
*
* @param string $s
- * @return void|boolean[]|number[]|string[]|unknown[]
+ * @return void|array
*/
function store_doc_file($s) {