Skip to content

Commit 809feec

Browse files
committed
Remove whitespace + some useless variables
1 parent 76d1be5 commit 809feec

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

mod_shoutbox/fields/pro.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ class JFormFieldPro extends JFormField
2626
*/
2727
protected function getLabel()
2828
{
29-
$app = JFactory::getApplication();
3029
$msg = '<h3>Love JJ Shoutbox? Take a look at the <a href="https://joomjunk.co.uk/products/ajax-shoutbox-pro.html" target="_blank">Pro version</a> which is packed with many more features.</h3>';
3130

32-
return $app->enqueueMessage($msg, 'message');
31+
return JFactory::getApplication()->enqueueMessage($msg, 'message');
3332
}
3433

3534
/**

mod_shoutbox/fields/sep.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,20 @@ class JFormFieldSep extends JFormField
1818
* @var string
1919
*/
2020
protected $type = 'Sep';
21+
2122
/**
2223
* @return string
2324
*/
2425
protected function getLabel()
2526
{
26-
$doc = JFactory::getDocument();
27-
$doc->addStyleDeclaration('.jj-sep { border-bottom:1px solid #eee;font-size:16px;color:#BD362F;margin-top:15px;padding:2px 0;width:100% }');
28-
27+
JFactory::getDocument()->addStyleDeclaration('.jj-sep { border-bottom:1px solid #eee;font-size:16px;color:#BD362F;margin-top:15px;padding:2px 0;width:100% }');
28+
2929
$label = JText::_((string)$this->element['label']);
3030
$css = (string)$this->element['class'];
31-
31+
3232
return '<div class="jj-sep ' . $css . '">' . $label . '</div>';
3333
}
34+
3435
/**
3536
* @return mixed
3637
*/

mod_shoutbox/helper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,7 @@ public function linkUser($profile, $name, $user_id)
643643
elseif ($profile == 4)
644644
{
645645
// K2 Profile Link
646-
$profile_link = '<a href="' . JRoute::_('index.php?option=com_k2&view=itemlist&layout=user&id=' . $user_id .
647-
'&task=user') . '">' . $name . '</a>';
646+
$profile_link = '<a href="' . JRoute::_('index.php?option=com_k2&view=itemlist&layout=user&id=' . $user_id . '&task=user') . '">' . $name . '</a>';
648647
}
649648
elseif ($profile == 5)
650649
{

mod_shoutbox/mod_shoutbox.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@
217217
}
218218
}
219219
}
220-
221220
}
222221

223222
require JModuleHelper::getLayoutPath('mod_shoutbox');

mod_shoutbox/tmpl/default.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
// Counts the number of shouts retrieved from the database
101101
$actualnumber = count($shouts);
102102

103-
if ($actualnumber == 0)
103+
if ($actualnumber == 0)
104104
{
105105
echo '<div><p>' . JText::_('SHOUT_EMPTY') . '</p></div>';
106106
}
@@ -154,7 +154,7 @@
154154
{
155155
?>
156156
<form method="post" name="shout" class="<?php echo $form; ?>">
157-
157+
158158
<div class="<?php echo $form_row; ?>">
159159
<?php
160160
// Displays the Name of the user if logged in unless stated in the parameters to be a input box
@@ -210,7 +210,7 @@ class="<?php echo $input_txtarea; ?>"
210210
<button type="button" class="<?php echo $button . $button_small; ?> bbcode-button jj-underline" data-bbcode-type="u"><?php echo JText::_('SHOUT_BBCODE_UNDERLINE'); ?></button>
211211
<button type="button" class="<?php echo $button . $button_small; ?> bbcode-button jj-image jj-trigger-insert" data-bbcode-type="img"><?php echo JText::_('SHOUT_BBCODE_IMG'); ?></button>
212212
<button type="button" class="<?php echo $button . $button_small; ?> bbcode-button jj-link jj-trigger-insert" data-bbcode-type="url"><?php echo JText::_('SHOUT_BBCODE_LINK'); ?></button>
213-
<?php if ($framework == 'uikit') : ?>
213+
<?php if ($framework == 'uikit') : ?>
214214
<div class="uk-button-dropdown" data-uk-dropdown>
215215
<button class="uk-button uk-button-small" type="button">
216216
<img src="<?php echo JUri::root(); ?>images/mod_shoutbox/icon_e_smile.gif" alt="&#9786;" />
@@ -271,7 +271,7 @@ class="<?php echo $input_txtarea; ?>"
271271
?>
272272
<?php $que_number1 = $helper->randomnumber(1); ?>
273273
<?php $que_number2 = $helper->randomnumber(1); ?>
274-
<div class="form-inline <?php echo $form_row; ?>">
274+
<div class="form-inline <?php echo $form_row; ?>">
275275
<canvas id="mathscanvas" width="80" height="30">Your browser does not support the HTML5 canvas tag.</canvas>
276276
<input type="hidden" name="jjshout[sum1]" value="<?php echo $que_number1; ?>" />
277277
<input type="hidden" name="jjshout[sum2]" value="<?php echo $que_number2; ?>" />

0 commit comments

Comments
 (0)