Skip to content
Browse files

Reduce use of JRequest.

  • Loading branch information...
1 parent 6c805d1 commit ea74453b17baab75ec1f3db6025516255a5b79f0 @realityking realityking committed
View
2 administrator/components/com_content/views/article/tmpl/edit.php
@@ -312,7 +312,7 @@
<!-- End Tabs -->
</div>
<input type="hidden" name="task" value="" />
- <input type="hidden" name="return" value="<?php echo JRequest::getCmd('return');?>" />
+ <input type="hidden" name="return" value="<?php echo $input->getCmd('return');?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
<!-- End Content -->
View
2 administrator/components/com_media/views/images/tmpl/default.php
@@ -105,7 +105,7 @@
<ul class="upload-queue" id="upload-queue">
<li style="display: none"></li>
</ul>
- <input type="hidden" name="return-url" value="<?php echo base64_encode('index.php?option=com_media&view=images&tmpl=component&fieldid=' . $input->getCmd('fieldid', '') . '&e_name=' . $input->getCmd('e_name') . '&asset=' . JRequest::getCmd('asset') . '&author=' . $input->getCmd('author')); ?>" />
+ <input type="hidden" name="return-url" value="<?php echo base64_encode('index.php?option=com_media&view=images&tmpl=component&fieldid=' . $input->getCmd('fieldid', '') . '&e_name=' . $input->getCmd('e_name') . '&asset=' . $input->getCmd('asset') . '&author=' . $input->getCmd('author')); ?>" />
</fieldset>
</form>
<?php endif; ?>
View
4 administrator/components/com_media/views/media/tmpl/default.php
@@ -78,7 +78,7 @@
</form>
</div>
<div id="collapseFolder" class="collapse">
- <form action="index.php?option=com_media&amp;task=folder.create&amp;tmpl=<?php echo JRequest::getCmd('tmpl', 'index');?>" name="folderForm" id="folderForm" class="form-inline" method="post">
+ <form action="index.php?option=com_media&amp;task=folder.create&amp;tmpl=<?php echo $input->getCmd('tmpl', 'index');?>" name="folderForm" id="folderForm" class="form-inline" method="post">
<div class="path">
<input class="inputbox" type="text" id="folderpath" readonly="readonly" />
<input class="inputbox" type="text" id="foldername" name="foldername" />
@@ -90,7 +90,7 @@
</div>
<?php endif;?>
- <form action="index.php?option=com_media&amp;task=folder.create&amp;tmpl=<?php echo JRequest::getCmd('tmpl', 'index');?>" name="folderForm" id="folderForm" method="post">
+ <form action="index.php?option=com_media&amp;task=folder.create&amp;tmpl=<?php echo $input->getCmd('tmpl', 'index');?>" name="folderForm" id="folderForm" method="post">
<div id="folderview">
<div class="view">
<iframe class="thumbnail" src="index.php?option=com_media&amp;view=mediaList&amp;tmpl=component&amp;folder=<?php echo $this->state->folder;?>" id="folderframe" name="folderframe" width="100%" height="500px" marginwidth="0" marginheight="0" scrolling="auto"></iframe>
View
3 administrator/components/com_menus/views/menutypes/tmpl/default.php
@@ -9,8 +9,9 @@
defined('_JEXEC') or die;
+$input = JFactoy::getApplication()->input;
// Checking if loaded via index.php or component.php
-$tmpl = JRequest::getCmd('tmpl', '');
+$tmpl = $input->getCmd('tmpl', '');
?>
<script type="text/javascript">
View
8 administrator/modules/mod_status/tmpl/default.php
@@ -9,9 +9,9 @@
defined('_JEXEC') or die;
-$hideLinks = JRequest::getBool('hidemainmenu');
-$task = JRequest::getCmd('task');
-$output = array();
+$hideLinks = $input->getBool('hidemainmenu');
+$task = $input->getCmd('task');
+$output = array();
// Print the Preview link to Main site.
if ($params->get('show_viewsite', 1)) :
@@ -44,7 +44,7 @@
// Print the logout link.
-if ($task == 'edit' || $task == 'editA' || JRequest::getInt('hidemainmenu')) {
+if ($task == 'edit' || $task == 'editA' || $input->getInt('hidemainmenu')) {
$logoutLink = '';
} else {
$logoutLink = JRoute::_('index.php?option=com_login&task=logout&'. JSession::getFormToken() .'=1');
View
5 administrator/templates/hathor/html/com_config/component/default.php
@@ -9,7 +9,8 @@
defined('_JEXEC') or die;
-$template = JFactory::getApplication()->getTemplate();
+$app = JFactory::getApplication();
+$template = $app->getTemplate();
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
@@ -30,7 +31,7 @@
<?php echo JText::_('JAPPLY');?></button>
<button type="button" onclick="Joomla.submitform('component.save', this.form);">
<?php echo JText::_('JSAVE');?></button>
- <button type="button" onclick="<?php echo JRequest::getBool('refresh', 0) ? 'window.parent.location.href=window.parent.location.href;' : '';?> window.parent.SqueezeBox.close();">
+ <button type="button" onclick="<?php echo $app->input->getBool('refresh', 0) ? 'window.parent.location.href=window.parent.location.href;' : '';?> window.parent.SqueezeBox.close();">
<?php echo JText::_('JCANCEL');?></button>
</div>
<div class="configuration" >
View
5 administrator/templates/hathor/html/com_templates/template/default.php
@@ -13,7 +13,8 @@
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.modal');
-$canDo = TemplatesHelper::getActions();
+$canDo = TemplatesHelper::getActions();
+$input = JFactory::getApplication()->input;
?>
<form action="<?php echo JRoute::_('index.php?option=com_templates&view=templates'); ?>" method="post" name="adminForm" id="adminForm">
<div class="width-50 fltlft">
@@ -117,7 +118,7 @@
</div>
<div class="width-50 fltrt">
</form>
-<form action="<?php echo JRoute::_('index.php?option=com_templates&task=template.copy&id=' . JRequest::getInt('id')); ?>"
+<form action="<?php echo JRoute::_('index.php?option=com_templates&task=template.copy&id=' . $input->getInt('id')); ?>"
method="post" name="adminForm" id="adminForm">
<fieldset class="adminform" id="template-manager-css">
<legend><?php echo JText::_('COM_TEMPLATES_TEMPLATE_COPY');?></legend>
View
10 administrator/templates/isis/login.php
@@ -23,11 +23,11 @@
$doc->addStyleSheet('../media/jui/css/chosen.css');
// Detecting Active Variables
-$option = JRequest::getCmd('option', '');
-$view = JRequest::getCmd('view', '');
-$layout = JRequest::getCmd('layout', '');
-$task = JRequest::getCmd('task', '');
-$itemid = JRequest::getCmd('Itemid', '');
+$option = $app->input->getCmd('option', '');
+$view = $app->input->getCmd('view', '');
+$layout = $app->input->getCmd('layout', '');
+$task = $app->input->getCmd('task', '');
+$itemid = $app->input->getCmd('Itemid', '');
$sitename = $app->getCfg('sitename');
?>
<!DOCTYPE html>
View
10 templates/protostar/index.php
@@ -13,11 +13,11 @@
$doc = JFactory::getDocument();
// Detecting Active Variables
-$option = JRequest::getCmd('option', '');
-$view = JRequest::getCmd('view', '');
-$layout = JRequest::getCmd('layout', '');
-$task = JRequest::getCmd('task', '');
-$itemid = JRequest::getCmd('Itemid', '');
+$option = $app->input->getCmd('option', '');
+$view = $app->input->getCmd('view', '');
+$layout = $app->input->getCmd('layout', '');
+$task = $app->input->getCmd('task', '');
+$itemid = $app->input->getCmd('Itemid', '');
$sitename = $app->getCfg('sitename');
if($task == "edit" || $layout == "form" )

0 comments on commit ea74453

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