This file contains 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') { |
This file contains 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
<?php | |
echo 'hello world'; |
This file contains 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
class SponsorDivisionsController extends AppController { | |
public function index() { | |
$this->SponsorDivision->Behaviors->load('Containable'); | |
$sponsordivisions = $this->SponsorDivision->find('all', array( | |
'contain' => array( | |
'Sponsor', | |
), | |
'order' => array( | |
'SponsorDivision.SponsorDivision' => 'asc'), | |
), |
This file contains 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
<?php | |
/* Model/Sponsor.php */ | |
class Sponsor extends AppModel { | |
public $name = 'Sponsor'; | |
public $useTable = 'Sponsors'; | |
public $displayField = 'Sponsor'; | |
public $primaryKey = 'SponsorID'; | |
public $hasMany = array( | |
'SponsorDivision' => array( | |
'className' => 'SponsorDivision', |
This file contains 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
<?php | |
App::uses('AppModel', 'Model'); | |
/** | |
* Sponsor.php Model | |
* | |
* @author Chris Pierce <[email protected]> | |
*/ | |
class Sponsor extends AppModel { |
This file contains 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
$hasManys = [ | |
]; | |
foreach ($hasManys as $hasMany) { | |
$this->hasMany($hasMany); | |
} |
This file contains 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
Router::prefix('admin', function ($routes) { | |
$routes->connect('/:controller'); | |
}); |
NewerOlder