afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-03-06 05:22 am

[dw-free] Temporarily disable schools system

[commit: http://hg.dwscoalition.org/dw-free/rev/6f47b1016301]

http://bugs.dwscoalition.org/show_bug.cgi?id=354

Don't display schools on profile if schools is disabled.

Patch by [staff profile] denise.

Files modified:
  • etc/config.pl
  • htdocs/manage/profile/index.bml
--------------------------------------------------------------------------------
diff -r 1bc1377326ca -r 6f47b1016301 etc/config.pl
--- a/etc/config.pl	Fri Mar 06 05:04:21 2009 +0000
+++ b/etc/config.pl	Fri Mar 06 05:19:36 2009 +0000
@@ -211,6 +211,7 @@
                  'interests-findsim' => 0,
                  memories => 0,
                  opt_findbyemail => 1,
+                 schools => 1,
                  'show-talkleft' => 0,
                  'stats-recentupdates' => 0,
                  'stats-newjournals' => 0,
diff -r 1bc1377326ca -r 6f47b1016301 htdocs/manage/profile/index.bml
--- a/htdocs/manage/profile/index.bml	Fri Mar 06 05:04:21 2009 +0000
+++ b/htdocs/manage/profile/index.bml	Fri Mar 06 05:19:36 2009 +0000
@@ -208,15 +208,18 @@ body<=
         $ret .= "</td></tr>\n";
 
         # schools
-        $ret .= "<tr><td class='field_name'>$ML{'.fn.schools'}</td><td>";
+        unless ( $LJ::DISABLED{schools} ) {
+            $ret .= "<tr><td class='field_name'>$ML{'.fn.schools'}</td><td>";
 
-        $ret .= "$ML{'.schools'}:  ";
-        $ret .= LJ::html_select({ 'name' => 'opt_showschools',
-                                  'selected' => $u->{'opt_showschools'} },
-                                "Y" => BML::ml(".security.visibility.everybody"),
-                                "F" => BML::ml(".security.visibility.friends"),
-                                "N"  => BML::ml(".security.visibility.nobody") );
-        $ret .= " &nbsp; <a href='$LJ::SITEROOT/schools/manage.bml$getextra'>$ML{'.schools.manage'}</a></td></tr>\n";
+            $ret .= "$ML{'.schools'}:  ";
+            $ret .= LJ::html_select({ name => 'opt_showschools',
+                                    selected => $u->{opt_showschools} },
+                                    Y => BML::ml(".security.visibility.everybody"),
+                                    F => BML::ml(".security.visibility.friends"),
+                                    N => BML::ml(".security.visibility.nobody") );
+            $ret .= " &nbsp; <a href='$LJ::SITEROOT/schools/manage.bml$getextra'>$ML{'.schools.manage'}</a></td></tr>\n";
+        }
+
         $ret .= "</table>\n";
 
         ## COMMUNITY THEME
--------------------------------------------------------------------------------