diff --git a/libraries/import.php b/libraries/import.php index 3217977a34870..c952eae44b1ae 100644 --- a/libraries/import.php +++ b/libraries/import.php @@ -6,8 +6,6 @@ * @license GNU General Public License version 2 or later; see LICENSE */ -defined('_JEXEC') or die; - // Set the platform root path as a constant if necessary. if (!defined('JPATH_PLATFORM')) { define('JPATH_PLATFORM', dirname(__FILE__)); @@ -40,6 +38,8 @@ require_once JPATH_PLATFORM.'/loader.php'; } +class_exists('JLoader') or die; + /** * Import the base Joomla Platform libraries. */ diff --git a/libraries/joomla/access/rules.php b/libraries/joomla/access/rules.php index 20b201f9a914a..d61eea6d005ec 100644 --- a/libraries/joomla/access/rules.php +++ b/libraries/joomla/access/rules.php @@ -36,8 +36,6 @@ class JRules * * @param mixed $input A JSON format string (probably from the database) or a nested array. * - * @return JRules - * * @since 11.1 */ public function __construct($input = '') diff --git a/libraries/joomla/application/application.php b/libraries/joomla/application/application.php index c95c5be6a9d56..c281c0acae284 100644 --- a/libraries/joomla/application/application.php +++ b/libraries/joomla/application/application.php @@ -147,7 +147,7 @@ public function __construct($config = array()) * * @param mixed $client A client identifier or name. * @param array $config An optional associative array of configuration settings. - * @param strong $prefx A prefix for class names + * @param string $prefx A prefix for class names * * @return JApplication A JApplication object. * @@ -171,7 +171,7 @@ public static function getInstance($client, $config = array(), $prefix = 'J') require_once $path; // Create a JRouter object. - $classname = $prefix.ucfirst($client); + $classname = $prefix . ucfirst($client); $instance = new $classname($config); } else { @@ -190,6 +190,8 @@ public static function getInstance($client, $config = array(), $prefix = 'J') * * @param array $options An optional associative array of configuration settings. * + * @return void + * * @since 11.1 */ public function initialise($options = array()) @@ -229,14 +231,14 @@ public function initialise($options = array()) * are then set in the request object to be processed when the application is being * dispatched. * - * @return void; + * @return void * * @since 11.1 */ public function route() { // Get the full request URI. - $uri = clone JURI::getInstance(); + $uri = clone JURI::getInstance(); $router = $this->getRouter(); $result = $router->parse($uri); @@ -249,7 +251,7 @@ public function route() } /** - * Dispatch the applicaiton. + * Dispatch the application. * * Dispatching is the process of pulling the option from the request object and * mapping them to a component. If the component does not exist, it handles @@ -265,7 +267,7 @@ public function dispatch($component = null) { $document = JFactory::getDocument(); - $document->setTitle($this->getCfg('sitename'). ' - ' .JText::_('JADMINISTRATION')); + $document->setTitle($this->getCfg('sitename') . ' - ' . JText::_('JADMINISTRATION')); $document->setDescription($this->getCfg('MetaDesc')); $contents = JComponentHelper::renderComponent($component); @@ -346,7 +348,7 @@ public function close($code = 0) * * @see JApplication::enqueueMessage() */ - public function redirect($url, $msg='', $msgType='message', $moved = false) + public function redirect($url, $msg = '', $msgType = 'message', $moved = false) { // Check for relative internal links. if (preg_match('#^index2?\.php#', $url)) { @@ -606,7 +608,7 @@ public static function registerEvent($event, $handler) * * @since 11.1 */ - function triggerEvent($event, $args=null) + function triggerEvent($event, $args = null) { $dispatcher = JDispatcher::getInstance(); @@ -658,7 +660,7 @@ public function login($credentials, $options = array()) } // Return the error. - switch($authorisation->status) + switch ($authorisation->status) { case JAuthentication::STATUS_EXPIRED: return JError::raiseWarning('102002', JText::_('JLIB_LOGIN_EXPIRED')); @@ -750,9 +752,6 @@ public function login($credentials, $options = array()) */ public function logout($userid = null, $options = array()) { - // Initialise variables. - $retval = false; - // Get a user object from the JApplication. $user = JFactory::getUser($userid); @@ -917,7 +916,7 @@ public static function getHash($seed) { $conf = JFactory::getConfig(); - return md5($conf->get('secret').$seed); + return md5($conf->get('secret') . $seed); } /** @@ -966,7 +965,7 @@ protected function _createSession($name) $options = array(); $options['name'] = $name; - switch($this->_clientId) + switch ($this->_clientId) { case 0: if ($this->getCfg('force_ssl') == 2) { diff --git a/libraries/joomla/application/categories.php b/libraries/joomla/application/categories.php index a86f17b3779c5..60c8090167897 100644 --- a/libraries/joomla/application/categories.php +++ b/libraries/joomla/application/categories.php @@ -95,8 +95,6 @@ class JCategories * * @param array $options Array of options * - * @return JCategories object - * * @since 11.1 */ public function __construct($options) @@ -119,13 +117,13 @@ public function __construct($options) * @param string $extension Name of the categories extension * @param array $options An array of options * - * @return Jcategories Jcategories object + * @return JCategories JCategories object * * @since 11.1 */ public static function getInstance($extension, $options = array()) { - $hash = md5($extension.serialize($options)); + $hash = md5($extension . serialize($options)); if (isset(self::$instances[$hash])) { return self::$instances[$hash]; @@ -134,7 +132,7 @@ public static function getInstance($extension, $options = array()) $parts = explode('.', $extension); $component = 'com_'.strtolower($parts[0]); $section = count($parts) > 1 ? $parts[1] : ''; - $classname = ucfirst(substr($component, 4)).ucfirst($section).'Categories'; + $classname = ucfirst(substr($component, 4)) . ucfirst($section).'Categories'; if (!class_exists($classname)) { $path = JPATH_SITE . '/components/' . $component . '/helpers/category.php'; @@ -342,7 +340,7 @@ class JCategoryNode extends JObject * @var integer * @since 11.1 */ - public $id = null; + public $id = null; /** * The id of the category in the asset table @@ -350,7 +348,7 @@ class JCategoryNode extends JObject * @var integer * @since 11.1 */ - public $asset_id = null; + public $asset_id = null; /** * The id of the parent of category in the asset table, 0 for category root @@ -359,7 +357,7 @@ class JCategoryNode extends JObject * @since 11.1 */ - public $parent_id = null; + public $parent_id = null; /** * The lft value for this category in the category tree @@ -368,7 +366,7 @@ class JCategoryNode extends JObject * @since 11.1 */ - public $lft = null; + public $lft = null; /** * The rgt value for this category in the category tree @@ -376,14 +374,14 @@ class JCategoryNode extends JObject * @var integer * @since 11.1 */ - public $rgt = null; + public $rgt = null; /** * The depth of this category's position in the category tree * * @var integer * @since 11.1 */ - public $level = null; + public $level = null; /** * The extension this category is associated with @@ -391,7 +389,7 @@ class JCategoryNode extends JObject * @var integer * @since 11.1 */ - public $extension = null; + public $extension = null; /** * The menu title for the category (a short name) @@ -399,7 +397,7 @@ class JCategoryNode extends JObject * @var string * @since 11.1 */ - public $title = null; + public $title = null; /** * The the alias for the category @@ -407,7 +405,7 @@ class JCategoryNode extends JObject * @var string * @since 11.1 */ - public $alias = null; + public $alias = null; /** * Description of the category. @@ -415,7 +413,7 @@ class JCategoryNode extends JObject * @var string * @since 11.1 */ - public $description = null; + public $description = null; /** * The publication status of the category @@ -423,7 +421,7 @@ class JCategoryNode extends JObject * @var boolean * @since 11.1 */ - public $published = null; + public $published = null; /** * Whether the category is or is not checked out @@ -431,7 +429,7 @@ class JCategoryNode extends JObject * @var boolean * @since 11.1 */ - public $checked_out = 0; + public $checked_out = 0; /** * The time at which the category was checked out @@ -439,7 +437,7 @@ class JCategoryNode extends JObject * @var time * @since 11.1 */ - public $checked_out_time = 0; + public $checked_out_time = 0; /** * Access level for the category @@ -447,7 +445,7 @@ class JCategoryNode extends JObject * @var integer * @since 11.1 */ - public $access = null; + public $access = null; /** * JSON string of parameters @@ -455,7 +453,7 @@ class JCategoryNode extends JObject * @var string * @since 11.1 */ - public $params = null; + public $params = null; /** * Metadata description @@ -464,7 +462,7 @@ class JCategoryNode extends JObject * @since 11.1 */ - public $metadesc = null; + public $metadesc = null; /** * Key words for meta data @@ -472,7 +470,7 @@ class JCategoryNode extends JObject * @var string * @since 11.1 */ - public $metakey = null; + public $metakey = null; /** * JSON string of other meta data @@ -480,9 +478,9 @@ class JCategoryNode extends JObject * @var string * @since 11.1 */ - public $metadata = null; + public $metadata = null; - public $created_user_id = null; + public $created_user_id = null; /** * The time at which the category was created @@ -490,9 +488,9 @@ class JCategoryNode extends JObject * @var time * @since 11.1 */ - public $created_time = null; + public $created_time = null; - public $modified_user_id = null; + public $modified_user_id = null; /** * The time at which the category was modified @@ -500,7 +498,7 @@ class JCategoryNode extends JObject * @var time * @since 11.1 */ - public $modified_time = null; + public $modified_time = null; /** * Nmber of times the category has been viewed @@ -508,7 +506,7 @@ class JCategoryNode extends JObject * @var integer * @since 11.1 */ - public $hits = null; + public $hits = null; /** * The language for the category in xx-XX format @@ -516,7 +514,7 @@ class JCategoryNode extends JObject * @var time * @since 11.1 */ - public $language = null; + public $language = null; /** * Number of items in this category or descendants of this category @@ -524,7 +522,7 @@ class JCategoryNode extends JObject * @var integer * @since 11.1 */ - public $numitems = null; + public $numitems = null; /** * Number of children items @@ -533,7 +531,7 @@ class JCategoryNode extends JObject * @since 11.1 */ - public $childrennumitems = null; + public $childrennumitems = null; /** * Slug fo the category (used in URL) @@ -541,7 +539,7 @@ class JCategoryNode extends JObject * @var string * @since 11.1 */ - public $slug = null; + public $slug = null; /** * Array of assets @@ -549,7 +547,7 @@ class JCategoryNode extends JObject * @var array * @since 11.1 */ - public $assets = null; + public $assets = null; /** * Parent Category object @@ -610,8 +608,6 @@ class JCategoryNode extends JObject * * @param $category * - * @return JCategoryNode - * * @since 11.1 */ public function __construct($category = null, &$constructor = null) diff --git a/libraries/joomla/application/cli.php b/libraries/joomla/application/cli.php index 7663629f320c3..8ae2c082a4e36 100644 --- a/libraries/joomla/application/cli.php +++ b/libraries/joomla/application/cli.php @@ -27,7 +27,7 @@ class JCli /** * The application input object. * - * @var JInput + * @var JInputCli The application input object. * @since 11.1 */ public $input; @@ -35,7 +35,7 @@ class JCli /** * The application configuration object. * - * @var JRegistry + * @var JRegistry The application configuration object. * @since 11.1 */ protected $config; @@ -51,8 +51,6 @@ class JCli /** * Class constructor. * - * @return void - * * @since 11.1 */ protected function __construct() diff --git a/libraries/joomla/application/cli/daemon.php b/libraries/joomla/application/cli/daemon.php index 57c8b8a3fdc21..b34df564b4964 100644 --- a/libraries/joomla/application/cli/daemon.php +++ b/libraries/joomla/application/cli/daemon.php @@ -30,10 +30,42 @@ class JDaemon extends JCli * @since 11.1 */ protected static $signals = array( - SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGIOT, SIGBUS, SIGFPE, SIGUSR1, - SIGSEGV, SIGUSR2, SIGPIPE, SIGALRM, SIGTERM, SIGSTKFLT, SIGCLD, SIGCHLD, SIGCONT, - SIGTSTP, SIGTTIN, SIGTTOU, SIGURG, SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH, - SIGPOLL, SIGIO, SIGPWR, SIGSYS, SIGBABY, SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK + SIGHUP, + SIGINT, + SIGQUIT, + SIGILL, + SIGTRAP, + SIGABRT, + SIGIOT, + SIGBUS, + SIGFPE, + SIGUSR1, + SIGSEGV, + SIGUSR2, + SIGPIPE, + SIGALRM, + SIGTERM, + SIGSTKFLT, + SIGCLD, + SIGCHLD, + SIGCONT, + SIGTSTP, + SIGTTIN, + SIGTTOU, + SIGURG, + SIGXCPU, + SIGXFSZ, + SIGVTALRM, + SIGPROF, + SIGWINCH, + SIGPOLL, + SIGIO, + SIGPWR, + SIGSYS, + SIGBABY, + SIG_BLOCK, + SIG_UNBLOCK, + SIG_SETMASK ); /** @@ -65,8 +97,6 @@ class JDaemon extends JCli /** * Class constructor. * - * @return void - * * @since 11.1 */ protected function __construct() diff --git a/libraries/joomla/application/component/controller.php b/libraries/joomla/application/component/controller.php index df8e1ef3c00b2..53fa2b462b6b2 100644 --- a/libraries/joomla/application/component/controller.php +++ b/libraries/joomla/application/component/controller.php @@ -153,7 +153,7 @@ class JController extends JObject * * @return void */ - public static function addModelPath($path, $prefix='') + public static function addModelPath($path, $prefix = '') { jimport('joomla.application.component.model'); JModel::addIncludePath($path, $prefix); @@ -456,6 +456,7 @@ public function authorize($task) * @param string $task The ACO Section Value to check access on. * * @return boolean True if authorised + * * @since 11.1 */ public function authorise($task) @@ -485,6 +486,7 @@ public function authorise($task) * @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. + * * @since 11.1 */ protected function checkEditId($context, $id) @@ -518,6 +520,7 @@ protected function checkEditId($context, $id) * @param array $config Configuration array for the model. Optional. * * @return mixed Model object on success; otherwise null failure. + * * @since 11.1 * @note Replaces _createModel. */ @@ -596,6 +599,7 @@ protected function createView($name, $prefix = '', $type = '', $config = array() * @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. + * * @since 11.1 */ public function display($cachable = false, $urlparams = false) @@ -659,6 +663,7 @@ public function display($cachable = false, $urlparams = false) * @param string $task The task to perform. If no matching task is found, the '__default' task is executed, if defined. * * @return mixed The value returned by the called method, false in error case. + * * @since 11.1 */ public function execute($task) @@ -735,6 +740,7 @@ public function getModel($name = '', $prefix = '', $config = array()) * by passing a $config['name'] in the class constructor * * @return string The name of the dispatcher + * * @since 11.1 */ public function getName() @@ -756,6 +762,7 @@ public function getName() * Get the last task that is being performed or was most recently performed. * * @return string The task that is being performed or was most recently performed. + * * @since 11.1 */ public function getTask() @@ -767,6 +774,7 @@ public function getTask() * Gets the available tasks in the controller. * * @return array Array[i] of task names. + * * @since 11.1 */ public function getTasks() @@ -783,6 +791,7 @@ public function getTasks() * @param array $config Configuration array for view. Optional. * * @return object Reference to the view or an error. + * * @since 11.1 */ public function getView($name = '', $type = '', $prefix = '', $config = array()) @@ -825,6 +834,7 @@ public function getView($name = '', $type = '', $prefix = '', $config = array()) * @param integer $id The ID of the record to add to the edit list. * * @return void + * * @since 11.1 */ protected function holdEditId($context, $id) @@ -852,6 +862,7 @@ protected function holdEditId($context, $id) * Redirects the browser or returns false if no redirect is set. * * @return boolean False if no redirect exists. + * * @since 11.1 */ public function redirect() @@ -870,6 +881,7 @@ public function redirect() * @param string $method The name of the method in the derived class to perform if a named task is not found. * * @return JController A JController object to support chaining. + * * @since 11.1 */ public function registerDefaultTask($method) @@ -886,6 +898,7 @@ public function registerDefaultTask($method) * @param string $method The name of the method in the derived class to perform for this task. * * @return JController A JController object to support chaining. + * * @since 11.1 */ public function registerTask($task, $method) @@ -903,6 +916,7 @@ public function registerTask($task, $method) * @param string $task The task. * * @return JController This object to support chaining. + * * @since 11.1 */ public function unregisterTask($task) @@ -919,6 +933,7 @@ public function unregisterTask($task) * @param integer $id The ID of the record to add to the edit list. * * @return void + * * @since 11.1 */ protected function releaseEditId($context, $id) diff --git a/libraries/joomla/application/component/controlleradmin.php b/libraries/joomla/application/component/controlleradmin.php index cb10cc5d50757..fd936d4ea836a 100644 --- a/libraries/joomla/application/component/controlleradmin.php +++ b/libraries/joomla/application/component/controlleradmin.php @@ -138,7 +138,7 @@ public function display($cachable = false, $urlparams = false) } /** - * Method to publish a list of taxa + * Method to publish a list of items * * @return void * diff --git a/libraries/joomla/application/component/controllerform.php b/libraries/joomla/application/component/controllerform.php index 40daad79d84b1..10f6c242f02c2 100644 --- a/libraries/joomla/application/component/controllerform.php +++ b/libraries/joomla/application/component/controllerform.php @@ -66,8 +66,6 @@ class JControllerForm extends JController * * @param array $config An optional associative array of configuration settings. * - * @return JControllerForm A JControllerForm object - * * @see JController * @since 11.1 */ @@ -170,6 +168,7 @@ public function add() * @param array $data An array of input data. * * @return boolean + * * @since 11.1 */ protected function allowAdd($data = array()) @@ -188,6 +187,7 @@ protected function allowAdd($data = array()) * @param string $key The name of the key for the primary key; default is id. * * @return boolean + * * @since 11.1 */ protected function allowEdit($data = array(), $key = 'id') @@ -204,6 +204,7 @@ protected function allowEdit($data = array(), $key = 'id') * @param string $key The name of the key for the primary key. * * @return boolean + * * @since 11.1 */ protected function allowSave($data, $key = 'id') @@ -224,6 +225,7 @@ protected function allowSave($data, $key = 'id') * @param object $model The model of the component being processed. * * @return boolean True if successful, false otherwise and internal error is set. + * * @since 11.1 */ public function batch($model) @@ -251,6 +253,7 @@ public function batch($model) * @param string $key The name of the primary key of the URL variable. * * @return boolean True if access level checks pass, false otherwise. + * * @since 11.1 */ public function cancel($key = null) @@ -310,6 +313,7 @@ public function cancel($key = null) * (sometimes required to avoid router collisions). * * @return boolean True if access level check and checkout passes, false otherwise. + * * @since 11.1 */ public function edit($key = null, $urlVar = null) @@ -372,6 +376,7 @@ public function edit($key = null, $urlVar = null) * @param array $config Configuration array for model. Optional. * * @return object The model. + * * @since 11.1 */ public function getModel($name = '', $prefix = '', $config = array('ignore_request' => true)) @@ -390,6 +395,7 @@ public function getModel($name = '', $prefix = '', $config = array('ignore_reque * @param string $urlVar The name of the URL variable for the id. * * @return string The arguments to append to the redirect URL. + * * @since 11.1 */ protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') @@ -442,6 +448,7 @@ protected function getRedirectToListAppend() * @param array $validData The validated data. * * @return void + * * @since 11.1 */ protected function postSaveHook(JModel &$model, $validData = array()) @@ -455,6 +462,7 @@ protected function postSaveHook(JModel &$model, $validData = array()) * @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 successful, false otherwise. + * * @since 11.1 */ public function save($key = null, $urlVar = null) diff --git a/libraries/joomla/application/component/helper.php b/libraries/joomla/application/component/helper.php index f006a06156d54..63890962f2f74 100644 --- a/libraries/joomla/application/component/helper.php +++ b/libraries/joomla/application/component/helper.php @@ -30,9 +30,10 @@ class JComponentHelper * Get the component information. * * @param string $option The component option. - * @param boolean $strict 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 attribute will be set to false. * * @return object An object with the information for the component. + * * @since 11.1 */ public static function getComponent($option, $strict = false) @@ -59,6 +60,7 @@ public static function getComponent($option, $strict = false) * @param boolean $strict If set and the component does not exist, false will be returned. * * @return boolean + * * @since 11.1 */ public static function isEnabled($option, $strict = false) @@ -92,16 +94,17 @@ public static function getParams($option, $strict = false) * @param string $option The component option. * @param array $params The component parameters * - * @return void + * @return object + * * @since 11.1 */ public static function renderComponent($option, $params = array()) { // Initialise variables. - $app = JFactory::getApplication(); + $app = JFactory::getApplication(); // Load template language files. - $template = $app->getTemplate(true)->template; + $template = $app->getTemplate(true)->template; $lang = JFactory::getLanguage(); $lang->load('tpl_'.$template, JPATH_BASE, null, false, false) || $lang->load('tpl_'.$template, JPATH_THEMES."/$template", null, false, false) @@ -180,6 +183,7 @@ public static function renderComponent($option, $params = array()) * @param string $option The element value for the extension * * @return boolean True on success + * * @since 11.1 */ protected static function _load($option) @@ -194,7 +198,7 @@ protected static function _load($option) $cache = JFactory::getCache('_system', 'callback'); - self::$_components[$option] = $cache->get(array($db, 'loadObject'), null, $option, false); + self::$_components[$option] = $cache->get(array($db, 'loadObject'), null, $option, false); if ($error = $db->getErrorMsg() || empty(self::$_components[$option])) { // Fatal error. diff --git a/libraries/joomla/application/component/model.php b/libraries/joomla/application/component/model.php index 166d0ebcdb139..26dc2559a917e 100644 --- a/libraries/joomla/application/component/model.php +++ b/libraries/joomla/application/component/model.php @@ -27,7 +27,7 @@ abstract class JModel extends JObject * @var boolean * @since 11.1 */ - protected $__state_set = null; + protected $__state_set = null; /** * Database Connector @@ -79,6 +79,7 @@ abstract class JModel extends JObject * @param string $prefix A prefix for models. * * @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 = '') @@ -118,6 +119,7 @@ public static function addIncludePath($path = '', $prefix = '') * @param mixed $path The directory as a string or directories as an array to add. * * @return void + * * @since 11.1 */ public static function addTablePath($path) @@ -133,6 +135,7 @@ public static function addTablePath($path) * @param array $parts An associative array of filename information. * * @return string The filename + * * @since 11.1 */ protected static function _createFileName($type, $parts = array()) @@ -156,6 +159,7 @@ protected static function _createFileName($type, $parts = array()) * @param array $config Configuration array for model. Optional. * * @return mixed A model object or false on failure + * * @since 11.1 */ public static function getInstance($type, $prefix = '', $config = array()) @@ -196,7 +200,6 @@ public static function getInstance($type, $prefix = '', $config = array()) * * @param array $config An array of configuration options (name, state, dbo, table_path, ignore_request). * - * @return JModel A JModel object * @since 11.1 */ public function __construct($config = array()) @@ -268,6 +271,7 @@ public function __construct($config = array()) * @param integer $limit The number of records. * * @return array An array of results. + * * @since 11.1 */ protected function _getList($query, $limitstart=0, $limit=0) @@ -284,6 +288,7 @@ protected function _getList($query, $limitstart=0, $limit=0) * @param string $query The query. * * @return integer Number of rows for query + * * @since 11.1 */ protected function _getListCount($query) @@ -302,6 +307,7 @@ protected function _getListCount($query) * @param array $config Configuration settings to pass to JTable::getInsance * * @return mixed Model object or boolean false if failed + * * @since 11.1 * @see JTable::getInstance */ @@ -336,6 +342,7 @@ public function getDbo() * by passing a $config['name'] in the class constructor * * @return string The name of the model + * * @since 11.1 */ public function getName() @@ -360,6 +367,7 @@ public function getName() * @param mixed $default Optional default value * * @return object The property where specified, the state object where omitted + * * @since 11.1 */ public function getState($property = null, $default = null) @@ -383,6 +391,7 @@ public function getState($property = null, $default = null) * @param array $options Configuration array for model. Optional. * * @return JTable A JTable object + * * @since 11.1 */ public function getTable($name = '', $prefix = 'Table', $options = array()) @@ -422,6 +431,7 @@ protected function populateState() * @param object &$db A JDatabase based object * * @return void + * * @since 11.1 */ public function setDbo(&$db) @@ -436,6 +446,7 @@ public function setDbo(&$db) * @param mixed $value The value of the property to set or null. * * @return mixed The previous value of the property or null if not set. + * * @since 11.1 */ public function setState($property, $value = null) diff --git a/libraries/joomla/application/component/modeladmin.php b/libraries/joomla/application/component/modeladmin.php index ca542495e124a..81cb1ed454ede 100644 --- a/libraries/joomla/application/component/modeladmin.php +++ b/libraries/joomla/application/component/modeladmin.php @@ -73,8 +73,6 @@ abstract class JModelAdmin extends JModelForm * * @param array $config An optional associative array of configuration settings. * - * @return JModelAdmin - * * @see JController * @since 11.1 */ @@ -252,7 +250,7 @@ protected function batchAccess($value, $pks) */ protected function batchCopy($value, $pks) { - $categoryId = (int) $value; + $categoryId = (int) $value; $table = $this->getTable(); $db = $this->getDbo(); @@ -397,13 +395,13 @@ protected function batchLanguage($value, $pks) * @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 boolean True if successful, false otherwise and internal error is set. * * @since 11.1 */ protected function batchMove($value, $pks) { - $categoryId = (int) $value; + $categoryId = (int) $value; $table = $this->getTable(); $db = $this->getDbo(); @@ -530,7 +528,7 @@ public function checkin($pks = array()) } // Check in all items. - foreach ($pks as $i => $pk) + foreach ($pks as $pk) { if ($table->load($pk)) { @@ -557,6 +555,7 @@ public function checkin($pks = array()) * @param integer $pk The ID of the primary key. * * @return boolean True if successful, false if an error occurs. + * * @since 11.1 */ public function checkout($pk = null) @@ -573,6 +572,7 @@ public function checkout($pk = null) * @param array $pks An array of record primary keys. * * @return boolean True if successful, false if an error occurs. + * * @since 11.1 */ public function delete(&$pks) @@ -645,6 +645,7 @@ public function delete(&$pks) * @param string $title The title. * * @return array Contains the modified title and alias. + * * @since 11.1 */ protected function generateNewTitle($category_id, $alias, $title) @@ -674,6 +675,7 @@ protected function generateNewTitle($category_id, $alias, $title) * @param integer $pk The id of the primary key. * * @return mixed Object on success, false on failure. + * * @since 11.1 */ public function getItem($pk = null) @@ -712,6 +714,7 @@ public function getItem($pk = null) * @param object $table A JTable object. * * @return array An array of conditions to add to ordering queries. + * * @since 11.1 */ protected function getReorderConditions($table) @@ -723,6 +726,7 @@ protected function getReorderConditions($table) * Stock method to auto-populate the model state. * * @return void + * * @since 11.1 */ protected function populateState() @@ -747,6 +751,7 @@ protected function populateState() * @param JTable $table A reference to a JTable object. * * @return void + * * @since 11.1 */ protected function prepareTable(&$table) @@ -761,6 +766,7 @@ protected function prepareTable(&$table) * @param integer $value The value of the published state. * * @return boolean True on success. + * * @since 11.1 */ function publish(&$pks, $value = 1) @@ -820,6 +826,7 @@ function publish(&$pks, $value = 1) * @param integer $delta Increment, usually +1 or -1 * * @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) @@ -881,6 +888,7 @@ public function reorder($pks, $delta = 0) * @param array $data The form data. * * @return boolean True on success, False on error. + * * @since 11.1 */ public function save($data) @@ -962,6 +970,7 @@ public function save($data) * @param integer $order +1 or -1 * * @return mixed + * * @since 11.1 */ function saveorder($pks = null, $order = null) diff --git a/libraries/joomla/application/component/modelitem.php b/libraries/joomla/application/component/modelitem.php index 30b94d3b97147..4fa058bdd8695 100644 --- a/libraries/joomla/application/component/modelitem.php +++ b/libraries/joomla/application/component/modelitem.php @@ -43,16 +43,15 @@ 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. + * @param string $id A prefix for the store id. * - * @return string A store id. + * @return string A store id. * * @since 11.1 */ protected function getStoreId($id = '') { // Compile the store id. - return md5($id); } } diff --git a/libraries/joomla/application/component/modellist.php b/libraries/joomla/application/component/modellist.php index 447f1eac692b7..de73c15d4bc30 100644 --- a/libraries/joomla/application/component/modellist.php +++ b/libraries/joomla/application/component/modellist.php @@ -58,8 +58,6 @@ class JModelList extends JModel * * @param array $config An optional associative array of configuration settings. * - * @return JModelList - * * @see JController * @since 11.1 */ @@ -81,7 +79,7 @@ public function __construct($config = array()) /** * Method to cache the last query constructed. * - * This method ensures that the query is contructed only once for a given state of the model. + * This method ensures that the query is constructed only once for a given state of the model. * * @return JDatabaseQuery A JDatabaseQuery object * diff --git a/libraries/joomla/application/component/view.php b/libraries/joomla/application/component/view.php index 467bc6632f978..c2a1bce62fbd6 100644 --- a/libraries/joomla/application/component/view.php +++ b/libraries/joomla/application/component/view.php @@ -265,7 +265,6 @@ public function assign() return false; } - /** * Assign variable for the view (by reference). * @@ -283,11 +282,12 @@ public function assign() * $view->ref = &$var1; * * - * * @param string $key The name for the reference in the view. * @param mixed &$val The referenced variable. * * @return boolean True on success, false on failure. + * + * @since 11.1 */ public function assignRef($key, &$val) { @@ -306,8 +306,9 @@ public function assignRef($key, &$val) * If escaping mechanism is either htmlspecialchars or htmlentities, uses * {@link $_encoding} setting. * - * @param mixed The output to escape. - * @return mixed The escaped value. + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. */ function escape($var) { @@ -321,9 +322,10 @@ function escape($var) /** * Method to get data from a registered model or a property of the view * - * @param string The name of the method to call on the model or the property to get - * @param string The name of the model to reference or the default value [optional] - * @return mixed The return value of the method + * @param string $property The name of the method to call on the model or the property to get + * @param string $default The name of the model to reference or the default value [optional] + * + * @return mixed The return value of the method */ public function get($property, $default = null) { @@ -360,8 +362,11 @@ public function get($property, $default = null) /** * Method to get the model object * - * @param string The name of the model (optional) - * @return mixed JModel object + * @param string $name The name of the model (optional) + * + * @return mixed JModel object + * + * @since 11.1 */ public function getModel($name = null) { @@ -374,7 +379,7 @@ public function getModel($name = null) /** * Get the layout. * - * @return string The layout name + * @return string The layout name */ public function getLayout() { @@ -384,7 +389,7 @@ public function getLayout() /** * Get the layout template. * - * @return string The layout template name + * @return string The layout template name */ public function getLayoutTemplate() { @@ -397,14 +402,12 @@ public function getLayoutTemplate() * The model name by default parsed using the classname, or it can be set * by passing a $config['name'] in the class constructor * - * @return string The name of the model + * @return string The name of the model * @since 11.1 */ public function getName() { - $name = $this->_name; - - if (empty($name)) + if (empty($this->_name)) { $r = null; if (!preg_match('/View((view)*(.*(view)?.*))$/i', get_class($this), $r)) { @@ -414,10 +417,10 @@ public function getName() { JError::raiseWarning('SOME_ERROR_CODE', JText::_('JLIB_APPLICATION_ERROR_VIEW_GET_NAME_SUBSTRING')); } - $name = strtolower($r[3]); + $this->_name = strtolower($r[3]); } - return $name; + return $this->_name; } /** @@ -427,10 +430,12 @@ public function getName() * referenced by the name without JModel, eg. JModelCategory is just * Category. * - * @param object $model The model to add to the view. + * @param object &$model The model to add to the view. * @param boolean $default Is this the default model? * * @return object The added model + * + * @since 11.1 */ public function setModel(&$model, $default = false) { @@ -447,10 +452,11 @@ public function setModel(&$model, $default = false) * Sets the layout name to use * * @param string The layout name or a string in format