Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for parent::__construct() in Aoe_JsCssTstamp_Model_Package... #15

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion app/code/local/Aoe/JsCssTstamp/Model/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public function __construct() {
$this->storageJs = Mage::getStoreConfig('dev/js/storage');

$this->addTstampToAssets = Mage::getStoreConfig('dev/css/addTstampToAssets');

if (is_callable('parent::__construct')) {
parent::__construct();
}
}

/**
Expand Down Expand Up @@ -146,7 +150,10 @@ public function getMergedJsUrl($files) {
* @return string
*/
public function beforeMergeJs($file, $contents) {
$contents = "\n\n/* FILE: " . basename($file) . " */\n" . $contents;

// In some cases, browsers will choke if the component files don't end
// with a statement ending, so we'll force one here to be safe.
$contents = ";\n\n/* FILE: " . basename($file) . " */\n" . $contents;
return $contents;
}

Expand Down