Some more phpdoc fixes (adding packages, ignoring some symbols,...).

This commit is contained in:
Michal Čihař
2008-11-24 09:31:30 +00:00
parent d2a7434584
commit 610cc27c57
11 changed files with 62 additions and 30 deletions

View File

@@ -13,6 +13,9 @@ if (! defined('PHPMYADMIN')) {
exit; exit;
} }
/**
* Swekey authentication functions.
*/
require './libraries/auth/swekey/swekey.auth.lib.php'; require './libraries/auth/swekey/swekey.auth.lib.php';
if (function_exists('mcrypt_encrypt')) { if (function_exists('mcrypt_encrypt')) {

View File

@@ -1,3 +1,8 @@
<?php
/**
* @package Swekey
*/
?>
<script> <script>
@@ -7,32 +12,32 @@
// Create the swekey plugin if it does not exists // Create the swekey plugin if it does not exists
function Swekey_Plugin() function Swekey_Plugin()
{ {
try try
{ {
if (g_SwekeyPlugin != null) if (g_SwekeyPlugin != null)
return g_SwekeyPlugin; return g_SwekeyPlugin;
if (window.ActiveXObject) if (window.ActiveXObject)
{ {
g_SwekeyPlugin = document.getElementById("swekey_activex"); g_SwekeyPlugin = document.getElementById("swekey_activex");
if (g_SwekeyPlugin == null) if (g_SwekeyPlugin == null)
{ {
// we must create the activex that way instead of new ActiveXObject("FbAuthAx.FbAuthCtl"); // we must create the activex that way instead of new ActiveXObject("FbAuthAx.FbAuthCtl");
// ortherwise SetClientSite is not called and we can not get the url // ortherwise SetClientSite is not called and we can not get the url
var div = document.createElement('div'); var div = document.createElement('div');
div.innerHTML='<object id="swekey_activex" style="display:none" CLASSID="CLSID:8E02E3F9-57AA-4EE1-AA68-A42DD7B0FADE"></object>'; div.innerHTML='<object id="swekey_activex" style="display:none" CLASSID="CLSID:8E02E3F9-57AA-4EE1-AA68-A42DD7B0FADE"></object>';
// Never append to the body because it may still loading and it breaks IE // Never append to the body because it may still loading and it breaks IE
document.body.insertBefore(div, document.body.firstChild); document.body.insertBefore(div, document.body.firstChild);
g_SwekeyPlugin = document.getElementById("swekey_activex"); g_SwekeyPlugin = document.getElementById("swekey_activex");
} }
return g_SwekeyPlugin; return g_SwekeyPlugin;
} }
g_SwekeyPlugin = document.getElementById("swekey_plugin"); g_SwekeyPlugin = document.getElementById("swekey_plugin");
if (g_SwekeyPlugin != null) if (g_SwekeyPlugin != null)
return g_SwekeyPlugin; return g_SwekeyPlugin;
for (i = 0; i < navigator.plugins.length; i ++) for (i = 0; i < navigator.plugins.length; i ++)
{ {
try try
@@ -63,25 +68,25 @@
} }
} }
} }
catch (e) catch (e)
{ {
//alert("Swekey_Plugin " + e); //alert("Swekey_Plugin " + e);
g_SwekeyPlugin = null; g_SwekeyPlugin = null;
} }
return null; return null;
} }
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Returns true if the swekey plugin is installed // Returns true if the swekey plugin is installed
function Swekey_Installed() function Swekey_Installed()
{ {
return (Swekey_Plugin() != null); return (Swekey_Plugin() != null);
} }
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// List the id of the Swekey connected to the PC // List the id of the Swekey connected to the PC
// Returns a string containing comma separated Swekey Ids // Returns a string containing comma separated Swekey Ids
// A Swekey is a 32 char hexadecimal value. // A Swekey is a 32 char hexadecimal value.
function Swekey_ListKeyIds() function Swekey_ListKeyIds()
{ {
try try
@@ -94,11 +99,11 @@
} }
return ""; return "";
} }
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Ask the Connected Swekey to generate an OTP // Ask the Connected Swekey to generate an OTP
// id: The id of the connected Swekey (returne by Swekey_ListKeyIds()) // id: The id of the connected Swekey (returne by Swekey_ListKeyIds())
// rt: A random token // rt: A random token
// return: The calculated OTP encoded in a 64 chars hexadecimal value. // return: The calculated OTP encoded in a 64 chars hexadecimal value.
function Swekey_GetOtp(id, rt) function Swekey_GetOtp(id, rt)
{ {
@@ -116,7 +121,7 @@
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Ask the Connected Swekey to generate a OTP linked to the current https host // Ask the Connected Swekey to generate a OTP linked to the current https host
// id: The id of the connected Swekey (returne by Swekey_ListKeyIds()) // id: The id of the connected Swekey (returne by Swekey_ListKeyIds())
// rt: A random token // rt: A random token
// return: The calculated OTP encoded in a 64 chars hexadecimal value. // return: The calculated OTP encoded in a 64 chars hexadecimal value.
// or "" if the current url does not start with https // or "" if the current url does not start with https
function Swekey_GetLinkedOtp(id, rt) function Swekey_GetLinkedOtp(id, rt)
@@ -136,13 +141,13 @@
// Calls Swekey_GetOtp or Swekey_GetLinkedOtp depending if we are in // Calls Swekey_GetOtp or Swekey_GetLinkedOtp depending if we are in
// an https page or not. // an https page or not.
// id: The id of the connected Swekey (returne by Swekey_ListKeyIds()) // id: The id of the connected Swekey (returne by Swekey_ListKeyIds())
// rt: A random token // rt: A random token
// return: The calculated OTP encoded in a 64 chars hexadecimal value. // return: The calculated OTP encoded in a 64 chars hexadecimal value.
function Swekey_GetSmartOtp(id, rt) function Swekey_GetSmartOtp(id, rt)
{ {
var res = Swekey_GetLinkedOtp(id, rt); var res = Swekey_GetLinkedOtp(id, rt);
if (res == "") if (res == "")
res = Swekey_GetOtp(id, rt); res = Swekey_GetOtp(id, rt);
return res; return res;
} }
@@ -150,7 +155,7 @@
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Set a unplug handler (url) to the specified connected feebee // Set a unplug handler (url) to the specified connected feebee
// id: The id of the connected Swekey (returne by Swekey_ListKeyIds()) // id: The id of the connected Swekey (returne by Swekey_ListKeyIds())
// key: The key that index that url, (aplhanumeric values only) // key: The key that index that url, (aplhanumeric values only)
// url: The url that will be launched ("" deletes the url) // url: The url that will be launched ("" deletes the url)
function Swekey_SetUnplugUrl(id, key, url) function Swekey_SetUnplugUrl(id, key, url)
{ {
@@ -164,4 +169,4 @@
} }
} }
</script> </script>

