Created
March 7, 2016 03:53
-
-
Save cpierce/f281424fea802ff14d4a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function storeAdvancedCSS($cssID) | |
{ | |
global $site; | |
$file = new TextFile($site->userFiles, 'css'.$cssID.'.css'); | |
if ($site->S3_ON) { | |
S3New::getInstance()->deleteFile($site->S3_SITE_FOLDER.'/css'.$cssID.'.css'); | |
//TODO: This would be a prime place to invalidate our cache because we know that we are about to delete the file. | |
//However it shouldn't be needed because the code attempts, to re-create the same file that we just deleted. Placing here for the future. | |
if (constant('ENVIRONMENT') != 'production') { | |
MemoryManager::getInstance()->invalidateCSSFile($site->userFileLoc.'css'.$site->designID.'.css'); | |
} | |
} else { | |
$file->deleteFile(); | |
} | |
$file->writeToFile($this->generateAdvancedCSS($cssID)); | |
$this->storeCkCSS($site->userFiles); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment