Skip to content

Commit

Permalink
Update to 6.5.10
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdesign committed Mar 20, 2018
1 parent d45c66a commit 2a87422
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 48 deletions.
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<project name="junewsultra" default="dist" basedir=".">

<property name="VERSION" value="6.5.9"/>
<property name="VERSION" value="6.5.10"/>

<tstamp>
<format property="DATE" pattern="%d.%m.%Y" />
</tstamp>

<property name="julib" value="2.7.7"/>
<property name="julib" value="2.7.8"/>

<property name="build" value="build"/>

Expand Down
18 changes: 9 additions & 9 deletions packages/mod_junewsultra/fields/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class JFormFieldTemplate extends JFormField
*/
protected function getInput()
{
if (!isset($_GET[ 'id' ]))
if(!isset($_GET[ 'id' ]))
{
return JText::_('MOD_JUNEWS_NOT_EDIT_TEMPLATE');
}
Expand All @@ -43,15 +43,15 @@ protected function getInput()
);
$rows = $db->loadResult();

if (preg_match('#"template":"_:(.*?)"#is', $rows, $ok))
if(preg_match('#"template":"_:(.*?)"#is', $rows, $ok))
{
if ($ok[1] == 1)
if($ok[ 1 ] == 1)
{
$tmpl = 'default';
}
else
{
$tmpl = $ok[1];
$tmpl = $ok[ 1 ];
}
}
else
Expand All @@ -62,21 +62,21 @@ protected function getInput()
$html = array();
$link = str_replace('/administrator', '', JURI::base()) . 'modules/mod_junewsultra/fields/edittemplate.php?file=' . $tmpl . '.php';

if ($error = $db->getErrorMsg())
if($error = $db->getErrorMsg())
{
JFactory::getApplication()->enqueueMessage($error, 'error');
}

if ($_GET[ 'id' ])
if($_GET[ 'id' ])
{
$html[] = '<a class="modal btn" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 1000, y: 650}}"><i class="class="icon-cog""></i> ' . JText::_('MOD_JUNEWS_TEMPLATE_BUTTON') . '</a>';
$html[] = '<a class="modal btn" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 1000, y: 650}}"><i class="icon-cog"></i> ' . JText::_('MOD_JUNEWS_TEMPLATE_BUTTON') . '</a>';
}
else
{
$html[] = JText::_('MOD_JUNEWS_NOT_EDIT_TEMPLATE');
}

if (0 == (int) $this->value)
if(0 == (int) $this->value)
{
$value = '';
}
Expand All @@ -86,7 +86,7 @@ protected function getInput()
}

$class = '';
if ($this->required)
if($this->required)
{
$class = ' class="required modal-value"';
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mod_junewsultra/fields/uploadimg.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function alert($text, $error)
}
else
{
$size = GetImageSize($filename);
$size = getimagesize($filename);
if ($size && ($size[ 0] < $max_image_width) && ($size[ 1] < $max_image_height))
{
if (@move_uploaded_file($filename, $path . '/jn_' . $_FILES['userfile']['name']))
Expand Down
4 changes: 1 addition & 3 deletions packages/mod_junewsultra/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ abstract class modJUNewsUltraHelper
*/
public static function getList($params, $junews)
{
$items = 'ROOT';

return $items;
return 'ROOT';
}
}
4 changes: 2 additions & 2 deletions packages/mod_junewsultra/helper/com_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static function getList($params, $junews)
{
if((int) $curr)
{
$cat_arr[ $key ] = intval($curr);
$cat_arr[ $key ] = (int) $curr;
}
}
}
Expand All @@ -164,7 +164,7 @@ public static function getList($params, $junews)

if((int) $catid)
{
$cat_arr[] = intval($catid);
$cat_arr[] = (int) $catid;
}
}

