Merge branch '3.6' into 3

This commit is contained in:
Daniel Hensby 2017-08-29 16:54:09 +01:00
commit f8c5ff2f15
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
3 changed files with 27 additions and 22 deletions

View File

@ -129,7 +129,7 @@ $configManifest = new SS_ConfigManifest(BASE_PATH, false, $flush);
Config::inst()->pushConfigYamlManifest($configManifest); Config::inst()->pushConfigYamlManifest($configManifest);
// Load template manifest // Load template manifest
SS_TemplateLoader::instance()->pushManifest(new SS_TemplateManifest( SS_TemplateLoader::instance()->pushManifest(Injector::inst()->create('SS_TemplateManifest',
BASE_PATH, project(), false, $flush BASE_PATH, project(), false, $flush
)); ));

View File

@ -336,7 +336,7 @@ class MySQLSchemaManager extends DBSchemaManager {
public function tableList() { public function tableList() {
$tables = array(); $tables = array();
foreach ($this->query("SHOW TABLES") as $record) { foreach ($this->query("SHOW FULL TABLES WHERE Table_Type != 'VIEW'") as $record) {
$table = reset($record); $table = reset($record);
$tables[strtolower($table)] = $table; $tables[strtolower($table)] = $table;
} }

View File

@ -744,25 +744,24 @@ class Requirements_Backend {
* @param string|int $fileOrID * @param string|int $fileOrID
*/ */
public function clear($fileOrID = null) { public function clear($fileOrID = null) {
$types = array(
'javascript',
'css',
'customScript',
'customCSS',
'customHeadTags',
'combine_files',
);
foreach ($types as $type) {
if ($fileOrID) { if ($fileOrID) {
foreach(array('javascript','css', 'customScript', 'customCSS', 'customHeadTags') as $type) {
if (isset($this->{$type}[$fileOrID])) { if (isset($this->{$type}[$fileOrID])) {
$this->disabled[$type][$fileOrID] = $this->{$type}[$fileOrID]; $this->disabled[$type][$fileOrID] = $this->{$type}[$fileOrID];
unset($this->{$type}[$fileOrID]); unset($this->{$type}[$fileOrID]);
} }
}
} else { } else {
$this->disabled['javascript'] = $this->javascript; $this->disabled[$type] = $this->{$type};
$this->disabled['css'] = $this->css; $this->{$type} = array();
$this->disabled['customScript'] = $this->customScript; }
$this->disabled['customCSS'] = $this->customCSS;
$this->disabled['customHeadTags'] = $this->customHeadTags;
$this->javascript = array();
$this->css = array();
$this->customScript = array();
$this->customCSS = array();
$this->customHeadTags = array();
} }
} }
@ -770,11 +769,17 @@ class Requirements_Backend {
* Restore requirements cleared by call to Requirements::clear * Restore requirements cleared by call to Requirements::clear
*/ */
public function restore() { public function restore() {
$this->javascript = $this->disabled['javascript']; $types = array(
$this->css = $this->disabled['css']; 'javascript',
$this->customScript = $this->disabled['customScript']; 'css',
$this->customCSS = $this->disabled['customCSS']; 'customScript',
$this->customHeadTags = $this->disabled['customHeadTags']; 'customCSS',
'customHeadTags',
'combine_files',
);
foreach ($types as $type) {
$this->{$type} = $this->disabled[$type];
}
} }
/** /**
* Block inclusion of a specific file * Block inclusion of a specific file