Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some more platform merging. #20

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -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__));
Expand Down Expand Up @@ -40,6 +38,8 @@
require_once JPATH_PLATFORM.'/loader.php';
}

class_exists('JLoader') or die;

/**
* Import the base Joomla Platform libraries.
*/
Expand Down
2 changes: 0 additions & 2 deletions libraries/joomla/access/rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '')
Expand Down
27 changes: 13 additions & 14 deletions libraries/joomla/application/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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 {
Expand All @@ -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())
Expand Down Expand Up @@ -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);
Expand All @@ -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
Expand All @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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'));
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -917,7 +916,7 @@ public static function getHash($seed)
{
$conf = JFactory::getConfig();

return md5($conf->get('secret').$seed);
return md5($conf->get('secret') . $seed);
}

/**
Expand Down Expand Up @@ -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) {
Expand Down