From 86e720c99da7748000a3dbe2939db2af7b698ad9 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 13 Nov 2015 00:33:32 +0100 Subject: [PATCH] forumlist: some more doxygen for plugin.php --- include/plugin.php | 89 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 18 deletions(-) diff --git a/include/plugin.php b/include/plugin.php index c504db5dab..965b823b02 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -1,9 +1,17 @@ * * Author: Jane * * + * *\endcode + * @param string $plugin the name of the plugin + * @return array with the plugin information */ if (! function_exists('get_plugin_info')){ @@ -276,16 +318,20 @@ function get_plugin_info($plugin){ }} -/* - * parse theme comment in search of theme infos. +/** + * @brief Parse theme comment in search of theme infos. + * * like - * - * * Name: My Theme + * \code + * ..* Name: My Theme * * Description: My Cool Theme - * * Version: 1.2.3 + * . * Version: 1.2.3 * * Author: John * * Maintainer: Jane * * + * \endcode + * @param string $theme the name of the theme + * @return array */ if (! function_exists('get_theme_info')){ @@ -351,7 +397,14 @@ function get_theme_info($theme){ return $info; }} - +/** + * @brief Returns the theme's screenshot. + * + * The screenshot is expected as view/theme/$theme/screenshot.[png|jpg]. + * + * @param sring $theme The name of the theme + * @return string + */ function get_theme_screenshot($theme) { $a = get_app(); $exts = array('.png','.jpg'); @@ -413,7 +466,7 @@ function service_class_allows($uid,$property,$usage = false) { $service_class = $a->user['service_class']; } else { - $r = q("select service_class from user where uid = %d limit 1", + $r = q("SELECT `service_class` FROM `user` WHERE `uid` = %d LIMIT 1", intval($uid) ); if($r !== false and count($r)) { @@ -443,7 +496,7 @@ function service_class_fetch($uid,$property) { $service_class = $a->user['service_class']; } else { - $r = q("select service_class from user where uid = %d limit 1", + $r = q("SELECT `service_class` FROM `user` WHERE `uid` = %d LIMIT 1", intval($uid) ); if($r !== false and count($r)) {