Skip to content

Commit

Permalink
Code style: adjusting line lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
elkuku committed Nov 5, 2011
1 parent 2760aac commit 91cb9d6
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 37 deletions.
106 changes: 78 additions & 28 deletions libraries/joomla/application/component/controllerform.php
Expand Up @@ -154,7 +154,13 @@ public function add()
// Set the internal error and also the redirect error.
$this->setError(JText::_('JLIB_APPLICATION_ERROR_CREATE_RECORD_NOT_PERMITTED'));
$this->setMessage($this->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false));

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
);

return false;
}
Expand All @@ -165,8 +171,8 @@ public function add()
// Redirect to the edit screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend(),
false
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend(), false
)
);

Expand Down Expand Up @@ -300,10 +306,11 @@ public function cancel($key = null)
// Somehow the person just went to the form - we don't allow that.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $recordId));
$this->setMessage($this->getError(), 'error');

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(),
false
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
);

Expand All @@ -317,11 +324,11 @@ public function cancel($key = null)
// Check-in failed, go back to the record and display a notice.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()));
$this->setMessage($this->getError(), 'error');

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item .
$this->getRedirectToItemAppend($recordId, $key),
false
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($recordId, $key), false
)
);

Expand All @@ -333,7 +340,13 @@ public function cancel($key = null)
// Clean the session data and redirect.
$this->releaseEditId($context, $recordId);
$app->setUserState($context . '.data', null);
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false));

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
);

return true;
}
Expand Down Expand Up @@ -380,7 +393,13 @@ public function edit($key = null, $urlVar = null)
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED'));
$this->setMessage($this->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false));

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
);

return false;
}
Expand All @@ -391,7 +410,13 @@ public function edit($key = null, $urlVar = null)
// Check-out failed, display a notice but allow the user to see the record.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKOUT_FAILED', $model->getError()));
$this->setMessage($this->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, $urlVar), false));

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($recordId, $urlVar), false
)
);

return false;
}
Expand All @@ -400,7 +425,13 @@ public function edit($key = null, $urlVar = null)
// Check-out succeeded, push the new record id into the session.
$this->holdEditId($context, $recordId);
$app->setUserState($context . '.data', null);
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, $urlVar), false));

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($recordId, $urlVar), false
)
);

return true;
}
Expand Down Expand Up @@ -545,7 +576,13 @@ public function save($key = null, $urlVar = null)
// Somehow the person just went to the form and tried to save it. We don't allow that.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $recordId));
$this->setMessage($this->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false));

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
);

return false;
}
Expand All @@ -562,11 +599,11 @@ public function save($key = null, $urlVar = null)
// Check-in failed. Go back to the item and display a notice.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()));
$this->setMessage($this->getError(), 'error');

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item .
$this->getRedirectToItemAppend($recordId, $urlVar),
false
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($recordId, $urlVar), false
)
);

Expand All @@ -583,7 +620,13 @@ public function save($key = null, $urlVar = null)
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'));
$this->setMessage($this->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false));

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
);

return false;
}
Expand Down Expand Up @@ -627,8 +670,8 @@ public function save($key = null, $urlVar = null)
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, $key),
false
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($recordId, $key), false
)
);

Expand All @@ -644,10 +687,11 @@ public function save($key = null, $urlVar = null)
// Redirect back to the edit screen.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $model->getError()));
$this->setMessage($this->getError(), 'error');

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, $key),
false
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($recordId, $key), false
)
);

Expand All @@ -663,7 +707,13 @@ public function save($key = null, $urlVar = null)
// Check-in failed, so go back to the record and display a notice.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()));
$this->setMessage($this->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, $key), false));

$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($recordId, $key), false
)
);

