fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-09-12 07:44 am

[dw-free] remove htdocs/settings/index.bml

[commit: http://hg.dwscoalition.org/dw-free/rev/9e56251b1394]

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

Remove settings tagcloud; they're more organized in /manage/settings now.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/redirect.dat
  • htdocs/settings/index.bml
  • htdocs/settings/index.bml.text
--------------------------------------------------------------------------------
diff -r 78e66801c811 -r 9e56251b1394 cgi-bin/redirect.dat
--- a/cgi-bin/redirect.dat	Mon Sep 12 15:42:03 2011 +0800
+++ b/cgi-bin/redirect.dat	Mon Sep 12 15:44:30 2011 +0800
@@ -44,3 +44,7 @@
 /help/                              /support/
 /tos                                /legal/tos
 /tos/                               /legal/tos
+/settings                           /manage/settings
+/settings/                          /manage/settings
+/settings/index                     /manage/settings
+/settings/index.bml                 /manage/settings
diff -r 78e66801c811 -r 9e56251b1394 htdocs/settings/index.bml
--- a/htdocs/settings/index.bml	Mon Sep 12 15:42:03 2011 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-<?_c
-# This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by
-# Dreamwidth Studios, LLC. These files were originally licensed under
-# the terms of the license supplied by Live Journal, Inc, which can
-# currently be found at:
-#
-# http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
-#
-# In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License.
-# A copy of that license can be found in the LICENSE file included as
-# part of this distribution.
-_c?>
-<?_code
-{
-    use strict;
-    use vars qw($title $body %GET %POST);
-
-    BML::decl_params(tag      => qr/^[\w\. ]+$/,
-                     c        => "word",
-                     _default => qr/./);
-
-    my $err = sub {
-        $title = $ML{'Error'};
-        $body = $_[0];
-        return;
-    };
-
-    my $remote = LJ::User->remote
-        or return "<?needlogin?>";
-
-    my $authas = $GET{'authas'} || $remote->user;
-    my $u = LJ::get_authas_user($authas) || $remote;
-
-    my $selminiclass = $GET{c};   # classname without LJ::Setting::
-    my $selclass = $selminiclass ? "LJ::Setting::$selminiclass" : "";
-
-    my @settings = (
-        LJ::ModuleLoader->module_subclasses( "LJ::Setting" ),
-        LJ::ModuleLoader->module_subclasses( "DW::Setting" )
-    );
-
-    my $tag = lc $GET{tag};
-    my %tags = ();
-    my @matches;
-    foreach my $class (@settings) {
-        next if $selclass && $selclass ne $class;
-        eval "use $class; 1; " or next;
-        push @matches, $class if $selclass;
-        my $tagct = 0;
-        foreach my $tag ($class->tags) {
-            push @{$tags{lc $tag} ||= []}, $class;
-            $tagct++;
-        }
-        if ($tagct && $tag && $tag eq "_all") {
-            push @matches, $class;
-        }
-    }
-
-
-    $title = $ML{'.change.settings'};
-    $body = "<center>";
-    $body .= BML::ml('.which.setting', {'link'=>"href='./'"});
-    $body .= "<form method='get'><input name='tag' value='" . LJ::ehtml($GET{tag}) . "' style='text-align: center; font-size: 20pt; font-weight: bold; -moz-border-radius: 10px;' /></form></center>";
-
-    unless ($tag || $selclass) {
-        my %tagmap;
-        while (my ($k, $v) = each %tags) {
-            $tagmap{$k} = {
-                url   => "./?tag=" . LJ::eurl($k),
-                value => scalar(@$v),
-            };
-        }
-        $body .= LJ::tag_cloud(\%tagmap);
-        return;
-    }
-
-    @matches = @{ $tags{$tag} || [] } unless @matches;
-    unless (@matches) {
-        $body .= "<?h1 $ML{'.sorry'} h1?><?p $ML{'.no.options.match'} '$tag'. p?>";
-        return;
-    }
-
-    my $returns;
-    $returns = LJ::Setting::save_all( $u, \%POST, \@matches )
-        if LJ::did_post();
-
-    $body .= "<form method='get' action='./'>\n";
-    $body .= LJ::html_hidden("tag" => $GET{tag}) if $GET{tag};
-    $body .= LJ::html_hidden("c" => $GET{c}) if $GET{c};
-    $body .= LJ::make_authas_select($remote, { 'authas' => $GET{'authas'} });
-    $body .= "</form>\n\n";
-
-    $body .= "<form method='post'>";
-    if ($tag) {
-        $body .= "<?h1 $ML{'.options.tagged'} '$tag': h1?>\n";
-    } else {
-        $body .= "<?h1 " . BML::ml('.the.setting', {selminiclass=>$selminiclass}) . " h1?>\n";
-    }
-    foreach my $class (@matches) {
-        unless (eval "use $class; 1;") {
-            my $del = $class;
-            $del =~ s!::!/!;
-            $del .= ".pm";
-            delete $INC{$del};
-            $body .= $ML{'.failed.to.load'} . "$class: " . LJ::ehtml($@);
-            next;
-        }
-
-        my $html = eval { $class->as_html($u, $returns->{$class}{save_errors}, $returns->{$class}{post_args}) };
-        if ($@) {
-            $body .= "<p>" . LJ::ehtml($@) . "</p>";
-        } else {
-            my $pkgkey = $class->pkgkey;
-            my $color = $returns->{$class}{save_errors} ? "red" : "black";
-            my $miniclass = $class;
-            $miniclass =~ s/^LJ::Setting:://;
-            $body .= "<div id='$pkgkey' style='margin: 0.5em; border: 2px solid $color; padding: 10px;'><div style='float:right'><a href='/settings/?c=$miniclass'>#</a></div>$html</div>";
-        }
-    }
-    $body .= "<input type='submit' value='$ML{'.save'}' />";
-    $body .= "</form>";
-
-    return;
-}
-_code?><?page
-title=><?_code $title _code?>
-body=><?_code  $body _code?>
-page?>
diff -r 78e66801c811 -r 9e56251b1394 htdocs/settings/index.bml.text
--- a/htdocs/settings/index.bml.text	Mon Sep 12 15:42:03 2011 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-;; -*- coding: utf-8 -*-
-.change.settings=Change Settings
-
-.failed.to.load=Failed to load
-
-.no.options.match=No matching options
-
-.options.tagged=Options tagged
-
-.save=Save
-
-.sorry=Sorry.
-
-.the.setting=The '[[selminiclass]]' setting:
-
-.which.setting=Enter the tag for the <a [[link]]>setting</a> you want to change.
-
--------------------------------------------------------------------------------