[Fusionforge-commits] FusionForge branch master updated. 6641cbe9eee747b1342d377db1c765aed35aa557

Marc-Etienne VARGENAU vargenau at fusionforge.org
Mon Jun 23 14:10:46 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  6641cbe9eee747b1342d377db1c765aed35aa557 (commit)
       via  8ade4786bf277f37a0a5510a03ede39ff94e68c8 (commit)
      from  655ced420bffdaba5ff84301c3722a2ee406d433 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6641cbe9eee747b1342d377db1c765aed35aa557
Author: Marc-Etienne Vargenau <Marc-Etienne.Vargenau at alcatel-lucent.com>
Date:   Mon Jun 23 14:10:27 2014 +0200

    wiki: remove unused code

diff --git a/src/plugins/wiki/www/themes/fusionforge/templates/userprefs.tmpl b/src/plugins/wiki/www/themes/fusionforge/templates/userprefs.tmpl
index 5c8639f..33d084c 100644
--- a/src/plugins/wiki/www/themes/fusionforge/templates/userprefs.tmpl
+++ b/src/plugins/wiki/www/themes/fusionforge/templates/userprefs.tmpl
@@ -115,64 +115,6 @@ $DoubleClickCB = HTML::input(array('type' => 'checkbox',
                                   'name' => 'pref[doubleClickEdit]',
                                   'value' => '1',
                                   'checked' => (bool) $pref->get('doubleClickEdit')));
-if (!function_exists('selectedOption')) {
-  function selectedOption ($value, $label = false) {
-    return HTML::option(array('value' => $value,'selected'=>"selected"), ($label ? $label : $value) . "\n");
-  }
-  function unselectedOption ($value, $label = false) {
-    return HTML::option(array('value' => $value), ($label ? $label : $value) . "\n");
-  }
-}
-
-$SelectThemes = ''; $SelectLanguages = '';
-$SelectThemesDesc = ''; $SelectLanguagesDesc = '';
-if ( $isForm ) {
-    $SelectOptions = HTML();
-    if (!empty($available_themes) and is_array($available_themes)) {
-        if (!$pref->get('theme') or $pref->get('theme') == THEME)
-            $SelectOptions->pushContent(selectedOption("",_("<system theme>")));
-        else
-            $SelectOptions->pushContent(unselectedOption("",_("<system theme>")));
-        foreach ($available_themes as $theme) {
-            if ($theme == $pref->get('theme') and $theme != THEME)
-                $SelectOptions->pushContent(selectedOption($theme));
-            else
-                $SelectOptions->pushContent(unselectedOption($theme));
-        }
-        $SelectThemes = HTML::select(array('name' => "pref[theme]",'id' => 'theme'),
-                                     $SelectOptions);
-        $SelectThemesDesc = _("Personal theme:");
-    }
-
-    $SelectOptions = HTML();
-    if (!empty($available_languages) and is_array($available_languages)) {
-        if (!$pref->get('lang') or $pref->get('lang') == DEFAULT_LANGUAGE)
-            $SelectOptions->pushContent(selectedOption("",_("<system language>")));
-        else
-            $SelectOptions->pushContent(unselectedOption("",_("<system language>")));
-        foreach ($available_languages as $lang) {
-            if ($lang == $pref->get('lang') and $lang != DEFAULT_LANGUAGE)
-                $SelectOptions->pushContent(selectedOption($lang));
-            else
-                $SelectOptions->pushContent(unselectedOption($lang));
-        }
-        $SelectLanguages = HTML::select(array('name' => "pref[lang]",'id' => 'lang'),
-                                        $SelectOptions);
-        $SelectLanguagesDesc = _("Personal language:");
-    } else {
-        if ($SelectThemes == '') {
-            $appearance = false;
-            $SelectThemesDesc = '';
-            $SelectLanguagesDesc = '';
-        }
-    }
-} else {
-    $SelectThemesDesc = _("Personal theme:");
-    $SelectLanguagesDesc = _("Personal language:");
-    $SelectThemes = $pref->get('theme');
-    $SelectLanguages = $pref->get('lang');
-}
-
 ?>
 <?php echo $errmsg ?>
 

commit 8ade4786bf277f37a0a5510a03ede39ff94e68c8
Author: Marc-Etienne Vargenau <Marc-Etienne.Vargenau at alcatel-lucent.com>
Date:   Mon Jun 23 14:09:30 2014 +0200

    wiki: fusionforge cannot be selected as standalone theme