View File

@@ -3,6 +3,9 @@
* @package Swekey * @package Swekey
*/ */
/**
* Checks Swekey authentication.
*/
function Swekey_auth_check() function Swekey_auth_check()
{ {
global $cfg; global $cfg;
@@ -57,6 +60,9 @@ function Swekey_auth_check()
} }
/**
* Handle Swekey authentication error.
*/
function Swekey_auth_error() function Swekey_auth_error()
{ {
if (! isset($_SESSION['SWEKEY'])) if (! isset($_SESSION['SWEKEY']))
@@ -200,6 +206,9 @@ function Swekey_auth_error()
} }
/**
* Perform login using Swekey.
*/
function Swekey_login($input_name, $input_go) function Swekey_login($input_name, $input_go)
{ {
$swekeyErr = Swekey_auth_error(); $swekeyErr = Swekey_auth_error();

View File

@@ -3,6 +3,7 @@
/** /**
* Interface to the classic MySQL extension * Interface to the classic MySQL extension
* *
* @package phpMyAdmin-DBI-MySQL
* @version $Id$ * @version $Id$
*/ */
if (! defined('PHPMYADMIN')) { if (! defined('PHPMYADMIN')) {
@@ -153,10 +154,10 @@ function PMA_DBI_try_query($query, $link = null, $options = 0)
$_SESSION['debug']['queries'][$hash]['query'] = $query; $_SESSION['debug']['queries'][$hash]['query'] = $query;
$_SESSION['debug']['queries'][$hash]['time'] = $time; $_SESSION['debug']['queries'][$hash]['time'] = $time;
} }
$trace = array(); $trace = array();
foreach (debug_backtrace() as $trace_step) { foreach (debug_backtrace() as $trace_step) {
$trace[] = PMA_Error::relPath($trace_step['file']) . '#' $trace[] = PMA_Error::relPath($trace_step['file']) . '#'
. $trace_step['line'] . ': ' . $trace_step['line'] . ': '
. (isset($trace_step['class']) ? $trace_step['class'] : '') . (isset($trace_step['class']) ? $trace_step['class'] : '')
//. (isset($trace_step['object']) ? get_class($trace_step['object']) : '') //. (isset($trace_step['object']) ? get_class($trace_step['object']) : '')

View File

@@ -3,6 +3,7 @@
/** /**
* Interface to the improved MySQL extension (MySQLi) * Interface to the improved MySQL extension (MySQLi)
* *
* @package phpMyAdmin-DBI-MySQLi
* @version $Id$ * @version $Id$
*/ */
if (! defined('PHPMYADMIN')) { if (! defined('PHPMYADMIN')) {
@@ -178,7 +179,7 @@ function PMA_DBI_try_query($query, $link = null, $options = 0)
$trace = array(); $trace = array();
foreach (debug_backtrace() as $trace_step) { foreach (debug_backtrace() as $trace_step) {
$trace[] = PMA_Error::relPath($trace_step['file']) . '#' $trace[] = PMA_Error::relPath($trace_step['file']) . '#'
. $trace_step['line'] . ': ' . $trace_step['line'] . ': '
. (isset($trace_step['class']) ? $trace_step['class'] : '') . (isset($trace_step['class']) ? $trace_step['class'] : '')
//. (isset($trace_step['object']) ? get_class($trace_step['object']) : '') //. (isset($trace_step['object']) ? get_class($trace_step['object']) : '')
@@ -575,9 +576,9 @@ function PMA_DBI_field_name($result, $i)
* @uses MYSQLI_PRI_KEY_FLAG * @uses MYSQLI_PRI_KEY_FLAG
* @uses MYSQLI_NOT_NULL_FLAG * @uses MYSQLI_NOT_NULL_FLAG
* @uses MYSQLI_TYPE_BLOB * @uses MYSQLI_TYPE_BLOB
* @uses MYSQLI_TYPE_MEDIUM_BLOB * @uses MYSQLI_TYPE_MEDIUM_BLOB
* @uses MYSQLI_TYPE_LONG_BLOB * @uses MYSQLI_TYPE_LONG_BLOB
* @uses MYSQLI_TYPE_VAR_STRING * @uses MYSQLI_TYPE_VAR_STRING
* @uses MYSQLI_TYPE_STRING * @uses MYSQLI_TYPE_STRING
* @uses mysqli_fetch_field_direct() * @uses mysqli_fetch_field_direct()
* @param object mysqli result $result * @param object mysqli result $result

View File

@@ -13,6 +13,7 @@
* The SQL Parser code relies heavily on these functions. * The SQL Parser code relies heavily on these functions.
* *
* @version $Id$ * @version $Id$
* @package phpMyAdmin-String-MB
*/ */
/** /**

View File

@@ -13,6 +13,7 @@
* The SQL Parser code relies heavily on these functions. * The SQL Parser code relies heavily on these functions.
* *
* @version $Id$ * @version $Id$
* @package phpMyAdmin-String-Native
*/ */
/** /**

View File

@@ -13,6 +13,7 @@
* The SQL Parser code relies heavily on these functions. * The SQL Parser code relies heavily on these functions.
* *
* @version $Id$ * @version $Id$
* @package phpMyAdmin-StringType-CType
*/ */
/** /**
@@ -100,4 +101,4 @@ function PMA_STR_isHexDigit($c)
return ctype_xdigit($c); return ctype_xdigit($c);
} // end of the "PMA_STR_isHexDigit()" function } // end of the "PMA_STR_isHexDigit()" function
?> ?>

View File

@@ -13,6 +13,7 @@
* The SQL Parser code relies heavily on these functions. * The SQL Parser code relies heavily on these functions.
* *
* @version $Id$ * @version $Id$
* @package phpMyAdmin-StringType-Native
*/ */
/** /**
@@ -137,4 +138,4 @@ function PMA_STR_isHexDigit($c)
|| PMA_STR_numberInRangeInclusive($ord_c, $ord_Alower, $ord_Flower)); || PMA_STR_numberInRangeInclusive($ord_c, $ord_Alower, $ord_Flower));
} // end of the "PMA_STR_isHexDigit()" function } // end of the "PMA_STR_isHexDigit()" function
?> ?>

View File

@@ -6,9 +6,12 @@
*/ */
/** /**
* Gets core libraries and defines some variables * @ignore
*/ */
define('PMA_MINIMUM_COMMON', true); define('PMA_MINIMUM_COMMON', true);
/**
* Gets core libraries and defines some variables
*/
require_once './libraries/common.inc.php'; require_once './libraries/common.inc.php';

View File

@@ -6,10 +6,16 @@
*/ */
/** /**
* * @ignore
*/ */
define('PMA_MINIMUM_COMMON', true); define('PMA_MINIMUM_COMMON', true);
/**
* Gets core libraries and defines some variables
*/
require_once './libraries/common.inc.php'; require_once './libraries/common.inc.php';
/**
* ZIP file handler.
*/
require_once './libraries/zip.lib.php'; require_once './libraries/zip.lib.php';
// ini file // ini file