Index: trunk/kernel/include/theme.php =================================================================== diff -u -r1066 -r1566 --- trunk/kernel/include/theme.php (.../theme.php) (revision 1066) +++ trunk/kernel/include/theme.php (.../theme.php) (revision 1566) @@ -616,12 +616,12 @@ return $this->Query_Item($sql); } - function AddTheme($Name,$Description,$Enabled,$Primary,$CacheTimeout=3600) + function AddTheme($Name,$Description,$Enabled,$Primary,$CacheTimeout=3600,$StylesheetId=1) { $t = new clsTheme(); $t->tablename = $this->SourceTable; - $t->Set(array("Name","Description","Enabled","PrimaryTheme","CacheTimeout"), - array($Name,$Description,$Enabled,$Primary,$CacheTimeout)); + $t->Set(array("Name","Description","Enabled","PrimaryTheme","CacheTimeout",'StylesheetId'), + array($Name,$Description,$Enabled,$Primary,$CacheTimeout,$StylesheetId)); $t->Create(); $t->Files->ThemeId=$t->Get("ThemeId"); if($Primary==1) @@ -632,7 +632,7 @@ return $t; } - function EditTheme($ThemeId,$Name,$Description,$Enabled,$Primary, $CacheTimeout) + function EditTheme($ThemeId,$Name,$Description,$Enabled,$Primary, $CacheTimeout, $StylesheetId) { $t = $this->GetItem($ThemeId); $oldName = $t->Get("Name"); @@ -642,8 +642,8 @@ if(!rename($dir.'/'.$oldName,$dir.'/'.$Name)) $Name=$oldName; } - $t->Set(array("Name","Description","Enabled","PrimaryTheme","CacheTimeout"), - array($Name, $Description, $Enabled, $Primary, $CacheTimeout)); + $t->Set(array("Name","Description","Enabled","PrimaryTheme","CacheTimeout", 'StylesheetId'), + array($Name, $Description, $Enabled, $Primary, $CacheTimeout,$StylesheetId)); $t->Dirty(); $t->Update(); if($Primary==1)