# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/lib/outputlib.php
--- moodle/lib/outputlib.php Base (1.139)
+++ moodle/lib/outputlib.php Locally Modified (Based On 1.139)
@@ -324,6 +324,13 @@
     public $enable_dock = false;
 
     /**
+     * If set to true then this theme will not be shown in the theme selector unless
+     * theme designer mode is turned on.
+     * @var bool
+     */
+    public $hidefromselector = false;
+
+    /**
      * Instance of the renderer_factory implementation
      * we are using. Implementation detail.
      * @var renderer_factory
@@ -400,7 +407,7 @@
 
         $configurable = array('parents', 'sheets', 'parents_exclude_sheets', 'plugins_exclude_sheets', 'javascripts', 'javascripts_footer',
                               'parents_exclude_javascripts', 'layouts', 'resource_mp3player_colors', 'enable_dock',
-                              'filter_mediaplugin_colors', 'rendererfactory', 'csspostprocess', 'editor_sheets', 'rarrow', 'larrow');
+                              'filter_mediaplugin_colors', 'rendererfactory', 'csspostprocess', 'editor_sheets', 'rarrow', 'larrow', 'hidefromselector');
 
         foreach ($config as $key=>$value) {
             if (in_array($key, $configurable)) {
Index: moodle/theme/base/config.php
--- moodle/theme/base/config.php Base (1.12)
+++ moodle/theme/base/config.php Locally Modified (Based On 1.12)
@@ -141,6 +141,10 @@
     ),
 );
 
+// We don't want the base theme to be shown on the theme selection screen, by setting
+// this to true it will only be shown if theme designer mode is switched on.
+$THEME->hidefromselector = true;
+
 /** List of javascript files that need to included on each page */
 $THEME->javascripts = array();
 $THEME->javascripts_footer = array();
Index: moodle/theme/index.php
--- moodle/theme/index.php Base (1.61)
+++ moodle/theme/index.php Locally Modified (Based On 1.61)
@@ -71,11 +71,6 @@
 
 foreach ($themes as $themename => $themedir) {
     
-    // Skip the base theme unless we are in theme designer mode (they might want to look at it)
-    if (!$CFG->themedesignermode && $themename == 'base') {
-        continue;
-    }
-
     // Load the theme config.
     try {
         $theme = theme_config::load($themename);
@@ -87,6 +82,11 @@
         //obsoleted or broken theme, just skip for now
         continue;
     }
+    if (!$CFG->themedesignermode && $theme->hidefromselector) {
+        // The theme doesn't want to be shown in the theme selector and as theme
+        // designer mode is switched off we will respect that decision.
+        continue;
+    }
 
     // Build the table row, and also a list of items to go in the second cell.
     $row = array();
