From 0df03ce7ebc49bb7993dbf1d5dd4be8b9aa9138d Mon Sep 17 00:00:00 2001 From: tokul Date: Mon, 12 Apr 2004 07:52:40 +0000 Subject: [PATCH] phpdoc blocks git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7093 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/administrator/auth.php | 11 +++++--- plugins/administrator/defines.php | 4 +-- plugins/administrator/index.php | 24 ++++++++--------- plugins/administrator/options.php | 45 ++++++++++++++++++++----------- plugins/administrator/setup.php | 12 +++++++-- 5 files changed, 60 insertions(+), 36 deletions(-) diff --git a/plugins/administrator/auth.php b/plugins/administrator/auth.php index afbd8719..81c11ad4 100644 --- a/plugins/administrator/auth.php +++ b/plugins/administrator/auth.php @@ -6,14 +6,17 @@ * * Philippe Mingo * - * $Id$ + * @version $Id$ * @package plugins * @subpackage administrator */ /** -* -*/ + * Check if user has access to administrative functions + * + * @return boolean + * @access private + */ function adm_check_user() { global $PHP_SELF; require_once(SM_PATH . 'functions/global.php'); @@ -41,4 +44,4 @@ function adm_check_user() { return ($auth); } -?> +?> \ No newline at end of file diff --git a/plugins/administrator/defines.php b/plugins/administrator/defines.php index e89e6be7..5ffa2826 100644 --- a/plugins/administrator/defines.php +++ b/plugins/administrator/defines.php @@ -8,7 +8,7 @@ * * Philippe Mingo * - * $Id$ + * @version $Id$ * @package plugins * @subpackage administrator */ @@ -348,4 +348,4 @@ $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"), ); -?> +?> \ No newline at end of file diff --git a/plugins/administrator/index.php b/plugins/administrator/index.php index 95863148..844f4303 100644 --- a/plugins/administrator/index.php +++ b/plugins/administrator/index.php @@ -1,17 +1,17 @@ - SM_PATH . 'images/logo.gif' --> ../images/logo.gif - '/absolute/path/logo.gif' --> /absolute/path/logo.gif - 'http://whatever/' --> http://whatever - Note removal of quotes in returned value -*/ +/** + * Change paths containing SM_PATH to admin-friendly paths + * relative to the config dir, i.e.: + * '' --> + * SM_PATH . 'images/logo.gif' --> ../images/logo.gif + * '/absolute/path/logo.gif' --> /absolute/path/logo.gif + * 'http://whatever/' --> http://whatever + * Note removal of quotes in returned value + * + * @param string $old_path path that has to be converted + * @return string new path + * @access private + */ function change_to_rel_path($old_path) { $new_path = str_replace("SM_PATH . '", "../", $old_path); $new_path = str_replace("../config/","", $new_path); @@ -149,13 +157,18 @@ function change_to_rel_path($old_path) { return $new_path; } -/* Change relative path (relative to config dir) to - internal SM_PATH, i.e.: - empty_string --> '' - ../images/logo.gif --> SM_PATH . 'images/logo.gif' - images/logo.gif --> SM_PATH . 'config/images/logo.gif' - /absolute/path/logo.gif --> '/absolute/path/logo.gif' - http://whatever/ --> 'http://whatever' +/** + * Change relative path (relative to config dir) to + * internal SM_PATH, i.e.: + * empty_string --> '' + * ../images/logo.gif --> SM_PATH . 'images/logo.gif' + * images/logo.gif --> SM_PATH . 'config/images/logo.gif' + * /absolute/path/logo.gif --> '/absolute/path/logo.gif' + * http://whatever/ --> 'http://whatever' + * + * @param string $old_path path that has to be converted + * @return string new path + * @access private */ function change_to_sm_path($old_path) { if ( $old_path === '' || $old_path == "''" ) { diff --git a/plugins/administrator/setup.php b/plugins/administrator/setup.php index 0c248705..cb44f847 100644 --- a/plugins/administrator/setup.php +++ b/plugins/administrator/setup.php @@ -8,7 +8,7 @@ * * Administrator plugin. Allows remote administration. Philippe Mingo * - * $Id$ + * @version $Id$ * @package plugins * @subpackage administrator */ @@ -16,6 +16,10 @@ /** @ignore */ require_once(SM_PATH . 'plugins/administrator/auth.php'); +/** + * Init the plugin + * @access private + */ function squirrelmail_plugin_init_administrator() { global $squirrelmail_plugin_hooks, $username; @@ -25,6 +29,10 @@ function squirrelmail_plugin_init_administrator() { } } +/** + * Register option block + * @access private + */ function squirrelmail_administrator_optpage_register_block() { global $optpage_blocks; global $AllowSpamFilters; @@ -36,4 +44,4 @@ function squirrelmail_administrator_optpage_register_block() { 'js' => false ); } -?> +?> \ No newline at end of file -- 2.25.1