Skip to content
Browse files

Since JApplication depends on JInput fail early if it doesn't exist.

  • Loading branch information...
1 parent c0f56db commit b740a8c0a14fffc0a6a7306a5ec2dfaff9ef75ad @realityking committed
View
5 libraries/legacy/application/application.php
@@ -106,10 +106,7 @@ public function __construct($config = array())
}
// Create the input object
- if (class_exists('JInput'))
- {
- $this->input = new JInput;
- }
+ $this->input = new JInput;
// Set the session default name.
if (!isset($config['session_name']))
View
4 libraries/legacy/application/helper.php
@@ -44,7 +44,7 @@ public static function getComponentName($default = null)
return $option;
}
- $input = JFactory::getApplication();
+ $input = JFactory::getApplication()->input;
$option = strtolower($input->get('option'));
if (empty($option))
@@ -52,7 +52,7 @@ public static function getComponentName($default = null)
$option = $default;
}
- $input->get('option', $option);
+ $input->set('option', $option);
return $option;
}
View
2 libraries/legacy/controller/admin.php
@@ -214,7 +214,7 @@ public function publish()
}
}
$extension = $input->get('extension');
- $extensionURL = ($extension) ? '&extension=' . $input->get('extension') : '';
+ $extensionURL = ($extension) ? '&extension=' . $extension : '';
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $extensionURL, false));
}

0 comments on commit b740a8c

Please sign in to comment.
Something went wrong with that request. Please try again.