X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fplugin.php;h=965b823b02283e32493e191386caab924a2bb312;hb=4f061075792ced247a54be011bea0a4a78365c90;hp=91590e8f4d88d572fd1eb9900289c1c18b96bbc0;hpb=215205d376feb7bef8b2aa4957d1ed5b5196ea1a;p=friendica.git diff --git a/include/plugin.php b/include/plugin.php index 91590e8f4d..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)) {