Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes

  • Loading branch information...
commit 1d4ba7ee74abf7ebe1a47b4d7630af8c16205de5 1 parent d59c068
@kaviththiranga authored
View
12 libraries/joomla/media/combiner.php
@@ -19,6 +19,8 @@
abstract class JMediaCombiner
{
public $sources = array();
+
+ public $sourceCount = 0 ;
protected $_combined = null;
@@ -53,6 +55,7 @@ public function setSources($files =array())
if(JFile::getExt($file) == $type)
{
$this->sources[] = $file;
+ $this->sourceCount++;
}
else
{
@@ -125,12 +128,13 @@ public static function combineFiles($files, $options = array(), $destination = n
if ($destination === null)
{
$type = $extension = pathinfo($files[0], PATHINFO_EXTENSION);
-
+
+ //check for the file prefix in options, assign default prefix if not dound
if (array_key_exists('PREFIX', $options) && !empty($options['PREFIX']))
- {
+ {
$destination = str_ireplace('.' . $type, '.' . $options['PREFIX'] . '.' . $type, $files[0]);
- }
- else
+ }
+ else
{
$destination = str_ireplace('.' . $type, '.combined.' . $type, $files[0]);
}
View
4 libraries/joomla/media/combiner/css.php
@@ -65,7 +65,9 @@ public function combine()
{
$this->_combined .= '/* File : ' . JFile::getName($file) . ' : End */' . "\n\n";
}
- }
+ }
+
+ $this->_combined .= '/* ' . $this->sourceCount . ' css files are combined */';
}
}
View
4 libraries/joomla/media/combiner/js.php
@@ -57,6 +57,8 @@ public function combine()
{
$this->_combined .= '// File : ' . JFile::getName($file) . ' : End' . "\n\n";
}
- }
+ }
+
+ $this->_combined .= '// ' . $this->sourceCount . ' js files are combined';
}
}
View
14 libraries/joomla/media/compressor.php
@@ -69,22 +69,22 @@ public function setUncompressed($uncompressed)
$this->_uncompressedSize = strlen($this->_uncompressed);
}
- /**
+ /**
* Method to get uncompressed code.
*
* @return String uncompressed code.
*
* @since 12.1
*/
- public function getUncompressed()
- {
- return $this->_uncompressed;
- }
+ public function getUncompressed()
+ {
+ return $this->_uncompressed;
+ }
- /**
+ /**
* Method to set uncompressed code.
*
- * @param string $uncompressed Uncomressed Code.
+ * @param string $compressed compressed Code.
*
* @return void
*
Please sign in to comment.
Something went wrong with that request. Please try again.