Duplicating styles will disable the new style
authorAlexander Ebert <ebert@woltlab.com>
Fri, 12 Oct 2012 02:47:47 +0000 (04:47 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 12 Oct 2012 02:47:47 +0000 (04:47 +0200)
wcfsetup/install/files/lib/data/style/StyleAction.class.php

index 90555c5c5e4ecb5b9b1f4c5b773ef441725740b4..c3b9baff01db00ae8e72ed5d1541e12972ead400 100644 (file)
@@ -382,9 +382,10 @@ class StyleAction extends AbstractDatabaseObjectAction {
                
                // create the new style
                $newStyle = StyleEditor::create(array(
-                       'packageID' => $style->packageID,
+                       'packageID' => PACKAGE_ID,
                        'styleName' => $styleName,
                        'templateGroupID' => $style->templateGroupID,
+                       'disabled' => 1, // newly created styles are disabled by default
                        'styleDescription' => $style->styleDescription,
                        'styleVersion' => $style->styleVersion,
                        'styleDate' => $style->styleDate,