diff options
| author | spiderr <spiderr@bitweaver.org> | 2022-11-12 11:53:36 -0500 |
|---|---|---|
| committer | spiderr <spiderr@bitweaver.org> | 2022-11-12 11:53:36 -0500 |
| commit | 1e1d6d6241121ce5f13cc6717738082a304ada3e (patch) | |
| tree | 98b56d3a11046d3da68c1e258aa3bbcb60cbabff /includes | |
| parent | 373fca27f5ca68081e4805cd13c62f7c69236762 (diff) | |
| download | themes-1e1d6d6241121ce5f13cc6717738082a304ada3e.tar.gz themes-1e1d6d6241121ce5f13cc6717738082a304ada3e.tar.bz2 themes-1e1d6d6241121ce5f13cc6717738082a304ada3e.zip | |
checkout for getAll themes_layouts before storing
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/classes/BitThemes.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/classes/BitThemes.php b/includes/classes/BitThemes.php index 90c83a8..929e13d 100644 --- a/includes/classes/BitThemes.php +++ b/includes/classes/BitThemes.php @@ -803,12 +803,13 @@ class BitThemes extends BitSingleton { $this->mDb->query( "DELETE FROM `".BIT_DB_PREFIX."themes_layouts` WHERE `layout`=?", array( $pToLayout )); // get requested layout $team = defined('ROLE_MODEL') ? 'roles' : 'groups'; - $layout = $this->mDb->getAll( " + if( $layout = $this->mDb->getAll( " SELECT `title`, `layout_area`, `module_rows`, `module_rsrc`, `params`, `cache_time`, `$team`, `pos` - FROM `".BIT_DB_PREFIX."themes_layouts` WHERE `layout`=?", array( $pFromLayout )); - foreach( $layout as $module ) { - $module['layout'] = $pToLayout; - $this->storeModule( $module ); + FROM `".BIT_DB_PREFIX."themes_layouts` WHERE `layout`=?", array( $pFromLayout )) ) { + foreach( $layout as $module ) { + $module['layout'] = $pToLayout; + $this->storeModule( $module ); + } } } return TRUE; |
