1
1
<?php if (!defined ('APPLICATION ' )) exit ();
2
2
3
- $ Database = Gdn::database ();
4
- $ SQL = $ Database ->sql ();
3
+ if (c ('Garden.Installed ' )) {
4
+ $ Database = Gdn::database ();
5
+ $ SQL = $ Database ->sql ();
5
6
6
- // use Vanilla\Web\CacheControlMiddleware;
7
+ // Logging
8
+ // saveToConfig('DebugAssets', true);
9
+ // saveToConfig('Debug', true);
7
10
8
- if (c ('Garden.Installed ' )) {
9
11
//Disable plugins
10
12
saveToConfig ('EnabledPlugins.stubcontent ' , false );
11
13
26
28
saveToConfig ('Garden.ThemeOptions.Options.panelToLeft ' ,true );
27
29
28
30
// Add settings for the Topcoder plugin
29
- saveToConfig ('Plugins.Topcoder.BaseApiURL ' , 'https://api.topcoder-dev.com ' );
30
- saveToConfig ('Plugins.Topcoder.MemberApiURI ' , '/v3/members ' );
31
- saveToConfig ('Plugins.Topcoder.MemberProfileURL ' , 'https://www.topcoder.com/members ' );
31
+ if (c ('Plugins.Topcoder.BaseApiURL ' ) === false ) {
32
+ saveToConfig ('Plugins.Topcoder.BaseApiURL ' , 'https://api.topcoder-dev.com ' );
33
+ saveToConfig ('Plugins.Topcoder.MemberApiURI ' , '/v3/members ' );
34
+ saveToConfig ('Plugins.Topcoder.MemberProfileURL ' , 'https://www.topcoder.com/members ' );
35
+ }
32
36
33
37
// Add settings for the Editor plugin
34
- saveToConfig ('Plugins.editor.ForceWysiwyg ' , false );
38
+ if (c ('Plugins.editor.ForceWysiwyg ' ) === false ) {
39
+ saveToConfig ('Plugins.editor.ForceWysiwyg ' , false );
40
+ }
35
41
36
42
// Add settings for the Syntax Prettifier plugin
37
- saveToConfig ('Plugins.GooglePrettify.LineNumbers ' , '' );
38
- saveToConfig ('Plugins.GooglePrettify.NoCssFile ' , '' );
39
- saveToConfig ('Plugins.GooglePrettify.UseTabby ' , '' );
40
- saveToConfig ('Plugins.GooglePrettify.Language ' ,'' );
43
+ if (c ('Plugins.GooglePrettify.LineNumbers ' ) === false ) {
44
+ saveToConfig ('Plugins.GooglePrettify.LineNumbers ' , '' );
45
+ saveToConfig ('Plugins.GooglePrettify.NoCssFile ' , '' );
46
+ saveToConfig ('Plugins.GooglePrettify.UseTabby ' , '' );
47
+ saveToConfig ('Plugins.GooglePrettify.Language ' , '' );
48
+ }
41
49
42
50
//Add settings for the OAuth 2 SSO plugin
43
51
if ($ SQL ->getWhere ('UserAuthenticationProvider ' , ['AuthenticationKey ' => 'oauth2 ' ])->numRows () == 0 ) {
55
63
'IsDefault ' => 1
56
64
]);
57
65
}
58
- }
59
-
60
-
66
+ }
0 commit comments