From 795e690a854363b2747abe02778484d4a9d57d15 Mon Sep 17 00:00:00 2001 From: Elin Waring Date: Tue, 21 Jun 2011 19:13:20 -0400 Subject: [PATCH] applied patch --- libraries/joomla/application/cli/daemon.php | 17 +- .../application/component/controller.php | 48 ++--- .../application/component/controlleradmin.php | 17 +- .../application/component/controllerform.php | 41 ++-- .../joomla/application/component/helper.php | 8 +- .../joomla/application/component/model.php | 61 +++--- .../application/component/modeladmin.php | 74 ++++--- .../application/component/modelform.php | 24 ++- .../application/component/modelitem.php | 8 +- .../application/component/modellist.php | 9 +- libraries/joomla/application/input/cli.php | 10 +- libraries/joomla/application/input/cookie.php | 3 +- libraries/joomla/application/input/files.php | 2 +- .../joomla/application/module/helper.php | 29 ++- .../joomla/cache/controller/callback.php | 5 +- libraries/joomla/cache/controller/output.php | 4 +- libraries/joomla/cache/controller/page.php | 9 +- libraries/joomla/cache/controller/view.php | 12 +- libraries/joomla/cache/storage/apc.php | 43 ++-- libraries/joomla/cache/storage/cachelite.php | 21 +- .../joomla/cache/storage/eaccelerator.php | 39 ++-- libraries/joomla/cache/storage/file.php | 80 ++++---- .../joomla/cache/storage/helpers/helper.php | 16 +- libraries/joomla/cache/storage/memcache.php | 58 +++--- libraries/joomla/cache/storage/wincache.php | 26 ++- libraries/joomla/cache/storage/xcache.php | 40 ++-- libraries/joomla/error/error.php | 55 ++++- libraries/joomla/factory.php | 115 ++++++----- libraries/joomla/html/html/grid.php | 15 +- libraries/joomla/html/html/image.php | 27 ++- libraries/joomla/html/html/list.php | 4 +- libraries/joomla/html/pane.php | 36 +++- libraries/joomla/html/parameter.php | 26 +++ libraries/joomla/html/parameter/element.php | 34 ++- .../html/parameter/element/calendar.php | 16 +- .../html/parameter/element/category.php | 7 + .../parameter/element/componentlayouts.php | 5 + .../parameter/element/contentlanguages.php | 5 +- .../joomla/html/parameter/element/editors.php | 6 + .../html/parameter/element/filelist.php | 8 +- .../html/parameter/element/folderlist.php | 6 + .../html/parameter/element/helpsites.php | 6 + .../joomla/html/parameter/element/hidden.php | 12 ++ .../html/parameter/element/languages.php | 6 + .../joomla/html/parameter/element/list.php | 8 +- .../joomla/html/parameter/element/menu.php | 6 + .../html/parameter/element/menuitem.php | 6 + .../html/parameter/element/modulelayouts.php | 3 + .../html/parameter/element/password.php | 8 +- .../joomla/html/parameter/element/radio.php | 6 + .../joomla/html/parameter/element/spacer.php | 12 ++ .../joomla/html/parameter/element/sql.php | 10 +- .../html/parameter/element/templatestyle.php | 13 +- .../html/parameter/element/textarea.php | 6 + .../html/parameter/element/timezones.php | 6 + .../html/parameter/element/usergroup.php | 6 + libraries/joomla/language/help.php | 16 +- libraries/joomla/language/helper.php | 15 +- libraries/joomla/language/language.php | 171 ++++++++-------- .../joomla/language/latin_transliterate.php | 7 +- libraries/joomla/log/log.php | 57 +++--- libraries/joomla/log/logentry.php | 15 +- libraries/joomla/log/logger.php | 5 +- libraries/joomla/mail/helper.php | 18 +- libraries/joomla/mail/mail.php | 83 ++++---- libraries/joomla/methods.php | 64 +++--- libraries/joomla/plugin/helper.php | 22 +- libraries/joomla/plugin/plugin.php | 12 +- libraries/joomla/registry/format.php | 15 +- libraries/joomla/registry/registry.php | 110 ++++++---- libraries/joomla/session/session.php | 130 ++++++++---- libraries/joomla/session/storage.php | 34 ++- libraries/joomla/updater/update.php | 146 +++++++++++-- libraries/joomla/updater/updateadapter.php | 27 +++ libraries/joomla/updater/updater.php | 22 +- libraries/joomla/user/authentication.php | 51 +++-- libraries/joomla/user/helper.php | 75 ++++--- libraries/joomla/user/user.php | 162 ++++++++++----- libraries/joomla/utilities/arrayhelper.php | 62 +++--- libraries/joomla/utilities/buffer.php | 76 ++++++- libraries/joomla/utilities/date.php | 27 ++- libraries/joomla/utilities/simplecrypt.php | 31 +-- libraries/joomla/utilities/simplexml.php | 98 +++++++-- libraries/joomla/utilities/string.php | 193 +++++++++++------- libraries/joomla/utilities/utility.php | 108 +++++----- libraries/joomla/utilities/xmlelement.php | 10 +- libraries/platform.php | 7 +- 87 files changed, 2023 insertions(+), 1029 deletions(-) diff --git a/libraries/joomla/application/cli/daemon.php b/libraries/joomla/application/cli/daemon.php index bc0adb4df3..e257b608b3 100644 --- a/libraries/joomla/application/cli/daemon.php +++ b/libraries/joomla/application/cli/daemon.php @@ -19,6 +19,9 @@ * @package Joomla.Platform * @subpackage Application * @since 11.1 + * + * @see http://www.php.net/manual/en/book.pcntl.php + * @see http://php.net/manual/en/features.commandline.php */ class JDaemon extends JCli { @@ -36,7 +39,9 @@ class JDaemon extends JCli /** * Exiting status - * @var boolean True if the daemon is in the process of exiting. + * True if the daemon is in the process of exiting. + * + * @var boolean * @since 11.1 */ protected $exiting = false; @@ -50,7 +55,8 @@ class JDaemon extends JCli /** * Running status - * @var boolean True if the daemon is currently running. + * True if the daemon is currently running. + * @var boolean * @since 11.1 */ protected $running = false; @@ -295,7 +301,7 @@ public function restart() /** * Spawn daemon process. * - * @return bool True if successfully spawned + * @return boolean True if successfully spawned * * @since 11.1 */ @@ -346,11 +352,10 @@ public function stop() /** * Method to change the identity of the daemon process and resources. * - * @return boolean True if identitye successfully changed + * @return boolean True if identity successfully changed * * @since 11.1 * @see posix_setuid() - * @see posix_setgid() */ protected function changeIdentity() { @@ -530,7 +535,7 @@ protected function gc() * Method to attach the JDaemon signal handler to the known signals. Applications can override * these handlers by using the pcntl_signal() function and attaching a different callback method. * - * @return void + * @return boolean * * @since 11.1 * @see pcntl_signal() diff --git a/libraries/joomla/application/component/controller.php b/libraries/joomla/application/component/controller.php index 916596a749..a807e33c17 100644 --- a/libraries/joomla/application/component/controller.php +++ b/libraries/joomla/application/component/controller.php @@ -49,7 +49,9 @@ class JController extends JObject protected $basePath; /** - * @var string The default view for the display method. + * The default view for the display method. + * + * @var string * @since 11.1 */ protected $default_view; @@ -149,7 +151,7 @@ class JController extends JObject * @param mixed $path The directory (string), or list of directories (array) to add. * @param string $prefix A prefix for models * - * @return void + * @return voi */ public static function addModelPath($path, $prefix='') { @@ -281,8 +283,8 @@ public static function getInstance($prefix, $config = array()) * Constructor. * * @param array $config An optional associative array of configuration settings. - * Recognized key values include 'name', 'default_task', 'model_path', and - * 'view_path' (this list is not meant to be comprehensive). + * Recognized key values include 'name', 'default_task', 'model_path', and + * 'view_path' (this list is not meant to be comprehensive). * * @return JController * @since 11.1 @@ -389,7 +391,7 @@ public function __construct($config = array()) * @param string $type The path type (e.g. 'model', 'view'). * @param mixed $path The directory string or stream array to search. * - * @return JController A JController object to support chaining. + * @return JController A JController object to support chaining. * @since 11.1 * @note Replaces _addPath. */ @@ -418,9 +420,9 @@ protected function addPath($type, $path) /** * Add one or more view paths to the controller's stack, in LIFO order. * - * @param string|array $path The directory (string) or list of directories (array) to add. + * @param mixed $path The directory (string) or list of directories (array) to add. * - * @return JController This object to support chaining. + * @return JController This object to support chaining. */ public function addViewPath($path) { @@ -432,9 +434,9 @@ public function addViewPath($path) /** * Authorisation check * - * @param string $task The ACO Section Value to check access on + * @param string $task The ACO Section Value to check access on * - * @return bool True if authorised + * @return boolean True if authorised * @since 11.1 * @deprecated */ @@ -448,14 +450,14 @@ public function authorize($task) * * @param string $task The ACO Section Value to check access on. * - * @return bool True if authorised + * @return bool True if authorised * @since 11.1 */ public function authorise($task) { // Only do access check if the aco section is set if ($this->_acoSection) { - // If we have a section value set that trumps the passed task ??? + // If we have a section value set that trumps the passed task if ($this->_acoSectionValue) { // We have one, so set it and lets do the check $task = $this->_acoSectionValue; @@ -466,7 +468,7 @@ public function authorise($task) return $user->authorise($this->_acoSection, $task); } else { - // Nothing set, nothing to check... so obviously its ok :) + // Nothing set, nothing to check... so obviously it's ok :) return true; } } @@ -475,9 +477,9 @@ public function authorise($task) * Method to check whether an ID is in the edit list. * * @param string $context The context for the session storage. - * @param integer $id The ID of the record to add to the edit list. + * @param integer $id The ID of the record to add to the edit list. * - * @return boolean True if the ID is in the edit list. + * @return boolean True if the ID is in the edit list. * @since 11.1 */ protected function checkEditId($context, $id) @@ -506,9 +508,9 @@ protected function checkEditId($context, $id) /** * Method to load and return a model object. * - * @param string $name The name of the model. - * @param string $prefix Optional model prefix. - * @param array $config Configuration array for the model. Optional. + * @param string $name The name of the model. + * @param string $prefix Optional model prefix. + * @param array $config Configuration array for the model. Optional. * * @return mixed Model object on success; otherwise null failure. * @since 11.1 @@ -538,7 +540,7 @@ protected function createModel($name, $prefix = '', $config = array()) * @param string $type The type of view. * @param array $config Configuration array for the view. Optional. * - * @return mixed View object on success; null or error result on failure. + * @return mixed View object on success; null or error result on failure. * @since 11.1 * @note Replaces _createView. */ @@ -588,7 +590,7 @@ protected function createView($name, $prefix = '', $type = '', $config = array() * @param bool $cachable If true, the view output will be cached * @param array $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}. * - * @return JController A JController object to support chaining. + * @return JController A JController object to support chaining. * @since 11.1 */ public function display($cachable = false, $urlparams = false) @@ -770,10 +772,10 @@ public function getTasks() /** * Method to get a reference to the current view and load it if necessary. * - * @param string $name The view name. Optional, defaults to the controller name. - * @param string $type The view type. Optional. - * @param string $prefix The class prefix. Optional. - * @param array $config Configuration array for view. Optional. + * @param string $name The view name. Optional, defaults to the controller name. + * @param string $type The view type. Optional. + * @param string $prefix The class prefix. Optional. + * @param array $config Configuration array for view. Optional. * * @return object Reference to the view or an error. * @since 11.1 diff --git a/libraries/joomla/application/component/controlleradmin.php b/libraries/joomla/application/component/controlleradmin.php index 9d01009dea..ca31fb5fd4 100644 --- a/libraries/joomla/application/component/controlleradmin.php +++ b/libraries/joomla/application/component/controlleradmin.php @@ -24,19 +24,25 @@ class JControllerAdmin extends JController { /** - * @var string The URL option for the component. + * The URL option for the component. + * + * @var string * @since 11.1 */ protected $option; /** - * @var string The prefix to use with controller messages. + * The prefix to use with controller messages. + * + * @var string * @since 11.1 */ protected $text_prefix; /** - * @var string The URL view list variable. + * The URL view list variable. + * + * @var string * @since 11.1 */ protected $view_list; @@ -44,7 +50,8 @@ class JControllerAdmin extends JController /** * Constructor. * - * @param array An optional associative array of configuration settings. + * @param array An optional associative array of configuration settings. + * * @see JController * @since 11.1 */ @@ -122,7 +129,7 @@ function delete() * @param bool $cachable If true, the view output will be cached * @param array $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}. * - * @return JController A JController object to support chaining. + * @return JController A JController object to support chaining. * @since 11.1 */ public function display($cachable = false, $urlparams = false) diff --git a/libraries/joomla/application/component/controllerform.php b/libraries/joomla/application/component/controllerform.php index 2ef3327c2d..f96a8f7c01 100644 --- a/libraries/joomla/application/component/controllerform.php +++ b/libraries/joomla/application/component/controllerform.php @@ -11,43 +11,53 @@ jimport('joomla.application.component.controller'); -// @TODO Add ability to set redirect manually to better cope with frontend usage. - /** * Controller tailored to suit most form-based admin operations. * * @package Joomla.Platform * @subpackage Application * @since 11.1 + * + * @todo Add ability to set redirect manually to better cope with frontend usage. */ class JControllerForm extends JController { /** - * @var string The context for storing internal data, e.g. record. + * The context for storing internal data, e.g. record. + * + * @var string * @since 11.1 */ protected $context; /** - * @var string The URL option for the component. + * The URL option for the component. + * + * @var string * @since 11.1 */ protected $option; /** - * @var string The URL view item variable. + * The URL view item variable. + * + * @var string * @since 11.1 */ protected $view_item; /** - * @var string The URL view list variable. + * The URL view list variable. + * + * @var string * @since 11.1 */ protected $view_list; /** - * @var string The prefix to use with controller messages. + * The prefix to use with controller messages. + * + * @var string * @since 11.1 */ protected $text_prefix; @@ -59,8 +69,8 @@ class JControllerForm extends JController * * @return JControllerForm A JControllerForm object * - * @see JController * @since 11.1 + * @see JController */ public function __construct($config = array()) { @@ -176,7 +186,7 @@ protected function allowAdd($data = array()) * Extended classes can override this if necessary. * * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param string $key The name of the key for the primary key; default is id.. * * @return boolean * @since 11.1 @@ -297,7 +307,8 @@ public function cancel($key = null) * Method to edit an existing record. * * @param string $key The name of the primary key of the URL variable. - * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). + * @param string $urlVar The name of the URL variable if different from the primary key + * (sometimes required to avoid router collisions). * * @return boolean True if access level check and checkout passes, false otherwise. * @since 11.1 @@ -357,9 +368,9 @@ public function edit($key = null, $urlVar = null) /** * Method to get a model object, loading it if required. * - * @param string $name The model name. Optional. - * @param string $prefix The class prefix. Optional. - * @param array $config Configuration array for model. Optional. + * @param string $name The model name. Optional. + * @param string $prefix The class prefix. Optional. + * @param array $config Configuration array for model. Optional. * * @return object The model. * @since 11.1 @@ -408,6 +419,7 @@ protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') * Gets the URL arguments to append to a list redirect. * * @return string The arguments to append to the redirect URL. + * * @since 11.1 */ protected function getRedirectToListAppend() @@ -424,7 +436,8 @@ protected function getRedirectToListAppend() } /** - * Function that allows child controller access to model data after the data has been saved. + * Function that allows child controller access to model data + * after the data has been saved. * * @param JModel $model The data model object. * @param array $validData The validated data. diff --git a/libraries/joomla/application/component/helper.php b/libraries/joomla/application/component/helper.php index aab797b87a..6494290c59 100644 --- a/libraries/joomla/application/component/helper.php +++ b/libraries/joomla/application/component/helper.php @@ -30,7 +30,7 @@ class JComponentHelper * Get the component information. * * @param string $option The component option. - * @param boolean $string If set and the component does not exist, the enabled attribue will be set to false + * @param boolean $strict If set and the component does not exist, the enabled attribue will be set to false * * @return object An object with the information for the component. * @since 11.1 @@ -56,7 +56,7 @@ public static function getComponent($option, $strict = false) * Checks if the component is enabled * * @param string $option The component option. - * @param boolean $string If set and the component does not exist, false will be returned + * @param boolean $strict If set and the component does not exist, false will be returned * * @return boolean * @since 11.1 @@ -177,9 +177,9 @@ public static function renderComponent($option, $params = array()) /** * Load the installed components into the _components property. * - * @param string $option The element value for the extension + * @param string $option The element value for the extension * - * @return bool True on success + * @return boolean True on success * @since 11.1 */ protected static function _load($option) diff --git a/libraries/joomla/application/component/model.php b/libraries/joomla/application/component/model.php index 59b323ebad..8a83ec4079 100644 --- a/libraries/joomla/application/component/model.php +++ b/libraries/joomla/application/component/model.php @@ -48,8 +48,9 @@ abstract class JModel extends JObject /** * The option for the component + * The URL option for the component. * - * @var string The URL option for the component. + * @var string * @since 11.1 */ protected $option = null; @@ -64,8 +65,10 @@ abstract class JModel extends JObject protected $state; /** - * @var string The event to trigger when cleaning cache. - * @since 11.1 + * The event to trigger when cleaning cache. + * + * @var string + * @since 11.1 */ protected $event_clean_cache = null; @@ -73,10 +76,10 @@ abstract class JModel extends JObject * Add a directory where JModel should search for models. You may * either pass a string or an array of directories. * - * @param string $path A path to search. - * @param string $prefix A prefix for models. + * @param mixed $path A path or array[sting] of paths to search. + * @param string $prefix A prefix for models. * - * @return array An array with directory elements. If prefix is equal to '', all directories are returned. + * @return array An array with directory elements. If prefix is equal to '', all directories are returned. * @since 11.1 */ public static function addIncludePath($path = '', $prefix = '') @@ -127,11 +130,11 @@ public static function addTablePath($path) /** * Create the filename for a resource * - * @param string $type The resource type to create the filename for. - * @param array $parts An associative array of filename information. + * @param string $type The resource type to create the filename for. + * @param array $parts An associative array of filename information. * - * @return string The filename - * @since 11.1 + * @return string The filename + * @since 11.1 */ protected static function _createFileName($type, $parts = array()) { @@ -149,9 +152,9 @@ protected static function _createFileName($type, $parts = array()) /** * Returns a Model object, always creating it * - * @param string $type The model type to instantiate - * @param string $prefix Prefix for the model class name. Optional. - * @param array $config Configuration array for model. Optional. + * @param string $type The model type to instantiate + * @param string $prefix Prefix for the model class name. Optional. + * @param array $config Configuration array for model. Optional. * * @return mixed A model object or false on failure * @since 11.1 @@ -192,7 +195,7 @@ public static function getInstance($type, $prefix = '', $config = array()) /** * Constructor * - * @param array $config An array of configuration options (name, state, dbo, table_path, ignore_request). + * @param array $config An array of configuration options (name, state, dbo, table_path, ignore_request). * * @return JModel A JModel object * @since 11.1 @@ -295,12 +298,12 @@ protected function _getListCount($query) /** * Method to load and return a model object. * - * @param string $name The name of the view - * @param string $prefix The class prefix. Optional. - * @param array $config Configuration settings to pass to JTable::getInsance + * @param string $name The name of the view + * @param string $prefix The class prefix. Optional. + * @param array $config Configuration settings to pass to JTable::getInsance * - * @return mixed Model object or boolean false if failed - * @since 11.1 + * @return mixed Model object or boolean false if failed + * @since 11.1 * @see JTable::getInstance */ protected function _createTable($name, $prefix = 'Table', $config = array()) @@ -380,7 +383,7 @@ public function getState($property = null, $default = null) * @param string $prefix The class prefix. Optional. * @param array $options Configuration array for model. Optional. * - * @return JTable A JTable object + * @return JTable A JTable object * @since 11.1 */ public function getTable($name = '', $prefix = 'Table', $options = array()) @@ -405,10 +408,10 @@ public function getTable($name = '', $prefix = 'Table', $options = array()) * to be called on the first call to the getState() method unless the model * configuration flag to ignore the request is set. * - * Note. Calling getState in this method will result in recursion. - * * @return void * @since 11.1 + * + * @note. Calling getState in this method will result in recursion. */ protected function populateState() { @@ -417,7 +420,7 @@ protected function populateState() /** * Method to set the database connector object * - * @param object &$db A JDatabase based object + * @param object &$db A JDatabase based object * * @return void * @since 11.1 @@ -430,10 +433,10 @@ public function setDbo(&$db) /** * Method to set model state variables * - * @param string $property The name of the property - * @param mixed $value The value of the property to set + * @param string $property The name of the property + * @param mixed $value The value of the property to set or null * - * @return mixed The previous value of the property + * @return mixed The previous value of the property or null if not set * @since 11.1 */ public function setState($property, $value = null) @@ -444,12 +447,12 @@ public function setState($property, $value = null) /** * Clean the cache * - * @param string $group The cache group - * @param string $client_id The ID of the client + * @param string $group The cache group + * @param string $client_id The ID of the client * * @return void * - * @since 1.6 + * @since 11.1 */ protected function cleanCache($group = null, $client_id = 0) { diff --git a/libraries/joomla/application/component/modeladmin.php b/libraries/joomla/application/component/modeladmin.php index e6e344c7a8..229b2254d2 100644 --- a/libraries/joomla/application/component/modeladmin.php +++ b/libraries/joomla/application/component/modeladmin.php @@ -21,37 +21,49 @@ abstract class JModelAdmin extends JModelForm { /** - * @var string The prefix to use with controller messages. + * The prefix to use with controller messages. + * + * @var string * @since 11.1 */ protected $text_prefix = null; /** - * @var string The event to trigger after deleting the data. + * The event to trigger after deleting the data. + * + * @var string * @since 11.1 */ protected $event_after_delete = null; /** - * @var string The event to trigger after saving the data. + * The event to trigger after saving the data. + * + * @var string * @since 11.1 */ protected $event_after_save = null; /** - * @var string The event to trigger before deleting the data. + * The event to trigger before deleting the data. + * + * @var string * @since 11.1 */ protected $event_before_delete = null; /** - * @var string The event to trigger before saving the data. + * The event to trigger before saving the data. + * + * @var string * @since 11.1 */ protected $event_before_save = null; /** - * @var string The event to trigger after changing the published state of the data. + * The event to trigger after changing the published state of the data. + * + * @var string * @since 11.1 */ protected $event_change_state = null; @@ -60,6 +72,7 @@ abstract class JModelAdmin extends JModelForm * Constructor. * * @param array $config An optional associative array of configuration settings. + * @param array $config An optional associative array of configuration settings. * * @return JModelAdmin * @@ -169,11 +182,11 @@ public function batch($commands, $pks) /** * Batch access level changes for a group of rows. * - * @param int $value The new value matching an Asset Group ID. - * @param array $pks An array of row IDs. + * @param integer $value The new value matching an Asset Group ID. + * @param array $pks An array of row IDs. * - * @return booelan True if successful, false otherwise and internal error is set. - * @since 11.1 + * @return booelan True if successful, false otherwise and internal error is set. + * @since 11.1 */ protected function batchAccess($value, $pks) { @@ -208,10 +221,10 @@ protected function batchAccess($value, $pks) /** * Batch copy items to a new category or current. * - * @param int $value The new category. - * @param array $pks An array of row IDs. + * @param integer $value The new category. + * @param array $pks An array of row IDs. * - * @return boolean True if successful, false otherwise and internal error is set. + * @return boolean True if successful, false otherwise and internal error is set. * * @since 11.1 */ @@ -309,10 +322,10 @@ protected function batchCopy($value, $pks) /** * Batch move articles to a new category * - * @param int $value The new category ID. - * @param array $pks An array of row IDs. + * @param integer $value The new category ID. + * @param array $pks An array of row IDs. * - * @return booelan True if successful, false otherwise and internal error is set. + * @return booelan True if successful, false otherwise and internal error is set. * * @since 11.1 */ @@ -399,7 +412,7 @@ protected function batchMove($value, $pks) /** * Method to test whether a record can be deleted. * - * @param object $record A record object. + * @param object $record A record object. * * @return boolean True if allowed to delete the record. Defaults to the permission for the component. * @since 11.1 @@ -427,7 +440,7 @@ protected function canEditState($record) /** * Method override to check-in a record or an array of record * - * @param integer|array $pks The ID of the primary key or an array of IDs + * @param mixed $pks The ID of the primary key or an array of IDs * * @return mixed Boolean false if there is an error, otherwise the count of records checked in. * @since 11.1 @@ -469,7 +482,7 @@ public function checkin($pks = array()) /** * Method override to check-out a record. * - * @param integer $pk The ID of the primary key. + * @param integer $pk The ID of the primary key. * * @return boolean True if successful, false if an error occurs. * @since 11.1 @@ -485,7 +498,7 @@ public function checkout($pk = null) /** * Method to delete one or more records. * - * @param array $pks An array of record primary keys. + * @param array $pks An array of record primary keys. * * @return boolean True if successful, false if an error occurs. * @since 11.1 @@ -584,7 +597,7 @@ protected function generateNewTitle($category_id, $alias, $title) /** * Method to get a single record. * - * @param integer $pk The id of the primary key. + * @param integer $pk The id of the primary key. * * @return mixed Object on success, false on failure. * @since 11.1 @@ -622,7 +635,7 @@ public function getItem($pk = null) /** * A protected method to get a set of ordering conditions. * - * @param object $table A JTable object. + * @param object $table A JTable object. * * @return array An array of conditions to add to ordering queries. * @since 11.1 @@ -657,7 +670,7 @@ protected function populateState() /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A reference to a JTable object. + * @param JTable $table A reference to a JTable object. * * @return void * @since 11.1 @@ -670,8 +683,8 @@ protected function prepareTable(&$table) /** * Method to change the published state of one or more records. * - * @param array $pks A list of the primary keys to change. - * @param integer $value The value of the published state. + * @param array $pks A list of the primary keys to change. + * @param integer $value The value of the published state. * * @return boolean True on success. * @since 11.1 @@ -732,7 +745,8 @@ function publish(&$pks, $value = 1) * @param integer $pks The ID of the primary key to move. * @param integer $delta Increment, usually +1 or -1 * - * @return boolean|null False on failure or error, true on success. + * @return mixed False on failure or error, true on success, + * null if the $pk is empty (no items selected). * @since 11.1 */ public function reorder($pks, $delta = 0) @@ -791,9 +805,9 @@ public function reorder($pks, $delta = 0) /** * Method to save the form data. * - * @param array $data The form data. + * @param array $data The form data. * - * @return boolean True on success. + * @return boolean True on success, False on error. * @since 11.1 */ public function save($data) @@ -871,8 +885,8 @@ public function save($data) /** * Saves the manually set order of records. * - * @param array $pks An array of primary key ids. - * @param integer $order +/-1 + * @param array $pks An array of primary key ids. + * @param integer $order +1 or -1 * * @return mixed * @since 11.1 diff --git a/libraries/joomla/application/component/modelform.php b/libraries/joomla/application/component/modelform.php index 9a3f933caa..bcaca14829 100644 --- a/libraries/joomla/application/component/modelform.php +++ b/libraries/joomla/application/component/modelform.php @@ -18,11 +18,18 @@ * @package Joomla.Platform * @subpackage Application * @since 11.1 + * + * @see JForm + * @see JFormField + * @see JformRule */ abstract class JModelForm extends JModel { /** * Array of form objects. + * + * @var array + * @since 11.1 */ protected $_forms = array(); @@ -31,7 +38,8 @@ abstract class JModelForm extends JModel * * @param integer $pk The numeric id of the primary key. * - * @return boolean False on failure or error, true otherwise. + * @return boolean False on failure or error, true otherwise. + * @since 11.1 */ public function checkin($pk = null) { @@ -68,6 +76,7 @@ public function checkin($pk = null) * @param integer $pk The numeric id of the primary key. * * @return boolean False on failure or error, true otherwise. + * @since 11.1 */ public function checkout($pk = null) { @@ -101,8 +110,9 @@ public function checkout($pk = null) /** * Abstract method for getting the form from the model. * - * @param array $data Data for the form. - * @param boolean $loadData True if the form is to load its own data (default case), false if not. + * @param array $data Data for the form. + * @param boolean $loadData True if the form is to load its own data (default case), false if not. + * * @return mixed A JForm object on success, false on failure * @since 11.1 */ @@ -118,6 +128,8 @@ abstract public function getForm($data = array(), $loadData = true); * @param string $xpath An optional xpath to search for the fields. * * @return mixed JForm object on success, False on error. + * @since 11.1 + * @see JForm */ protected function loadForm($name, $source = null, $options = array(), $clear = false, $xpath = false) { @@ -186,6 +198,7 @@ protected function loadFormData() * * @since 11.1 * @throws Exception if there is an error in the form event. + * @see JFormField */ protected function preprocessForm(JForm $form, $data, $group = 'content') { @@ -219,7 +232,10 @@ protected function preprocessForm(JForm $form, $data, $group = 'content') * * @return mixed Array of filtered data if valid, false otherwise. * - * @since 1.1 + * @since 11.1 + * + * @see JFormRule + * @see JFilterInput */ function validate($form, $data, $group = null) { diff --git a/libraries/joomla/application/component/modelitem.php b/libraries/joomla/application/component/modelitem.php index f74a1b76dc..6d3444472e 100644 --- a/libraries/joomla/application/component/modelitem.php +++ b/libraries/joomla/application/component/modelitem.php @@ -24,6 +24,7 @@ abstract class JModelItem extends JModel * An item. * * @var array + * @since 11.1 */ protected $_item = null; @@ -31,6 +32,7 @@ abstract class JModelItem extends JModel * Model context string. * * @var string + * @since 11.1 */ protected $_context = 'group.type'; @@ -41,8 +43,10 @@ abstract class JModelItem extends JModel * different modules that might need different sets of data or different * ordering requirements. * - * @param string $context A prefix for the store id. - * @return string A store id. + * @param string $context A prefix for the store id. + * + * @return string A store id. + * @since 11.1 */ protected function getStoreId($id = '') { diff --git a/libraries/joomla/application/component/modellist.php b/libraries/joomla/application/component/modellist.php index d7e2a3c6d8..be7721ac17 100644 --- a/libraries/joomla/application/component/modellist.php +++ b/libraries/joomla/application/component/modellist.php @@ -59,6 +59,9 @@ class JModelList extends JModel * @param array $config An optional associative array of configuration settings. * * @return JModelList + * @since 11.1 + * + * @see JController */ public function __construct($config = array()) { @@ -138,7 +141,6 @@ public function getItems() * Method to get a JDatabaseQuery object for retrieving the data set from a database. * * @return JDatabaseQuery A JDatabaseQuery object to retrieve the data set. - * * @since 11.1 */ protected function getListQuery() @@ -184,7 +186,8 @@ public function getPagination() * different modules that might need different sets of data or different * ordering requirements. * - * @param string An identifier string to generate the store id. + * @param string $id An identifier string to generate the store id. + * * @return string A store id. * @since 11.1 */ @@ -323,7 +326,7 @@ protected function populateState($ordering = null, $direction = null) * @param string $request The name of the variable passed in a request. * @param string $default The default value for the variable if not found. Optional. * @param string $type Filter for the variable, for valid values see {@link JFilterInput::clean()}. Optional. - * @param boolean $resetPage If true, the limitstart in request is set to zero + * @param boolean $resetpage If true, the limitstart in request is set to zero * * @return The request user state. * diff --git a/libraries/joomla/application/input/cli.php b/libraries/joomla/application/input/cli.php index 11250a5624..9c2a32bdff 100644 --- a/libraries/joomla/application/input/cli.php +++ b/libraries/joomla/application/input/cli.php @@ -21,14 +21,18 @@ class JInputCLI extends JInput { /** - * @var string The executable that was called to urn the CLI script. + * The executable that was called to run the CLI script. + * + * @var string * @since 11.1 */ public $executable; /** - * @var array The additional arguments passed to the script that are not associated - * with a specific argument name. + * The additional arguments passed to the script that are not associated + * with a specific argument name. + * + * @var array * @since 11.1 */ public $args = array(); diff --git a/libraries/joomla/application/input/cookie.php b/libraries/joomla/application/input/cookie.php index d478fc2d09..68ad0d93a3 100644 --- a/libraries/joomla/application/input/cookie.php +++ b/libraries/joomla/application/input/cookie.php @@ -64,7 +64,7 @@ public function __construct($source = null, $options = array()) * @param string $domain The domain that the cookie is available to. To make the cookie available * on all subdomains of example.com (including example.com itself) then you'd * set it to '.example.com'. Although some browsers will accept cookies without - * the initial ., � RFC 2109 requires it to be included. Setting the domain to + * the initial ., RFC 2109 requires it to be included. Setting the domain to * 'www.example.com' or '.www.example.com' will make the cookie only available * in the www subdomain. * @param bool $secure Indicates that the cookie should only be transmitted over a secure HTTPS @@ -80,6 +80,7 @@ public function __construct($source = null, $options = array()) * @return void * * @see setcookie() + * @link http://www.ietf.org/rfc/rfc2109.txt * @since 11.1 */ public function set($name, $value, $expire = 0, $path = '', $domain = '', $secure = false, $httpOnly = false) diff --git a/libraries/joomla/application/input/files.php b/libraries/joomla/application/input/files.php index 6169e9946a..30d7c36a10 100644 --- a/libraries/joomla/application/input/files.php +++ b/libraries/joomla/application/input/files.php @@ -30,7 +30,7 @@ class JInputFiles extends JInput * @param mixed $default Default value to return if variable does not exist. * @param string $filter Filter to apply to the value. * - * @return mixed The filtered input value. + * @return mixed The filtered input value. * * @since 11.1 */ diff --git a/libraries/joomla/application/module/helper.php b/libraries/joomla/application/module/helper.php index 4eb756fd5d..2ab0736cf5 100644 --- a/libraries/joomla/application/module/helper.php +++ b/libraries/joomla/application/module/helper.php @@ -43,6 +43,7 @@ public static function &getModule($name, $title = null) if ($modules[$i]->name == $name || $modules[$i]->module == $name) { // Match the title if we're looking for a specific instance of the module if (!$title || $modules[$i]->title == $title) { + // Found it $result = &$modules[$i]; break; // Found it } @@ -210,8 +211,8 @@ public static function renderModule($module, $attribs = array()) ob_end_clean(); } } - - $app->scope = $scope; //revert the scope + //revert the scope + $app->scope = $scope; if (constant('JDEBUG')) { JProfiler::getInstance('Application')->mark('afterRenderModule '.$module->module.' ('.$module->title.')'); @@ -224,7 +225,8 @@ public static function renderModule($module, $attribs = array()) * Get the path to a layout for a module * * @param string $module The name of the module - * @param string $layout The name of the module layout. If alternative layout, in the form template:filename. + * @param string $layout The name of the module layout. If alternative + * layout, in the form template:filename. * * @return string The path to the module layout * @@ -342,12 +344,7 @@ protected static function &_load() // Only accept modules without explicit exclusions. if (!$negHit) { - //determine if this is a custom module - $file = $module->module; - $custom = substr($file, 0, 4) == 'mod_' ? 0 : 1; - $module->user = $custom; - // Custom module name is given by the title field, otherwise strip off "mod_" - $module->name = $custom ? $module->title : substr($file, 4); + $module->name = substr($module->module , 4); $module->style = null; $module->position = strtolower($module->position); $clean[$module->id] = $module; @@ -370,12 +367,12 @@ protected static function &_load() * * Caching modes: * To be set in XML: - * 'static' one cache file for all pages with the same module parameters - * 'oldstatic' 1.5. definition of module caching, one cache file for all pages with the same module id and user aid, - * 'itemid' changes on itemid change, - * To be called from inside the module: - * 'safeuri' id created from $cacheparams->modeparams array, - * 'id' module sets own cache id's + * 'static' One cache file for all pages with the same module parameters + * 'oldstatic' 1.5 definition of module caching, one cache file for all pages + * with the same module id and user aid, + * 'itemid' Changes on itemid change, to be called from inside the module: + * 'safeuri' Id created from $cacheparams->modeparams array, + * 'id' Module sets own cache id's * * @param object $module Module object * @param object $moduleparams Module parameters @@ -386,6 +383,8 @@ protected static function &_load() * @return string * * @since 11.1 + * + * @link JFilterInput::clean() */ public static function moduleCache($module, $moduleparams, $cacheparams) { diff --git a/libraries/joomla/cache/controller/callback.php b/libraries/joomla/cache/controller/callback.php index 014cc4a116..571f6a0120 100644 --- a/libraries/joomla/cache/controller/callback.php +++ b/libraries/joomla/cache/controller/callback.php @@ -23,7 +23,8 @@ class JCacheControllerCallback extends JCacheController /** * Executes a cacheable callback if not found in cache else returns cached output and result * - * Since arguments to this function are read with func_get_args you can pass any number of arguments to this method + * Since arguments to this function are read with func_get_args you can pass any number of + * arguments to this method * as long as the first argument passed is the callback definition. * * The callback definition can be in several forms: @@ -50,7 +51,7 @@ public function call() * @param mixed Callback or string shorthand for a callback * @param array Callback arguments * @param string Cache id - * @param boolean Perform workarounds on data? + * @param boolean True to perform workarounds on data * @param array Workaround options * * @return mixed Result of the callback diff --git a/libraries/joomla/cache/controller/output.php b/libraries/joomla/cache/controller/output.php index 81cb8452e1..3fb35655ec 100644 --- a/libraries/joomla/cache/controller/output.php +++ b/libraries/joomla/cache/controller/output.php @@ -36,8 +36,8 @@ class JCacheControllerOutput extends JCacheController /** * Start the cache * - * @param string $id The cache data id - * @param string $group The cache data group + * @param string $id The cache data id + * @param string $group The cache data group * * @return boolean True if the cache is hit (false else) * @since 11.1 diff --git a/libraries/joomla/cache/controller/page.php b/libraries/joomla/cache/controller/page.php index 5fca715967..589853cc8d 100644 --- a/libraries/joomla/cache/controller/page.php +++ b/libraries/joomla/cache/controller/page.php @@ -57,7 +57,7 @@ public function get($id=false, $group='page', $wrkarounds=true) // Initialise variables. $data = false; - // If an id is not given generate it from the request + // If an id is not given, generate it from the request if ($id == false) { $id = $this->_makeId(); } @@ -146,8 +146,8 @@ public function store($wrkarounds=true) /** * Generate a page cache id * - * @todo TODO: Discuss whether this should be coupled to a data hash or a request - * hash ... perhaps hashed with a serialized request + * @todo Discuss whether this should be coupled to a data hash or a request + * hash ... perhaps hashed with a serialized request * * @return string MD5 Hash : page cache id * @@ -160,7 +160,8 @@ protected function _makeId() } /** - * There is no change in page data so send a not modified header and die gracefully + * There is no change in page data so send an + * unmodified header and die gracefully * * @return void * diff --git a/libraries/joomla/cache/controller/view.php b/libraries/joomla/cache/controller/view.php index 7a141f667e..4c5e367324 100644 --- a/libraries/joomla/cache/controller/view.php +++ b/libraries/joomla/cache/controller/view.php @@ -21,10 +21,10 @@ class JCacheControllerView extends JCacheController /** * Get the cached view data * - * @param object $view The view object to cache output for - * @param string $method The method name of the view method to cache output for - * @param string $group The cache data group - * @param string $id The cache data id + * @param object $view The view object to cache output for + * @param string $method The method name of the view method to cache output for + * @param string $group The cache data group + * @param string $id The cache data id * * @return boolean True if the cache is hit (false else) * @@ -112,8 +112,8 @@ public function get(&$view, $method, $id=false, $wrkarounds=true) /** * Generate a view cache id. * - * @param object $view The view object to cache output for - * @param string $method The method name to cache for the view object + * @param object $view The view object to cache output for + * @param string $method The method name to cache for the view object * * @return string MD5 Hash : view cache id * diff --git a/libraries/joomla/cache/storage/apc.php b/libraries/joomla/cache/storage/apc.php index 9c7528702e..0be3735b13 100644 --- a/libraries/joomla/cache/storage/apc.php +++ b/libraries/joomla/cache/storage/apc.php @@ -15,17 +15,19 @@ * @package Joomla.Platform * @subpackage Cache * @since 11.1 + * + * @see http://php.net/manual/en/book.apc.php */ class JCacheStorageApc extends JCacheStorage { /** * Get cached data from APC by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param boolean $checkTime True to verify cache time expiration threshold + * @param string $id The cache data id + * @param string $group The cache data group + * @param boolean $checkTime True to verify cache time expiration threshold * - * @return mixed Boolean false on failure or a cached data string + * @return mixed Boolean False on failure or a cached data string * * @since 11.1 */ @@ -78,9 +80,9 @@ public function getAll() /** * Store the data to APC by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param string $data The data to store in cache + * @param string $id The cache data id + * @param string $group The cache data group + * @param string $data The data to store in cache * * @return boolean True on success, false otherwise * @@ -95,8 +97,8 @@ public function store($id, $group, $data) /** * Remove a cached data entry by id and group * - * @param string $id The cache data id - * @param string $group The cache data group + * @param string $id The cache data id + * @param string $group The cache data group * * @return boolean True on success, false otherwise * @@ -111,11 +113,11 @@ public function remove($id, $group) /** * Clean cache for a group given a mode. * - * group mode : cleans all cache in the group - * notgroup mode : cleans all cache not in the group + * group mode : cleans all cache in the group + * notgroup mode : cleans all cache not in the group * - * @param string $group The cache data group - * @param string $mode The mode for cleaning cache [group|notgroup] + * @param string $group The cache data group + * @param string $mode The mode for cleaning cache [group|notgroup] * * @return boolean True on success, false otherwise * @@ -160,7 +162,8 @@ public function gc() /** * Test to see if the cache storage is available. * - * @return boolean True on success, false otherwise. + * @return boolean True on success, false otherwise. + * @since 11.1 */ public static function test() { @@ -170,9 +173,9 @@ public static function test() /** * Lock cached item - override parent as this is more efficient * - * @param string $id The cache data id - * @param string $group The cache data group - * @param integer $locktime Cached item max lock time + * @param string $id The cache data id + * @param string $group The cache data group + * @param integer $locktime Cached item max lock time * * @return boolean True on success, false otherwise. * @@ -216,9 +219,9 @@ public function lock($id,$group,$locktime) /** * Unlock cached item - override parent for cacheid compatibility with lock * - * @param string $id The cache data id - * @param string $group The cache data group - * @param integer $locktime Cached item max lock time + * @param string $id The cache data id + * @param string $group The cache data group + * @param integer $locktime Cached item max lock time * * @return boolean True on success, false otherwise. * diff --git a/libraries/joomla/cache/storage/cachelite.php b/libraries/joomla/cache/storage/cachelite.php index 66f0c964f9..310d53b505 100644 --- a/libraries/joomla/cache/storage/cachelite.php +++ b/libraries/joomla/cache/storage/cachelite.php @@ -10,20 +10,28 @@ defined('JPATH_PLATFORM') or die; /** - * Cache litestorage handler + * Cache lite storage handler * * @package Joomla.Platform * @subpackage Cache * @since 11.1 + * + * @see http://pear.php.net/package/Cache_Lite/ */ class JCacheStorageCachelite extends JCacheStorage { /** - * @since 11.1 + * + * + * @var object + * @since 11.1 */ protected static $CacheLiteInstance = null; /** + * + * + * @var * @since 11.1 */ protected $_root; @@ -197,11 +205,10 @@ public function remove($id, $group) /** * Clean cache for a group given a mode. * - * group mode : cleans all cache in the group - * notgroup mode : cleans all cache not in the group - * * @param string $group The cache data group. * @param string $mode The mode for cleaning cache [group|notgroup]. + * group mode : cleans all cache in the group + * notgroup mode : cleans all cache not in the group * * @return boolean True on success, false otherwise. * @@ -263,7 +270,7 @@ public function clean($group, $mode = null) /** * Garbage collect expired cache data * - * @return boolean True on success, false otherwise. + * @return boolean True on success, false otherwise. * * @since 11.1 */ @@ -294,7 +301,7 @@ public function gc() return $success; } - + /** * Test to see if the cache storage is available. * diff --git a/libraries/joomla/cache/storage/eaccelerator.php b/libraries/joomla/cache/storage/eaccelerator.php index b3462f943f..b9a67f4a8d 100644 --- a/libraries/joomla/cache/storage/eaccelerator.php +++ b/libraries/joomla/cache/storage/eaccelerator.php @@ -15,6 +15,8 @@ * @package Joomla.Platform * @subpackage Cache * @since 11.1 + * + * @link http://eaccelerator.net/ */ class JCacheStorageEaccelerator extends JCacheStorage { @@ -22,6 +24,8 @@ class JCacheStorageEaccelerator extends JCacheStorage * Constructor * * @param array $options optional parameters + * + * @since 11.1 */ public function __construct($options = array()) { @@ -31,9 +35,10 @@ public function __construct($options = array()) /** * Get cached data by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param boolean $checkTime True to verify cache time expiration threshold + * @param string $id The cache data id + * @param string $group The cache data group + * @param boolean $checkTime True to verify cache time expiration threshold + * * @return mixed Boolean false on failure or a cached data string * @since 11.1 */ @@ -64,6 +69,7 @@ public function getAll() foreach ($keys as $key) { /* Trim leading ":" to work around list_keys namespace bug in eAcc. This will still work when bug is fixed */ + // http://eaccelerator.net/ticket/287 $name = ltrim($key['name'], ':'); $namearr = explode('-',$name); @@ -89,9 +95,10 @@ public function getAll() /** * Store the data to by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param string $data The data to store in cache + * @param string $id The cache data id + * @param string $group The cache data group + * @param string $data The data to store in cache + * * @return boolean True on success, false otherwise * @since 11.1 */ @@ -104,8 +111,8 @@ public function store($id, $group, $data) /** * Remove a cached data entry by id and group * - * @param string $id The cache data id - * @param string $group The cache data group + * @param string $id The cache data id + * @param string $group The cache data group * @return boolean True on success, false otherwise * @since 11.1 */ @@ -118,11 +125,11 @@ function remove($id, $group) /** * Clean cache for a group given a mode. * - * group mode : cleans all cache in the group - * notgroup mode : cleans all cache not in the group + * @param string $group The cache data group + * @param string $mode The mode for cleaning cache [group|notgroup] + * group mode : cleans all cache in the group + * notgroup mode : cleans all cache not in the group * - * @param string $group The cache data group - * @param string $mode The mode for cleaning cache [group|notgroup] * @return boolean True on success, false otherwise * @since 11.1 */ @@ -148,7 +155,7 @@ public function clean($group, $mode = null) /** * Garbage collect expired cache data * - * @return boolean True on success, false otherwise. + * @return boolean True on success, false otherwise. * @since 11.1 */ public function gc() @@ -160,6 +167,7 @@ public function gc() * Test to see if the cache storage is available. * * @return boolean True on success, false otherwise. + * @since 11.1 */ public static function test() { @@ -172,6 +180,7 @@ public static function test() * @param string $id The cache data id * @param string $group The cache data group * @param integer $locktime Cached item max lock time + * * @return boolean True on success, false otherwise. * @since 11.1 */ @@ -190,7 +199,8 @@ public function lock($id,$group,$locktime) $lock_counter = 0; - // loop until you find that the lock has been released. that implies that data get from other thread has finished + // Loop until you find that the lock has been released. + // That implies that data get from other thread has finished while ($data_lock === false) { if ($lock_counter > $looptime) { @@ -215,6 +225,7 @@ public function lock($id,$group,$locktime) * * @param string $id The cache data id * @param string $group The cache data group + * * @return boolean True on success, false otherwise. * @since 11.1 */ diff --git a/libraries/joomla/cache/storage/file.php b/libraries/joomla/cache/storage/file.php index 80ab6577ae..bfda6db727 100644 --- a/libraries/joomla/cache/storage/file.php +++ b/libraries/joomla/cache/storage/file.php @@ -19,7 +19,9 @@ class JCacheStorageFile extends JCacheStorage { /** - * @since 11.1 + * + * @var string + * @since 11.1 */ protected $_root; @@ -40,9 +42,10 @@ public function __construct($options = array()) /** * Get cached data from a file by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param boolean $checkTime True to verify cache time expiration threshold + * @param string $id The cache data id + * @param string $group The cache data group + * @param boolean $checkTime True to verify cache time expiration threshold + * * @return mixed Boolean false on failure or a cached data string * @since 11.1 */ @@ -70,7 +73,7 @@ public function get($id, $group, $checkTime = true) /** * Get all cached data * - * @return array data + * @return array The cached data * @since 11.1 */ public function getAll() @@ -98,9 +101,10 @@ public function getAll() /** * Store the data to a file by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param string $data The data to store in cache + * @param string $id The cache data id + * @param string $group The cache data group + * @param string $data The data to store in cache + * * @return boolean True on success, false otherwise * @since 11.1 */ @@ -132,8 +136,9 @@ public function store($id, $group, $data) /** * Remove a cached data file by id and group * - * @param string $id The cache data id - * @param string $group The cache data group + * @param string $id The cache data id + * @param string $group The cache data group + * * @return boolean True on success, false otherwise * @since 11.1 */ @@ -149,11 +154,11 @@ public function remove($id, $group) /** * Clean cache for a group given a mode. * - * group mode : cleans all cache in the group - * notgroup mode : cleans all cache not in the group + * @param string $group The cache data group + * @param string $mode The mode for cleaning cache [group|notgroup] + * group mode : cleans all cache in the group + * notgroup mode : cleans all cache not in the group * - * @param string $group The cache data group - * @param string $mode The mode for cleaning cache [group|notgroup] * @return boolean True on success, false otherwise * @since 11.1 */ @@ -224,9 +229,10 @@ public static function test() /** * Lock cached item * - * @param string $id The cache data id - * @param string $group The cache data group - * @param integer $locktime Cached item max lock time + * @param string $id The cache data id + * @param string $group The cache data group + * @param integer $locktime Cached item max lock time + * * @return boolean True on success, false otherwise. * @since 11.1 */ @@ -273,8 +279,8 @@ public function lock($id,$group,$locktime) /** * Unlock cached item * - * @param string $id The cache data id - * @param string $group The cache data group + * @param string $id The cache data id + * @param string $group The cache data group * @return boolean True on success, false otherwise. * @since 11.1 */ @@ -292,13 +298,13 @@ public function unlock($id, $group = null) return $ret; } - - /** * Check to make sure cache is still valid, if not, delete it. * - * @param string $id Cache key to expire. - * @param string $group The cache data group. + * @param string $id Cache key to expire. + * @param string $group The cache data group. + * + * @return boolean False if not valid * @since 11.1 */ protected function _checkExpire($id, $group) @@ -320,8 +326,9 @@ protected function _checkExpire($id, $group) /** * Get a cache file path from an id/group pair * - * @param string $id The cache data id - * @param string $group The cache data group + * @param string $id The cache data id + * @param string $group The cache data group + * * @return string The cache file path * @since 11.1 */ @@ -348,7 +355,8 @@ protected function _getFilePath($id, $group) /** * Quickly delete a folder of files * - * @param string The path to the folder to delete. + * @param string The path to the folder to delete. + * * @return boolean True on success. * @since 11.1 */ @@ -371,7 +379,6 @@ protected function _deleteFolder($path) return false; } - // Remove all the files in folder if they exist; disable all filtering $files = $this->_filesInFolder($path, '.', false, true, array(), array()); @@ -397,7 +404,6 @@ protected function _deleteFolder($path) } } - // Remove sub-folders of folder; disable all filtering $folders = $this->_folders($path, '.', false, true, array(), array()); @@ -412,7 +418,6 @@ protected function _deleteFolder($path) } } - // In case of restricted permissions we zap it one way or the other // as long as the owner is either the webserver or the ftp if (@rmdir($path)) { @@ -424,12 +429,12 @@ protected function _deleteFolder($path) return $ret; } - /** * Function to strip additional / or \ in a path name * * @param string The path to clean * @param string Directory separator (optional) + * * @return string The cleaned path * @since 11.1 */ @@ -454,10 +459,11 @@ protected function _cleanPath($path, $ds = DS) * @param string The path of the folder to read. * @param string A filter for file names. * @param mixed True to recursively search into sub-folders, or an - * integer to specify the maximum depth. + * integer to specify the maximum depth. * @param boolean True to return the full path to the file. * @param array Array with names of files which should not be shown in - * the result. + * the result. + * * @return array Files in the given folder. * @since 11.1 */ @@ -475,7 +481,7 @@ protected function _filesInFolder($path, $filter = '.', $recurse = false, $fullp return false; } - // read the source directory + // Read the source directory $handle = opendir($path); if (count($excludefilter)) { $excludefilter = '/('. implode('|', $excludefilter) .')/'; @@ -519,12 +525,12 @@ protected function _filesInFolder($path, $filter = '.', $recurse = false, $fullp * @param string The path of the folder to read. * @param string A filter for folder names. * @param mixed True to recursively search into sub-folders, or an - * integer to specify the maximum depth. + * integer to specify the maximum depth. * @param boolean True to return the full path to the folders. * @param array Array with names of folders which should not be shown in - * the result. + * the result. * @param array Array with regular expressions matching folders which - * should not be shown in the result. + * should not be shown in the result. * @return array Folders in the given folder. * @since 11.1 */ @@ -580,4 +586,4 @@ protected function _folders($path, $filter = '.', $recurse = false, $fullpath = return $arr; } -} +} \ No newline at end of file diff --git a/libraries/joomla/cache/storage/helpers/helper.php b/libraries/joomla/cache/storage/helpers/helper.php index cbde80a36d..080ce068cd 100644 --- a/libraries/joomla/cache/storage/helpers/helper.php +++ b/libraries/joomla/cache/storage/helpers/helper.php @@ -19,24 +19,33 @@ class JCacheStorageHelper { /** + * Cache data group + * + * @var * @since 11.1 */ public $group = ''; /** + * Cached item size + * + * @var string * @since 11.1 */ public $size = 0; /** - * @since 11.1 + * Counter + * + * @var integer + * @since 11.1 */ public $count = 0; /** * Constructor * - * @param array $options options + * @param string $group The cache data group */ public function __construct($group) { @@ -46,8 +55,7 @@ public function __construct($group) /** * Increase cache items count. * - * @param string $size Cached item size - * @param string $group The cache data group + * @param string $size Cached item size * @since 11.1 */ public function updateSize($size) diff --git a/libraries/joomla/cache/storage/memcache.php b/libraries/joomla/cache/storage/memcache.php index cd3b6a3668..3ef17dfeef 100644 --- a/libraries/joomla/cache/storage/memcache.php +++ b/libraries/joomla/cache/storage/memcache.php @@ -15,6 +15,8 @@ * @package Joomla.Platform * @subpackage Cache * @since 11.1 + * + * @see http://php.net/manual/en/book.memcache.php */ class JCacheStorageMemcache extends JCacheStorage { @@ -24,11 +26,15 @@ class JCacheStorageMemcache extends JCacheStorage protected static $_db = null; /** + * + * @var boolean * @since 11.1 */ protected $_persistent = false; /** + * + * @var * @since 11.1 */ protected $_compress = 0; @@ -48,7 +54,7 @@ public function __construct($options = array()) } /** - * return memcache connection object + * Return memcache connection object * * @return object memcache connection object * @since 11.1 @@ -78,7 +84,7 @@ protected function getConnection() return JError::raiseError(404, "Could not connect to memcache server"); } - // memcahed has no list keys, we do our own accounting, initalise key index + // Memcahed has no list keys, we do our own accounting, initalise key index if (self::$_db->get($this->_hash.'-index') === false) { $empty = array(); self::$_db->set($this->_hash.'-index', $empty , $this->_compress, 0); @@ -90,9 +96,10 @@ protected function getConnection() /** * Get cached data from memcache by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param boolean $checkTime True to verify cache time expiration threshold + * @param string $id The cache data id + * @param string $group The cache data group + * @param boolean $checkTime True to verify cache time expiration threshold + * * @return mixed Boolean false on failure or a cached data string * @since 11.1 */ @@ -148,9 +155,10 @@ public function getAll() /** * Store the data to memcache by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param string $data The data to store in cache + * @param string $id The cache data id + * @param string $group The cache data group + * @param string $data The data to store in cache + * * @return boolean True on success, false otherwise * @since 11.1 */ @@ -185,8 +193,9 @@ public function store($id, $group, $data) /** * Remove a cached data entry by id and group * - * @param string $id The cache data id - * @param string $group The cache data group + * @param string $id The cache data id + * @param string $group The cache data group + * * @return boolean True on success, false otherwise * @since 11.1 */ @@ -216,11 +225,11 @@ public function remove($id, $group) /** * Clean cache for a group given a mode. * - * group mode : cleans all cache in the group - * notgroup mode : cleans all cache not in the group + * @param string $group The cache data group + * @param string $mode The mode for cleaning cache [group|notgroup] + * group mode : cleans all cache in the group + * notgroup mode : cleans all cache not in the group * - * @param string $group The cache data group - * @param string $mode The mode for cleaning cache [group|notgroup] * @return boolean True on success, false otherwise * @since 11.1 */ @@ -276,9 +285,10 @@ public static function test() /** * Lock cached item - override parent as this is more efficient * - * @param string $id The cache data id - * @param string $group The cache data group - * @param integer $locktime Cached item max lock time + * @param string $id The cache data id + * @param string $group The cache data group + * @param integer $locktime Cached item max lock time + * * @return boolean True on success, false otherwise. * @since 11.1 */ @@ -313,7 +323,8 @@ public function lock($id,$group,$locktime) $lock_counter = 0; - // loop until you find that the lock has been released. that implies that data get from other thread has finished + // Loop until you find that the lock has been released. + // That implies that data get from other thread has finished while ($data_lock === FALSE) { if ($lock_counter > $looptime) { @@ -336,11 +347,12 @@ public function lock($id,$group,$locktime) /** * Unlock cached item - override parent for cacheid compatibility with lock * - * @param string $id The cache data id - * @param string $group The cache data group - * @param integer $locktime Cached item max lock time + * @param string $id The cache data id + * @param string $group The cache data group + * @param integer $locktime Cached item max lock time + * + * @return boolean True on success, false otherwise. * @since 11.1 - * @return boolean True on success, false otherwise. */ public function unlock($id,$group=null) { @@ -380,7 +392,7 @@ protected function lockindex() $lock_counter = 0; - // loop until you find that the lock has been released. that implies that data get from other thread has finished + // Loop until you find that the lock has been released. that implies that data get from other thread has finished while ( $data_lock === FALSE ) { if ( $lock_counter > $looptime ) { diff --git a/libraries/joomla/cache/storage/wincache.php b/libraries/joomla/cache/storage/wincache.php index 1f74da9fd3..8457415fd1 100644 --- a/libraries/joomla/cache/storage/wincache.php +++ b/libraries/joomla/cache/storage/wincache.php @@ -15,6 +15,8 @@ * @package Joomla.Platform * @subpackage Cache * @since 11.1 + * + * @see http://php.net/manual/en/book.wincache.php */ class JCacheStorageWincache extends JCacheStorage { @@ -22,6 +24,8 @@ class JCacheStorageWincache extends JCacheStorage * Constructor * * @param array $options optional parameters + * + * @since 11.1 */ public function __construct( $options = array() ) { @@ -31,9 +35,10 @@ public function __construct( $options = array() ) /** * Get cached data from WINCACHE by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param boolean $checkTime True to verify cache time expiration threshold + * @param string $id The cache data id + * @param string $group The cache data group + * @param boolean $checkTime True to verify cache time expiration threshold + * * @return mixed Boolean false on failure or a cached data string * @since 11.1 */ @@ -73,8 +78,9 @@ public function getAll() $item->updateSize($key['value_size']/1024); } else { + // Dummy, WINCACHE version is too low $item->updateSize(1); - } // dummy, WINCACHE version is too low + } $data[$group] = $item; } } @@ -88,6 +94,7 @@ public function getAll() * @param string $id The cache data id * @param string $group The cache data group * @param string $data The data to store in cache + * * @return boolean True on success, false otherwise * @since 11.1 */ @@ -102,6 +109,7 @@ public function store($id, $group, $data) * * @param string $id The cache data id * @param string $group The cache data group + * * @return boolean True on success, false otherwise * @since 11.1 */ @@ -114,11 +122,11 @@ public function remove($id, $group) /** * Clean cache for a group given a mode. * - * group mode : cleans all cache in the group - * notgroup mode : cleans all cache not in the group - * - * @param string $group The cache data group - * @param string $mode The mode for cleaning cache [group|notgroup] + * @param string $group The cache data group + * @param string $mode The mode for cleaning cache [group|notgroup] + * group mode : cleans all cache in the group + * notgroup mode : cleans all cache not in the group + * * @return boolean True on success, false otherwise * @since 11.1 */ diff --git a/libraries/joomla/cache/storage/xcache.php b/libraries/joomla/cache/storage/xcache.php index 976f994750..bf885102b8 100644 --- a/libraries/joomla/cache/storage/xcache.php +++ b/libraries/joomla/cache/storage/xcache.php @@ -15,15 +15,18 @@ * @package Joomla.Platform * @subpackage Cache * @since 11.1 + * + * @link http://xcache.lighttpd.net/ */ class JCacheStorageXcache extends JCacheStorage { /** * Get cached data by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param boolean $checkTime True to verify cache time expiration threshold + * @param string $id The cache data id + * @param string $group The cache data group + * @param boolean $checkTime True to verify cache time expiration threshold + * * @return mixed Boolean false on failure or a cached data string * @since 11.1 */ @@ -42,7 +45,7 @@ public function get($id, $group, $checkTime = true) /** * Get all cached data * - * requires the php.ini setting xcache.admin.enable_auth = Off + * This requires the php.ini setting xcache.admin.enable_auth = Off. * * @return array data * @since 11.1 @@ -82,9 +85,10 @@ public function getAll() /** * Store the data by id and group * - * @param string $id The cache data id - * @param string $group The cache data group - * @param string $data The data to store in cache + * @param string $id The cache data id + * @param string $group The cache data group + * @param string $data The data to store in cache + * * @return boolean True on success, false otherwise * @since 11.1 */ @@ -98,8 +102,9 @@ public function store($id, $group, $data) /** * Remove a cached data entry by id and group * - * @param string $id The cache data id - * @param string $group The cache data group + * @param string $id The cache data id + * @param string $group The cache data group + * * @return boolean True on success, false otherwise * @since 11.1 */ @@ -117,13 +122,13 @@ public function remove($id, $group) /** * Clean cache for a group given a mode. * - * requires the php.ini setting xcache.admin.enable_auth = Off + * This requires the php.ini setting xcache.admin.enable_auth = Off. * - * group mode : cleans all cache in the group - * notgroup mode : cleans all cache not in the group + * @param string $group The cache data group + * @param string $mode The mode for cleaning cache [group|notgroup] + * group mode : cleans all cache in the group + * notgroup mode : cleans all cache not in the group * - * @param string $group The cache data group - * @param string $mode The mode for cleaning cache [group|notgroup] * @return boolean True on success, false otherwise * @since 11.1 */ @@ -143,13 +148,15 @@ public function clean($group, $mode = null) /** * Garbage collect expired cache data + * This is a dummy, since xcache has built in garbage collector, turn it + * on in php.ini by changing default xcache.gc_interval setting from + * 0 to 3600 (=1 hour) * * @return boolean True on success, false otherwise. * @since 11.1 */ public function gc() { - // dummy, xcache has builtin garbage collector, turn it on in php.ini by changing default xcache.gc_interval setting from 0 to 3600 (=1 hour) /** $now = time(); @@ -177,7 +184,8 @@ public function gc() /** * Test to see if the cache storage is available. * - * @return boolean True on success, false otherwise. + * @return boolean True on success, false otherwise. + * @since 11.1 */ public static function test() { diff --git a/libraries/joomla/error/error.php b/libraries/joomla/error/error.php index 3b3a84f095..ea21fcc63b 100644 --- a/libraries/joomla/error/error.php +++ b/libraries/joomla/error/error.php @@ -60,10 +60,12 @@ abstract class JError * Method to determine if a value is an exception object. This check supports * both JException and PHP5 Exception objects * - * @param mixed &$object Object to check + * @param mixed &$object Object to check * * @return boolean True if argument is an exception, false otherwise. * @since 11.1 + * + * @deprecated */ public static function isError(& $object) { @@ -74,10 +76,12 @@ public static function isError(& $object) /** * Method for retrieving the last exception object in the error stack * - * @params boolean $unset + * @params boolean $unset * - * @return mixed Last exception object in the error stack or boolean false if none exist + * @return mixed Last exception object in the error stack or boolean false if none exist * @since 11.1 + * + * @deprecated */ public static function getError($unset = false) { @@ -99,6 +103,8 @@ public static function getError($unset = false) * * @return array Chronological array of errors that have been stored during script execution * @since 11.1 + * + * @deprecated */ public static function getErrors() { @@ -112,6 +118,8 @@ public static function getErrors() * * @return void * @since 11.1 + * + * @deprecated */ public static function addToStack(JException &$e) { JError::$stack[] = &$e; @@ -129,7 +137,8 @@ public static function addToStack(JException &$e) { * @return mixed The JException object * @since 11.1 * - * @see JException + * @see JException + * @deprecated */ public static function raise($level, $code, $msg, $info = null, $backtrace = false) { @@ -148,7 +157,8 @@ public static function raise($level, $code, $msg, $info = null, $backtrace = fal * @return reference * @since 11.1 * - * @see JException + * @see JException + * @deprecated */ public static function throwError(&$exception) { @@ -195,9 +205,10 @@ public static function throwError(&$exception) * the user should never see, like a database DSN). * * @return object $error The configured JError object - * - * @see raise() * @since 11.1 + * + * @see raise() + * @deprecated */ public static function raiseError($code, $msg, $info = null) { @@ -214,6 +225,11 @@ public static function raiseError($code, $msg, $info = null) * * @return object The configured JError object * @since 11.1 + * + * @since 11.1 + * @see JError + * @see raise() + * @deprecated */ public static function raiseWarning($code, $msg, $info = null) { @@ -232,6 +248,7 @@ public static function raiseWarning($code, $msg, $info = null) * * @see raise() * @since 11.1 + * @deprecated */ public static function raiseNotice($code, $msg, $info = null) { @@ -245,6 +262,8 @@ public static function raiseNotice($code, $msg, $info = null) * * @return array All error handling details * @since 11.1 + * + * @deprecated */ public static function getErrorHandling($level) { @@ -275,6 +294,8 @@ public static function getErrorHandling($level) * * @return mixed True on success or a JException object if failed. * @since 11.1 + * + * @deprecated */ public static function setErrorHandling($level, $mode, $options = null) { @@ -329,6 +350,8 @@ public static function setErrorHandling($level, $mode, $options = null) * * @see set_error_handler * @since 11.1 + * + * @deprecated */ public static function attachHandler() { @@ -383,6 +406,8 @@ public static function registerErrorLevel($level, $name, $handler = 'ignore') * * @return mixed Human readable error level name or boolean false if it doesn't exist * @since 11.1 + * + * @deprecated */ public static function translateErrorLevel($level) { @@ -402,7 +427,7 @@ public static function translateErrorLevel($level) * * @return object The exception object * - * @see raise() + * @see raise() * @since 11.1 */ public static function handleIgnore(&$error, $options) @@ -421,6 +446,8 @@ public static function handleIgnore(&$error, $options) * * @see raise() * @since 11.1 + * + * @deprecated */ public static function handleEcho(&$error, $options) { @@ -453,7 +480,8 @@ public static function handleEcho(&$error, $options) * @return object The exception object * @since 11.1 * - * @see raise() + * @see raise() + * @deprecated */ public static function handleVerbose(& $error, $options) { @@ -491,7 +519,8 @@ public static function handleVerbose(& $error, $options) * * @return object The exception object * - * @see raise() + * @see raise() + * @deprecated */ public static function handleDie(& $error, $options) { @@ -527,6 +556,7 @@ public static function handleDie(& $error, $options) * @since 11.1 * * @see raise() + * @deprecated */ public static function handleMessage(& $error, $options) { @@ -549,6 +579,7 @@ public static function handleMessage(& $error, $options) * @since 11.1 * * @see raise() + * @deprecated */ public static function handleLog(& $error, $options) { @@ -581,6 +612,7 @@ public static function handleLog(& $error, $options) * @since 11.1 * * @see raise() + * @deprecated */ public static function handleCallback(&$error, $options) { @@ -595,6 +627,7 @@ public static function handleCallback(&$error, $options) * @return void * * @since 11.1 + * @deprecated */ public static function customErrorPage(& $error) { @@ -635,6 +668,7 @@ public static function customErrorPage(& $error) * @return void * * @since 11.1 + * @deprecated */ public static function customErrorHandler($level, $msg) { @@ -649,6 +683,7 @@ public static function customErrorHandler($level, $msg) * @return string Contents of the backtrace * * @since 11.1 + * @deprecated */ public static function renderBacktrace($error) { diff --git a/libraries/joomla/factory.php b/libraries/joomla/factory.php index edcf8e7add..d2c2c0650e 100644 --- a/libraries/joomla/factory.php +++ b/libraries/joomla/factory.php @@ -32,11 +32,12 @@ abstract class JFactory * Returns the global {@link JApplication} object, only creating it * if it doesn't already exist. * - * @param mixed $id A client identifier or name. - * @param array $config An optional associative array of configuration settings. - * @param string $prefix application prefix + * @param mixed $id A client identifier or name. + * @param array $config An optional associative array of configuration settings. + * @param string $prefix Application prefix * - * @return JApplication object + * @return JApplication object + * @since 11.1 * * @see JApplication */ @@ -61,12 +62,13 @@ public static function getApplication($id = null, $config = array(), $prefix='J' * Returns the global {@link JRegistry} object, only creating it * if it doesn't already exist. * - * @param string $file The path to the configuration file - * @param string $type The type of the configuration file - * - * @see JRegistry + * @param string $file The path to the configuration file + * @param string $type The type of the configuration file * - * @return JRegistry object + * @return JRegistry object + * @since 11.1 + * + * @see JRegistry */ public static function getConfig($file = null, $type = 'PHP') { @@ -92,6 +94,8 @@ public static function getConfig($file = null, $type = 'PHP') * @see JSession * * @return JSession object + * @since 11.1 + * */ public static function getSession($options = array()) { @@ -108,9 +112,10 @@ public static function getSession($options = array()) * Returns the global {@link JLanguage} object, only creating it * if it doesn't already exist. * - * @see JLanguage - * * @return JLanguage object + * @since 11.1 + * + * @see JLanguage */ public static function getLanguage() { @@ -127,7 +132,10 @@ public static function getLanguage() * Returns the global {@link JDocument} object, only creating it * if it doesn't already exist. * - * @return JDocument object + * @return JDocument object + * @since 11.1 + * + * @see JDocument */ public static function getDocument() { @@ -146,8 +154,10 @@ public static function getDocument() * * @param integer $id The user to load - Can be an integer or string - If string, it is converted to ID automatically. * - * @see JUser - * @return JUser object + * @return JUser object + * @since 11.1 + * + * @see JUser */ public static function getUser($id = null) { @@ -229,6 +239,9 @@ public static function getACL() * if it doesn't already exist. * * @return JDatabase object + * @since 11.1 + * + * @see JDatabase */ public static function getDbo() { @@ -250,9 +263,10 @@ public static function getDbo() * Returns the global {@link JMail} object, only creating it * if it doesn't already exist * - * @see JMail - * * @return JMail object + * @since 11.1 + * + * @see JMail */ public static function getMailer() { @@ -270,7 +284,7 @@ public static function getMailer() * @param string $url url for feed source * @param integer $cache_time time to cache feed for (using internal cache mechanism) * - * @return mixed SimplePie parsed object on success, false on failure + * @return mixed SimplePie parsed object on success, false on failure * @since 11.1 */ public static function getFeedParser($url, $cache_time = 0) @@ -305,9 +319,12 @@ public static function getFeedParser($url, $cache_time = 0) * Get an XML document * * @param string $type The type of XML parser needed 'DOM', 'RSS' or 'Simple' - * @param array $options ['rssUrl'] the rss url to parse when using "RSS", ['cache_time'] with 'RSS' - feed cache time. If not defined defaults to 3600 sec + * @param array $options ['rssUrl'] the rss url to parse when using "RSS", ['cache_time'] with ' + * RSS' - feed cache time. If not defined defaults to 3600 sec * * @return object Parsed XML document object + * @since 11.1 + * * @deprecated */ public static function getXMLParser($type = '', $options = array()) @@ -343,11 +360,14 @@ public static function getXMLParser($type = '', $options = array()) /** * Reads a XML file. * - * @param string $data Full path and file name. - * @param boolean $isFile true to load a file | false to load a string. + * @param string $data Full path and file name. + * @param boolean $isFile true to load a file or false to load a string. * - * @return mixed JXMLElement on success | false on error. + * @return mixed JXMLElement on success or false on error. + * @since 11.1 + * * @todo This may go in a separate class - error reporting may be improved. + * @see JXMLElement */ public static function getXML($data, $isFile = true) { @@ -405,12 +425,12 @@ public static function getEditor($editor = null) /** * Return a reference to the {@link JURI} object * - * @param string $uri uri name + * @param string $uri uri name * - * @see JURI - * - * @return JURI object + * @return JURI object * @since 11.1 + * + * @see JURI */ public static function getURI($uri = 'SERVER') { @@ -422,13 +442,13 @@ public static function getURI($uri = 'SERVER') /** * Return the {@link JDate} object * - * @param mixed $time The initial time for the JDate object - * @param mixed $tzOffset The timezone offset. - * - * @see JDate + * @param mixed $time The initial time for the JDate object + * @param mixed $tzOffset The timezone offset. * - * @return JDate object + * @return JDate object * @since 11.1 + * + * @see JDate */ public static function getDate($time = 'now', $tzOffset = null) { @@ -476,7 +496,6 @@ public static function getDate($time = 'now', $tzOffset = null) } - /** * Create a configuration object * @@ -485,8 +504,9 @@ public static function getDate($time = 'now', $tzOffset = null) * @param string $namespace The namespace of the configuration file. * * @return JRegistry - * * @since 11.1 + * + * @see JRegistry */ protected static function _createConfig($file, $type = 'PHP', $namespace = '') { @@ -522,7 +542,7 @@ protected static function _createConfig($file, $type = 'PHP', $namespace = '') * * @param array $options An array containing session options * - * @return JSession object + * @return JSession object * @since 11.1 */ protected static function _createSession($options = array()) @@ -547,11 +567,10 @@ protected static function _createSession($options = array()) /** * Create an database object * - * @see JDatabase - * * @return JDatabase object - * * @since 11.1 + * + * @see JDatabase */ protected static function _createDbo() { @@ -590,6 +609,8 @@ protected static function _createDbo() * * @return JMail object * @since 11.1 + * + * @see JMail */ protected static function _createMailer() { @@ -636,10 +657,10 @@ protected static function _createMailer() /** * Create a language object * - * @see JLanguage - * * @return JLanguage object * @since 11.1 + * + * @see JLanguage */ protected static function _createLanguage() { @@ -656,10 +677,10 @@ protected static function _createLanguage() /** * Create a document object * - * @see JDocument - * - * @return JDocument object + * @return JDocument object * @since 11.1 + * + * @see JDocument */ protected static function _createDocument() { @@ -685,15 +706,15 @@ protected static function _createDocument() /** * Creates a new stream object with appropriate prefix * - * @param boolean $use_prefix Prefix the connections for writing - * @param boolean $use_network Use network if available for writing; use false to disable (e.g. FTP, SCP) - * @param string $ua UA User agent to use - * @param boolean $uamask User agent masking (prefix Mozilla) - * - * @see JStream + * @param boolean $use_prefix Prefix the connections for writing + * @param boolean $use_network Use network if available for writing; use false to disable (e.g. FTP, SCP) + * @param string $ua UA User agent to use + * @param boolean $uamask User agent masking (prefix Mozilla) * * @return JStream * @since 11.1 + * + * @see JStream */ public static function getStream($use_prefix=true, $use_network=true,$ua=null, $uamask=false) { diff --git a/libraries/joomla/html/html/grid.php b/libraries/joomla/html/html/grid.php index 25a4b8a1da..95aee365a8 100644 --- a/libraries/joomla/html/html/grid.php +++ b/libraries/joomla/html/html/grid.php @@ -54,14 +54,17 @@ static function boolean($i, $value, $taskOn = null, $taskOff = null) } /** - * @param string The link title - * @param string The order field for the column - * @param string The current direction - * @param string The selected ordering - * @param string An optional task override - * @param string An optional direction for the new column + * + * @param string $title The link title + * @param string $order The order field for the column + * @param string $direction The current direction + * @param string $selected The selected ordering + * @param string $task An optional task override + * @param string $new_direction An optional direction for the new column * * @return string + * + * @since 11.1 */ public static function sort($title, $order, $direction = 'asc', $selected = 0, $task=NULL, $new_direction='asc') { diff --git a/libraries/joomla/html/html/image.php b/libraries/joomla/html/html/image.php index 8ba70bf927..8c068507ff 100644 --- a/libraries/joomla/html/html/image.php +++ b/libraries/joomla/html/html/image.php @@ -20,18 +20,21 @@ abstract class JHtmlImage { /** * Checks to see if an image exists in the current templates image directory. - * If it does it loads this image. Otherwise the default image is loaded. + * If it does it loads this image. Otherwise the default image is loaded. * Also can be used in conjunction with the menulist param to create the chosen image * load the default or use no image. * - * @param string $file The file name, eg foobar.png. - * @param string $folder The path to the image. - * @param integer $altFile Empty: use $file and $folder, -1: show no image, not-empty: use $altFile and $altFolder. - * @param string $altFolder Another path. Only used for the contact us form based on the value of the imagelist param. - * @param string $alt Alternative text. - * @param array $attribs An associative array of attributes to add. - * @param bool $asTag True (default) to display full tag, false to return just the path. - * @deprecated since 1.6 + * @param string $file The file name, eg foobar.png. + * @param string $folder The path to the image. + * @param integer $altFile Empty: use $file and $folder, -1: show no image, not-empty: use $altFile and $altFolder. + * @param string $altFolder Another path. Only used for the contact us form based on the value of the imagelist param. + * @param string $alt Alternative text. + * @param array $attribs An associative array of attributes to add. + * @param boolean $asTag True (default) to display full tag, false to return just the path. + * + * @since 11.1 + * + * @deprecated */ public static function site($file, $folder = '/images/system/', $altFile = null, $altFolder = '/images/system/', $alt = null, $attribs = null, $asTag = true) { @@ -102,7 +105,11 @@ public static function site($file, $folder = '/images/system/', $altFile = null, * @param string $alt Alternative text. * @param array $attribs An associative array of attributes to add. * @param bool $asTag True (default) to display full tag, false to return just the path. - * @deprecated since 1.6 + * + * @return string + * @since 11.1 + * + * @deprecated */ public static function administrator($file, $folder = '/images/', $altFile = null, $altFolder = '/images/', $alt = null, $attribs = null, $asTag = true) { diff --git a/libraries/joomla/html/html/list.php b/libraries/joomla/html/html/list.php index b58942012c..dfa14d5cc6 100644 --- a/libraries/joomla/html/html/list.php +++ b/libraries/joomla/html/html/list.php @@ -19,6 +19,8 @@ abstract class JHtmlList { /** + * + * @param $row * Use JHtml::_('access.assetgrouplist', 'access', $selected) instead * @deprecated */ @@ -106,7 +108,7 @@ public static function genericordering($sql, $chop = '30') } /** - * @deprecated 1.6 Use JHtml::_('list.ordering') instead + * @deprecated Use JHtml::_('list.ordering') instead */ public static function specificordering($value, $id, $query, $neworder = 0) { diff --git a/libraries/joomla/html/pane.php b/libraries/joomla/html/pane.php index 6a32316cbd..0cade1369d 100644 --- a/libraries/joomla/html/pane.php +++ b/libraries/joomla/html/pane.php @@ -31,6 +31,8 @@ abstract class JPane extends JObject * * @return object * @since 11.1 + * + * @deprecated */ public static function getInstance($behavior = 'Tabs', $params = array()) { @@ -46,6 +48,8 @@ public static function getInstance($behavior = 'Tabs', $params = array()) * @param string $id The pane identifier. * * @since 11.1 + * + * @deprecated */ abstract public function startPane($id); @@ -53,6 +57,8 @@ abstract public function startPane($id); * Ends the pane. * * @since 11.1 + * + * @deprecated */ abstract public function endPane(); @@ -63,6 +69,7 @@ abstract public function endPane(); * @param string $id The panel identifer. * * @since 11.1 + * @deprecated */ abstract public function startPanel($text, $id); @@ -70,6 +77,7 @@ abstract public function startPanel($text, $id); * Ends a panel. * * @since 11.1 + * @deprecated */ abstract public function endPanel(); @@ -77,6 +85,7 @@ abstract public function endPanel(); * Load the javascript behavior and attach it to the document. * * @since 11.1 + * @deprecated */ abstract protected function _loadBehavior(); } @@ -87,6 +96,7 @@ abstract protected function _loadBehavior(); * @package Joomla.Platform * @subpackage HTML * @since 11.1 + * @deprecated Use JHtml::_ static helpers */ class JPaneTabs extends JPane { @@ -117,6 +127,8 @@ function __construct($params = array()) * * @return string HTML to start the pane dl * @since 11.1 + * + * @deprecated */ public function startPane($id) { @@ -128,6 +140,8 @@ public function startPane($id) * * @return string HTML to end the pane dl * @since 11.1 + * + * @deprecated */ public function endPane() { @@ -142,6 +156,8 @@ public function endPane() * * @return string HTML for the dt tag. * @since 11.1 + * + * @deprecated */ public function startPanel($text, $id) { @@ -153,6 +169,8 @@ public function startPanel($text, $id) * * @return string HTML for the dd tag. * @since 11.1 + * + * @deprecated */ public function endPanel() { @@ -166,6 +184,8 @@ public function endPanel() * * @return * @since 11.1 + * + * @deprecated */ protected function _loadBehavior($params = array()) { @@ -202,6 +222,8 @@ protected function _loadBehavior($params = array()) * @package Joomla.Platform * @subpackage HTML * @since 11.1 + * + * @deprecated Use JHtml::_ static helpers */ class JPaneSliders extends JPane { @@ -211,6 +233,8 @@ class JPaneSliders extends JPane * @param array $params Associative array of values. * * @since 11.1 + * + * @deprecated */ function __construct($params = array()) { @@ -231,6 +255,8 @@ function __construct($params = array()) * * @return string HTML to start the slider div. * @since 11.1 + * + * @deprecated */ public function startPane($id) { @@ -242,6 +268,8 @@ public function startPane($id) * * @return string HTML to end the slider div. * @since 11.1 + * + * @deprecated */ public function endPane() { @@ -256,6 +284,8 @@ public function endPane() * * @return string HTML to start the tab panel div. * @since 11.1 + * + * @deprecated */ public function startPanel($text, $id) { @@ -268,6 +298,9 @@ public function startPanel($text, $id) * Ends a tab page. * * @return string HTML to end the tab divs. + * @since 11.1 + * + * @deprecated */ public function endPanel() { @@ -281,7 +314,8 @@ public function endPanel() * * @return * @since 11.1 - * + * + * @deprecated */ protected function _loadBehavior($params = array()) { diff --git a/libraries/joomla/html/parameter.php b/libraries/joomla/html/parameter.php index 19681f0099..0f3053acdc 100644 --- a/libraries/joomla/html/parameter.php +++ b/libraries/joomla/html/parameter.php @@ -55,6 +55,8 @@ class JParameter extends JRegistry * @param string $path Path to the XML setup file. * * @since 11.1 + * + * @deprecated */ public function __construct($data = '', $path = '') { @@ -87,6 +89,8 @@ public function __construct($data = '', $path = '') * * @return string The value set, or the default if the value was not previously set (or null). * @since 11.1 + * + * @deprecated */ public function def($key, $default = '', $group = '_default') { @@ -100,6 +104,8 @@ public function def($key, $default = '', $group = '_default') * * @param JSimpleXMLElement $xml An XML object. * @since 11.1 + * + * @deprecated */ public function setXML(&$xml) { @@ -124,6 +130,8 @@ public function setXML(&$xml) * * @return boolean True if the data was successfully bound, false otherwise. * @since 11.1 + * + * @deprecated */ public function bind($data, $group = '_default') { @@ -144,6 +152,8 @@ public function bind($data, $group = '_default') * * @return string HTML * @since 11.1 + * + * @deprecated */ public function render($name = 'params', $group = '_default') { @@ -184,6 +194,8 @@ public function render($name = 'params', $group = '_default') * * @return array * @since 11.1 + * + * @deprecated */ public function renderToArray($name = 'params', $group = '_default') { @@ -205,6 +217,8 @@ public function renderToArray($name = 'params', $group = '_default') * * @return mixed False if no params exist or integer number of parameters that exist. * @since 11.1 + * + * @deprecated */ public function getNumParams($group = '_default') { @@ -220,6 +234,8 @@ public function getNumParams($group = '_default') * * @return array Array of all group names as key and parameters count as value. * @since 11.1 + * + * @deprecated */ public function getGroups() { @@ -242,6 +258,8 @@ public function getGroups() * * @return array An array of all parameters, each as array of the label, the form element and the tooltip. * @since 11.1 + * + * @deprecated */ public function getParams($name = 'params', $group = '_default') { @@ -265,6 +283,8 @@ public function getParams($name = 'params', $group = '_default') * * @return array Any array of the label, the form element and the tooltip. * @since 11.1 + * + * @deprecated */ public function getParam(&$node, $control_name = 'params', $group = '_default') { @@ -295,6 +315,8 @@ public function getParam(&$node, $control_name = 'params', $group = '_default') * * @return object * @since 11.1 + * + * @deprecated */ public function loadSetupFile($path) { @@ -326,6 +348,8 @@ public function loadSetupFile($path) * * @return object * @since 11.1 + * + * @deprecated */ public function loadElement($type, $new = false) { @@ -376,6 +400,8 @@ public function loadElement($type, $new = false) * * @param mixed Directory (string) or directories (array) to search. * @since 11.1 + * + * @deprecated */ public function addElementPath($path) { diff --git a/libraries/joomla/html/parameter/element.php b/libraries/joomla/html/parameter/element.php index 24f4a8c543..ea9932cf22 100644 --- a/libraries/joomla/html/parameter/element.php +++ b/libraries/joomla/html/parameter/element.php @@ -22,7 +22,7 @@ class JElement extends JObject { /** - * element name + * Element name * * This has to be set in the final * renderer classes. @@ -40,6 +40,9 @@ class JElement extends JObject /** * Constructor + * @since 11.1 + * + * @deprecated */ public function __construct($parent = null) { @@ -47,14 +50,23 @@ public function __construct($parent = null) } /** - * Get the element name - * - * @return string type of the parameter - */ + * Get the element name + * + * @return string type of the parameter + * @since 11.1 + * + * @deprecated + */ public function getName() { return $this->_name; } + /** + * + * @since 11.1 + * + * @deprecated + */ public function render(&$xmlElement, $value, $control_name = 'params') { $name = $xmlElement->attributes('name'); @@ -72,6 +84,12 @@ public function render(&$xmlElement, $value, $control_name = 'params') return $result; } + /** + * + * @since 11.1 + * + * @deprecated + */ public function fetchTooltip($label, $description, &$xmlElement, $control_name='', $name='') { $output = '