diff --git a/e107_admin/image.php b/e107_admin/image.php index b54dd9042..0cf2a2d76 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -2391,7 +2391,7 @@ class media_admin_ui extends e_admin_ui $mes->add(IMALAN_113." ".e_IMPORT."", E_MESSAGE_INFO); } - if(!count($files)) + if(!count($files) ) { if(!vartrue($_POST['batch_import_selected'])) { @@ -2403,6 +2403,7 @@ class media_admin_ui extends e_admin_ui return; } + $text = "
@@ -2431,8 +2432,16 @@ class media_admin_ui extends e_admin_ui "; // $c = 0; + foreach($files as $f) { + if(empty($f)) + { + e107::getMessage()->addWarning("0 byte file found in: ".e_IMPORT."
Please remove before proceeding."); + ////rename(e_IMPORT.$f['path'].$f['fname'],e_IMPOT.$f['path'].$f['fname']."-bad"); + continue; + } + $default = $this->getFileXml($f['fname']); $f = $fl->cleanFileName($f,true); diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index 098ba722e..596a065ff 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -853,6 +853,7 @@ class news_shortcodes extends e_shortcode { $src = $tp->thumbUrl($srcPath); $dimensions = $tp->thumbDimensions(); + $srcset = $tp->thumbSrcSet($srcPath,array('size'=>'2x')); } else @@ -881,6 +882,15 @@ class news_shortcodes extends e_shortcode $style = !empty($this->param['thumbnail']) ? $this->param['thumbnail'] : ''; + $imgParms = array( + 'class'=>$class, + 'alt'=>basename($src), + 'style'=>$style + ); + + + $imgTag = $tp->toImage($srcPath,$imgParms); + switch(vartrue($parm['type'])) { case 'src': @@ -888,12 +898,12 @@ class news_shortcodes extends e_shortcode break; case 'tag': - return ""; + return ".$imgTag."; // ""; break; case 'url': default: - return "news_item)."'>"; + return "news_item)."'>".$imgTag.""; break; } } diff --git a/e107_plugins/featurebox/includes/item.php b/e107_plugins/featurebox/includes/item.php index b43c3cb99..ddcd84e2a 100644 --- a/e107_plugins/featurebox/includes/item.php +++ b/e107_plugins/featurebox/includes/item.php @@ -203,7 +203,7 @@ class plugin_featurebox_item extends e_model public function sc_featurebox_counter($parm=1) { $count = $this->getParam('counter', 1); - return ($parm == 0) ? $count - 1 : $count; + return (empty($parm)) ? $count - 1 : $count; } /**