return false;
}
Expand All @@ -689,8 +739,8 @@ public function save($key = null, $urlVar = null)
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, $key),
false
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($recordId, $key), false
)
);
break;
Expand All @@ -703,8 +753,8 @@ public function save($key = null, $urlVar = null)
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend(null, $key),
false
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend(null, $key), false
)
);
break;
Expand All @@ -717,8 +767,8 @@ public function save($key = null, $urlVar = null)
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(),
false
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
);
break;
Expand Down
10 changes: 7 additions & 3 deletions libraries/joomla/cache/storage/file.php
Expand Up @@ -530,7 +530,8 @@ protected function _cleanPath($path, $ds = DS)
*
* @since 11.1
*/
protected function _filesInFolder($path, $filter = '.', $recurse = false, $fullpath = false, $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter = array('^\..*', '.*~'))
protected function _filesInFolder($path, $filter = '.', $recurse = false, $fullpath = false
, $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter = array('^\..*', '.*~'))
{
// Initialise variables.
$arr = array();
Expand Down Expand Up @@ -616,7 +617,8 @@ protected function _filesInFolder($path, $filter = '.', $recurse = false, $fullp
*
* @since 11.1
*/
protected function _folders($path, $filter = '.', $recurse = false, $fullpath = false, $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter = array('^\..*'))
protected function _folders($path, $filter = '.', $recurse = false, $fullpath = false
, $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter = array('^\..*'))
{
// Initialise variables.
$arr = array();
Expand Down Expand Up @@ -647,7 +649,9 @@ protected function _folders($path, $filter = '.', $recurse = false, $fullpath =
}
while (($file = readdir($handle)) !== false)
{
if (($file != '.') && ($file != '..') && (!in_array($file, $exclude)) && (empty($excludefilter_string) || !preg_match($excludefilter_string, $file)))
if (($file != '.') && ($file != '..')
&& (!in_array($file, $exclude))
&& (empty($excludefilter_string) || !preg_match($excludefilter_string, $file)))
{
$dir = $path . '/' . $file;
$isDir = is_dir($dir);
Expand Down
6 changes: 4 additions & 2 deletions libraries/joomla/client/ftp.php
Expand Up @@ -1366,8 +1366,10 @@ public function listDetails($path = null, $type = 'all')

// Regular expressions for the directory listing parsing.
$regexps = array(
'UNIX' => '#([-dl][rwxstST-]+).* ([0-9]*) ([a-zA-Z0-9]+).* ([a-zA-Z0-9]+).* ([0-9]*) ([a-zA-Z]+[0-9: ]*[0-9])[ ]+(([0-9]{1,2}:[0-9]{2})|[0-9]{4}) (.+)#',
'MAC' => '#([-dl][rwxstST-]+).* ?([0-9 ]*)?([a-zA-Z0-9]+).* ([a-zA-Z0-9]+).* ([0-9]*) ([a-zA-Z]+[0-9: ]*[0-9])[ ]+(([0-9]{2}:[0-9]{2})|[0-9]{4}) (.+)#',
'UNIX' => '#([-dl][rwxstST-]+).* ([0-9]*) ([a-zA-Z0-9]+).* ([a-zA-Z0-9]+).* ([0-9]*)'
. ' ([a-zA-Z]+[0-9: ]*[0-9])[ ]+(([0-9]{1,2}:[0-9]{2})|[0-9]{4}) (.+)#',
'MAC' => '#([-dl][rwxstST-]+).* ?([0-9 ]*)?([a-zA-Z0-9]+).* ([a-zA-Z0-9]+).* ([0-9]*)'
. ' ([a-zA-Z]+[0-9: ]*[0-9])[ ]+(([0-9]{2}:[0-9]{2})|[0-9]{4}) (.+)#',
'WIN' => '#([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|<DIR>) +(.+)#'
);

Expand Down
10 changes: 8 additions & 2 deletions libraries/joomla/environment/browser.php
Expand Up @@ -338,7 +338,11 @@ public function match($userAgent = null, $accept = null)
{
$this->_setPlatform();

if (strpos($this->_lowerAgent, 'mobileexplorer') !== false || strpos($this->_lowerAgent, 'openwave') !== false || strpos($this->_lowerAgent, 'opera mini') !== false || strpos($this->_lowerAgent, 'opera mobi') !== false || strpos($this->_lowerAgent, 'operamini') !== false)
if (strpos($this->_lowerAgent, 'mobileexplorer') !== false
|| strpos($this->_lowerAgent, 'openwave') !== false
|| strpos($this->_lowerAgent, 'opera mini') !== false
|| strpos($this->_lowerAgent, 'opera mobi') !== false
|| strpos($this->_lowerAgent, 'operamini') !== false)
{
$this->setFeature('frames', false);
$this->setFeature('javascript', false);
Expand Down Expand Up @@ -373,7 +377,9 @@ public function match($userAgent = null, $accept = null)
list ($this->_majorVersion, $this->_minorVersion) = explode('.', $version[1]);
$this->setFeature('javascript', true);
}
elseif (strpos($this->_lowerAgent, 'elaine/') !== false || strpos($this->_lowerAgent, 'palmsource') !== false || strpos($this->_lowerAgent, 'digital paths') !== false)
elseif (strpos($this->_lowerAgent, 'elaine/') !== false
|| strpos($this->_lowerAgent, 'palmsource') !== false
|| strpos($this->_lowerAgent, 'digital paths') !== false)
{
$this->setBrowser('palm');
$this->setFeature('images', false);
Expand Down
4 changes: 3 additions & 1 deletion libraries/joomla/filter/filterinput.php
Expand Up @@ -560,7 +560,9 @@ protected function _cleanAttributes($attrSet)
// Remove all "non-regular" attribute names
// AND blacklisted attributes

if ((!preg_match('/[a-z]*$/i', $attrSubSet[0])) || (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist)) || (substr($attrSubSet[0], 0, 2) == 'on'))))
if ((!preg_match('/[a-z]*$/i', $attrSubSet[0]))
|| (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist))
|| (substr($attrSubSet[0], 0, 2) == 'on'))))
{
continue;
}
Expand Down
3 changes: 2 additions & 1 deletion libraries/joomla/html/html/batch.php
Expand Up @@ -80,7 +80,8 @@ public static function language()
{
// Create the batch selector to change an access level on a selection list.
$lines = array(
'<label id="batch-language-lbl" for="batch-language" class="hasTip" title="' . JText::_('JLIB_HTML_BATCH_LANGUAGE_LABEL') . '::' . JText::_('JLIB_HTML_BATCH_LANGUAGE_LABEL_DESC') . '">',
'<label id="batch-language-lbl" for="batch-language" class="hasTip"'
.' title="' . JText::_('JLIB_HTML_BATCH_LANGUAGE_LABEL') . '::' . JText::_('JLIB_HTML_BATCH_LANGUAGE_LABEL_DESC') . '">',
JText::_('JLIB_HTML_BATCH_LANGUAGE_LABEL'),
'</label>',
'<select name="batch[language_id]" class="inputbox" id="batch-language-id">',
Expand Down

0 comments on commit 91cb9d6

Please sign in to comment.