Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
applied patch
Browse files Browse the repository at this point in the history
  • Loading branch information
elinw committed Jun 21, 2011
1 parent 08b83b7 commit 795e690
Show file tree
Hide file tree
Showing 87 changed files with 2,023 additions and 1,029 deletions.
17 changes: 11 additions & 6 deletions libraries/joomla/application/cli/daemon.php
Expand Up @@ -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
{
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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()
{
Expand Down Expand Up @@ -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()
Expand Down
48 changes: 25 additions & 23 deletions libraries/joomla/application/component/controller.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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='')
{
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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)
{
Expand All @@ -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
*/
Expand All @@ -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;
Expand All @@ -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;
}
}
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
17 changes: 12 additions & 5 deletions libraries/joomla/application/component/controlleradmin.php
Expand Up @@ -24,27 +24,34 @@
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;

/**
* Constructor.
*
* @param array An optional associative array of configuration settings.
* @param array An optional associative array of configuration settings.
*
* @see JController
* @since 11.1
*/
Expand Down Expand Up @@ -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)
Expand Down
41 changes: 27 additions & 14 deletions libraries/joomla/application/component/controllerform.php
Expand Up @@ -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;
Expand All @@ -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())
{
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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.
Expand Down

0 comments on commit 795e690

Please sign in to comment.