Expand Down
4 changes: 3 additions & 1 deletion packages/mod_junewsultra/lib/julib.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public static function ParceXML($feed_url, $xmlcount, $cache_file, $time, $path,

if(file_exists($cache_file) && $timedif < $time)
{
$string = file_get_contents(JURI::root() . $cache_file);
$string = @file_get_contents(JURI::root() . $cache_file);
$error = 0;
}
else
Expand Down Expand Up @@ -323,6 +323,8 @@ public static function video($url)
}
else
{
$feature = '';

parse_str($urls['query'], $output);
$yid = $output['v'];
if(!empty($feature))
Expand Down
7 changes: 2 additions & 5 deletions packages/mod_junewsultra/mod_junewsultra.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,9 @@
$object = new $component;
$list = $object->getList($params, $junews);

if($params->get('empty_mod', 0) == 0)
if($params->get('empty_mod', 0) == 0 && count($list) == 0)
{
if(count($list) == 0)
{
return;
}
return;
}

$layoutpath = JModuleHelper::getLayoutPath('mod_junewsultra', $params->def('template'));
Expand Down
31 changes: 6 additions & 25 deletions script.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
class Pkg_JUNewsUltraInstallerScript
{
protected $dbSupport = array('mysql', 'mysqli', 'postgresql', 'sqlsrv', 'sqlazure');

protected $message;

protected $status;
Expand All @@ -42,13 +40,6 @@ public function preflight($type, $parent)
return false;
}

if(!in_array(JFactory::getDbo()->name, $this->dbSupport, true))
{
JFactory::getApplication()->enqueueMessage(JText::_('MOD_JUNEWS_ERROR_DB_SUPPORT'), 'error');

return false;
}

$this->MakeDirectory($dir = JPATH_SITE . '/img', $mode = 0777);

if(!is_dir(JPATH_SITE . '/img/'))
Expand Down Expand Up @@ -188,8 +179,7 @@ public function postflight($type, $parent, $results)
$html .= $extension;
}

$html .= '</td><td>
<strong>';
$html .= '</td><td><strong>';

if($result['result'] == true)
{
Expand All @@ -200,8 +190,7 @@ public function postflight($type, $parent, $results)
$html .= '<span class="label label-important">' . JText::_('MOD_JUNEWS_NOT_INSTALLED') . '</span>';
}

$html .= '</strong>
</td><td>';
$html .= '</strong></td><td>';

if($enabled[$extension] == 1)
{
Expand Down Expand Up @@ -287,8 +276,7 @@ public function postflight($type, $parent, $results)

if(($i + $j) > 0)
{
$html .= '<h2>' . JText::_('MOD_JUNEWS_REMOVE_OLD_FILES') . '</h2>
<table class="table table-striped"><tbody>';
$html .= '<h2>' . JText::_('MOD_JUNEWS_REMOVE_OLD_FILES') . '</h2><table class="table table-striped"><tbody>';

foreach ($files AS $file)
{
Expand All @@ -297,10 +285,7 @@ public function postflight($type, $parent, $results)
$filepath = str_replace($path, '', $file);
unlink($file);

$html .= '<tr>
<td><span class="label">File:</span> <code>' . $filepath . '</code></td>
<td><span class="label label-inverse">Delete</span></td>
</tr>';
$html .= '<tr><td><span class="label">File:</span> <code>' . $filepath . '</code></td><td><span class="label label-inverse">Delete</span></td></tr>';
}
}

Expand All @@ -311,18 +296,14 @@ public function postflight($type, $parent, $results)
$folderpath = str_replace($path, '', $folder);
$this->unlinkRecursive($folder, 1);

$html .= '<tr>
<td><span class="label">Folder:</span> <code>' . $folderpath . '</code></td>
<td><span class="label label-inverse">Delete</span></td>
</tr>';
$html .= '<tr><td><span class="label">Folder:</span> <code>' . $folderpath . '</code></td><td><span class="label label-inverse">Delete</span></td></tr>';
}
}

$html .= '</tbody></table>';
}

$html .= '</div>
</div>';
$html .= '</div></div>';

if($joomla < '3.4')
{
Expand Down

0 comments on commit 2a87422

Please sign in to comment.