diff --git a/src/plugins/wiki/www/themes/default/templates/userprefs.tmpl b/src/plugins/wiki/www/themes/default/templates/userprefs.tmpl
index 0cd5ead..008c896 100644
--- a/src/plugins/wiki/www/themes/default/templates/userprefs.tmpl
+++ b/src/plugins/wiki/www/themes/default/templates/userprefs.tmpl
@@ -62,45 +62,52 @@ if (!function_exists('selectedOption')) {
 
 $SelectThemes = ''; $SelectLanguages = '';
 $SelectThemesDesc = ''; $SelectLanguagesDesc = '';
-if ( $isForm ) {
+if ($isForm) {
     $SelectOptions = HTML();
     if (!empty($available_themes) and is_array($available_themes)) {
-    if (!$pref->get('theme') or $pref->get('theme') == THEME)
-        $SelectOptions->pushContent(selectedOption("",_("<system theme>")));
-    else
-        $SelectOptions->pushContent(unselectedOption("",_("<system theme>")));
-    foreach ($available_themes as $theme) {
-        if ($theme == $pref->get('theme') and $theme != THEME)
-        $SelectOptions->pushContent(selectedOption($theme));
-        else
-        $SelectOptions->pushContent(unselectedOption($theme));
-    }
-    $SelectThemes = HTML::select(array('name' => "pref[theme]",'id' => 'theme'),
-                     $SelectOptions);
-    $SelectThemesDesc = _("Personal theme:");
+        if (!$pref->get('theme') or $pref->get('theme') == THEME) {
+            $SelectOptions->pushContent(selectedOption("",_("<system theme>")));
+        } else {
+            $SelectOptions->pushContent(unselectedOption("",_("<system theme>")));
+        }
+        foreach ($available_themes as $theme) {
+            // 'fusionforge' cannot be selected as standalone theme
+            if ($theme != 'fusionforge') {
+                if ($theme == $pref->get('theme') and $theme != THEME) {
+                    $SelectOptions->pushContent(selectedOption($theme));
+                } else {
+                    $SelectOptions->pushContent(unselectedOption($theme));
+                }
+            }
+        }
+        $SelectThemes = HTML::select(array('name' => "pref[theme]",'id' => 'theme'),
+                         $SelectOptions);
+        $SelectThemesDesc = _("Personal theme:");
     }
 
     $SelectOptions = HTML();
     if (!empty($available_languages) and is_array($available_languages)) {
-    if (!$pref->get('lang') or $pref->get('lang') == DEFAULT_LANGUAGE)
-        $SelectOptions->pushContent(selectedOption("",_("<system language>")));
-    else
-        $SelectOptions->pushContent(unselectedOption("",_("<system language>")));
-    foreach ($available_languages as $lang) {
-        if ($lang == $pref->get('lang') and $lang != DEFAULT_LANGUAGE)
-        $SelectOptions->pushContent(selectedOption($lang));
-        else
-        $SelectOptions->pushContent(unselectedOption($lang));
-    }
-    $SelectLanguages = HTML::select(array('name' => "pref[lang]",'id' => 'lang'),
-                    $SelectOptions);
-    $SelectLanguagesDesc = _("Personal language:");
+        if (!$pref->get('lang') or $pref->get('lang') == DEFAULT_LANGUAGE) {
+            $SelectOptions->pushContent(selectedOption("",_("<system language>")));
+        } else {
+            $SelectOptions->pushContent(unselectedOption("",_("<system language>")));
+        }
+        foreach ($available_languages as $lang) {
+            if ($lang == $pref->get('lang') and $lang != DEFAULT_LANGUAGE) {
+                $SelectOptions->pushContent(selectedOption($lang));
+            } else {
+                $SelectOptions->pushContent(unselectedOption($lang));
+            }
+        }
+        $SelectLanguages = HTML::select(array('name' => "pref[lang]",'id' => 'lang'),
+                        $SelectOptions);
+        $SelectLanguagesDesc = _("Personal language:");
     } else {
-    if ($SelectThemes == '') {
-        $appearance = false;
-        $SelectThemesDesc = '';
-        $SelectLanguagesDesc = '';
-    }
+        if ($SelectThemes == '') {
+            $appearance = false;
+            $SelectThemesDesc = '';
+            $SelectLanguagesDesc = '';
+        }
     }
 } else {
     $SelectThemesDesc = _("Personal theme:");

-----------------------------------------------------------------------

Summary of changes:
 .../www/themes/default/templates/userprefs.tmpl    |   71 +++++++++++---------
 .../themes/fusionforge/templates/userprefs.tmpl    |   58 ----------------
 2 files changed, 39 insertions(+), 90 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list