Skip to content

Commit

Permalink
fixes and removed Old Combiner classes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaviththiranga committed Dec 10, 2012
1 parent 52ca108 commit e8bd348
Show file tree
Hide file tree
Showing 6 changed files with 644 additions and 782 deletions.
144 changes: 72 additions & 72 deletions libraries/joomla/media/collection/css.php
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
<?php
/**
* @package Joomla.Platform
* @subpackage Media
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

defined('JPATH_PLATFORM') or die;

/**
* CSS combiner classes.
*
* @package Joomla.Platform
* @subpackage Media
* @since 12.1
*/
class JMediaCollectionCss extends JMediaCollection
{
/**
* Constructor
*
* @param Array $options options
*
* @since 12.1
*/
public function __construct($options = array())
{
$this->_options = array('COMPRESS' => false, 'FILE_COMMENTS' => true, 'COMPRESS_OPTIONS' => array());
parent::__construct($options);
}

/**
* Method to combine a set of files and save to single file.
*
* @return Void
*
* @since 12.1
*/
public function combine()
{
$this->combined = '';

foreach ($this->sources as $file)
{
if ($this->_options['FILE_COMMENTS'])
{
$this->combined .= '/** File : ' . JFile::getName($file) . ' : Start **/' . "\n\n";
}

if ($this->_options['COMPRESS'])
{
$this->_options['COMPRESS_OPTIONS']['type'] = 'css';

$this->combined .= JMediaCompressor::compressString(JFile::read($file), $this->_options['COMPRESS_OPTIONS']) . "\n\n";
}
else
{
$this->combined .= JFile::read($file) . "\n\n";
}

if ($this->_options['FILE_COMMENTS'])
{
$this->combined .= '/** File : ' . JFile::getName($file) . ' : End **/' . "\n\n";
}
}

$this->combined .= '/** ' . $this->sourceCount . ' css files are combined **/';

}
}
<?php
/**
* @package Joomla.Platform
* @subpackage Media
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

defined('JPATH_PLATFORM') or die;

/**
* CSS combiner classes.
*
* @package Joomla.Platform
* @subpackage Media
* @since 12.1
*/
class JMediaCollectionCss extends JMediaCollection
{
/**
* Constructor
*
* @param Array $options options
*
* @since 12.1
*/
public function __construct($options = array())
{
$this->options = array('COMPRESS' => false, 'FILE_COMMENTS' => true, 'COMPRESS_OPTIONS' => array());
parent::__construct($options);
}

/**
* Method to combine a set of files and save to single file.
*
* @return Void
*
* @since 12.1
*/
public function combine()
{
$this->combined = '';

foreach ($this->sources as $file)
{
if ($this->options['FILE_COMMENTS'])
{
$this->combined .= '/** File : ' . JFile::getName($file) . ' : Start **/' . "\n\n";
}

if ($this->options['COMPRESS'])
{
$this->options['COMPRESS_OPTIONS']['type'] = 'css';

$this->combined .= JMediaCompressor::compressString(JFile::read($file), $this->options['COMPRESS_OPTIONS']) . "\n\n";
}
else
{
$this->combined .= JFile::read($file) . "\n\n";
}

if ($this->options['FILE_COMMENTS'])
{
$this->combined .= '/** File : ' . JFile::getName($file) . ' : End **/' . "\n\n";
}
}

$this->combined .= '/** ' . $this->sourceCount . ' css files are combined **/';

}
}
144 changes: 72 additions & 72 deletions libraries/joomla/media/collection/js.php
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
<?php
/**
* @package Joomla.Platform
* @subpackage Media
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

defined('JPATH_PLATFORM') or die;

/**
* Javascript combiner class.
*
* @package Joomla.Platform
* @subpackage Compress
* @since 12.1
*/
class JMediaCollectionJs extends JMediaCollection
{

/**
* Constructor
*
* @param Array $options options
*
* @since 12.1
*/
public function __construct($options = array())
{
$this->_options = array('COMPRESS' => false, 'FILE_COMMENTS' => true, 'COMPRESS_OPTIONS' => array());
parent::__construct($options);
}

/**
* Method to combine a set of files and save to single file.
*
* @since 12.1
*
* @return void
*/
public function combine()
{
$this->combined = '';

foreach ($this->sources as $file)
{
if ($this->_options['FILE_COMMENTS'])
{
$this->combined .= '/** File : ' . JFile::getName($file) . ' : Start **/' . "\n\n";
}

if ($this->_options['COMPRESS'])
{
$this->_options['COMPRESS_OPTIONS']['type'] = 'js';

$this->combined .= JMediaCompressor::compressString(JFile::read($file), $this->_options['COMPRESS_OPTIONS']) . "\n\n";
}
else
{
$this->combined .= JFile::read($file) . "\n\n";
}

if ($this->_options['FILE_COMMENTS'])
{
$this->combined .= '/** File : ' . JFile::getName($file) . ' : End **/' . "\n\n";
}
}

$this->combined .= '/** ' . $this->sourceCount . ' js files are combined **/';
}
}
<?php
/**
* @package Joomla.Platform
* @subpackage Media
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

defined('JPATH_PLATFORM') or die;

/**
* Javascript combiner class.
*
* @package Joomla.Platform
* @subpackage Compress
* @since 12.1
*/
class JMediaCollectionJs extends JMediaCollection
{

/**
* Constructor
*
* @param Array $options options
*
* @since 12.1
*/
public function __construct($options = array())
{
$this->options = array('COMPRESS' => false, 'FILE_COMMENTS' => true, 'COMPRESS_OPTIONS' => array());
parent::__construct($options);
}

/**
* Method to combine a set of files and save to single file.
*
* @since 12.1
*
* @return void
*/
public function combine()
{
$this->combined = '';

foreach ($this->sources as $file)
{
if ($this->options['FILE_COMMENTS'])
{
$this->combined .= '/** File : ' . JFile::getName($file) . ' : Start **/' . "\n\n";
}

if ($this->options['COMPRESS'])
{
$this->options['COMPRESS_OPTIONS']['type'] = 'js';

$this->combined .= JMediaCompressor::compressString(JFile::read($file), $this->options['COMPRESS_OPTIONS']) . "\n\n";
}
else
{
$this->combined .= JFile::read($file) . "\n\n";
}

if ($this->options['FILE_COMMENTS'])
{
$this->combined .= '/** File : ' . JFile::getName($file) . ' : End **/' . "\n\n";
}
}

$this->combined .= '/** ' . $this->sourceCount . ' js files are combined **/';
}
}
72 changes: 0 additions & 72 deletions libraries/joomla/media/combiner/css.php

This file was deleted.

Loading

0 comments on commit e8bd348

Please sign in to comment.