[dw-free] proposed new subdirectory: cgi-bin/LJ/Global
[commit: http://hg.dwscoalition.org/dw-free/rev/451c5db8e7ac]
http://bugs.dwscoalition.org/show_bug.cgi?id=3974
Move LJ/Constants.pm to LJ/Global/Constants.pm. Just changes file location;
no package changes.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3974
Move LJ/Constants.pm to LJ/Global/Constants.pm. Just changes file location;
no package changes.
Patch by
Files modified:
- cgi-bin/DW/Controller/Search/Interests.pm
- cgi-bin/DW/Setting/AdultContentReason.pm
- cgi-bin/DW/Setting/ExcludeOwnStats.pm
- cgi-bin/DW/Setting/GoogleAnalytics.pm
- cgi-bin/DW/Setting/ProfileEmail.pm
- cgi-bin/DW/User/Edges/WatchTrust.pm
- cgi-bin/DW/VirtualGift.pm
- cgi-bin/LJ/Constants.pm
- cgi-bin/LJ/Global/Constants.pm
- cgi-bin/LJ/Keywords.pm
- cgi-bin/LJ/Setting/Name.pm
- cgi-bin/LJ/Tags.pm
- cgi-bin/LJ/Talk.pm
- cgi-bin/LJ/User.pm
- cgi-bin/LJ/Userpic.pm
- cgi-bin/LJ/Widget/CreateAccountProfile.pm
- cgi-bin/ljlib.pl
- cgi-bin/ljprotocol.pl
--------------------------------------------------------------------------------
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/DW/Controller/Search/Interests.pm
--- a/cgi-bin/DW/Controller/Search/Interests.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/DW/Controller/Search/Interests.pm Tue Oct 18 19:08:17 2011 +0800
@@ -22,7 +22,7 @@
use DW::Routing;
use DW::Template;
use DW::Controller;
-use LJ::Constants;
+use LJ::Global::Constants;
DW::Routing->register_string( '/interests', \&interest_handler, app => 1 );
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/DW/Setting/AdultContentReason.pm
--- a/cgi-bin/DW/Setting/AdultContentReason.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/DW/Setting/AdultContentReason.pm Tue Oct 18 19:08:17 2011 +0800
@@ -2,7 +2,7 @@
use base 'LJ::Setting';
use strict;
use warnings;
-use LJ::Constants;
+use LJ::Global::Constants;
sub should_render {
my ( $class, $u ) = @_;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/DW/Setting/ExcludeOwnStats.pm
--- a/cgi-bin/DW/Setting/ExcludeOwnStats.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/DW/Setting/ExcludeOwnStats.pm Tue Oct 18 19:08:17 2011 +0800
@@ -17,7 +17,7 @@
use base 'LJ::Setting';
use strict;
use warnings;
-use LJ::Constants;
+use LJ::Global::Constants;
sub should_render {
my ( $class, $u ) = @_;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/DW/Setting/GoogleAnalytics.pm
--- a/cgi-bin/DW/Setting/GoogleAnalytics.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/DW/Setting/GoogleAnalytics.pm Tue Oct 18 19:08:17 2011 +0800
@@ -17,7 +17,7 @@
use base 'LJ::Setting';
use strict;
use warnings;
-use LJ::Constants;
+use LJ::Global::Constants;
sub should_render {
my ( $class, $u ) = @_;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/DW/Setting/ProfileEmail.pm
--- a/cgi-bin/DW/Setting/ProfileEmail.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/DW/Setting/ProfileEmail.pm Tue Oct 18 19:08:17 2011 +0800
@@ -18,7 +18,7 @@
use base 'LJ::Setting';
use strict;
use warnings;
-use LJ::Constants;
+use LJ::Global::Constants;
sub should_render {
my ( $class, $u ) = @_;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/DW/User/Edges/WatchTrust.pm
--- a/cgi-bin/DW/User/Edges/WatchTrust.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/DW/User/Edges/WatchTrust.pm Tue Oct 18 19:08:17 2011 +0800
@@ -20,7 +20,7 @@
use strict;
use Carp qw/ confess /;
-use LJ::Constants;
+use LJ::Global::Constants;
use DW::User::Edges;
use DW::User::Edges::WatchTrust::Loader;
use DW::User::Edges::WatchTrust::UserHelper;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/DW/VirtualGift.pm
--- a/cgi-bin/DW/VirtualGift.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/DW/VirtualGift.pm Tue Oct 18 19:08:17 2011 +0800
@@ -32,7 +32,7 @@
# end MemCacheable methods ###############################
use Digest::MD5 qw/ md5_hex /;
-use LJ::Constants;
+use LJ::Global::Constants;
use LJ::Event::VgiftApproved;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/LJ/Constants.pm
--- a/cgi-bin/LJ/Constants.pm Tue Oct 18 18:56:44 2011 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-# 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.
-
-# LJ::Constants module, but actually loads everything into package
-# "LJ". doesn't export to other modules. for compat, other callers
-# still can do LJ::BMAX_NAME, etc
-
-package LJ;
-use strict;
-
-use constant ENDOFTIME => 2147483647;
-$LJ::EndOfTime = 2147483647; # for string interpolation
-
-use constant MAX_32BIT_UNSIGNED => 4294967295;
-$LJ::MAX_32BIT_UNSIGNED = 4294967295;
-
-use constant MAX_32BIT_SIGNED => 2147483647;
-$LJ::MAX_32BIT_SIGNED = 2147483647;
-
-# width constants. BMAX_ constants are restrictions on byte width,
-# CMAX_ on character width (character means byte unless $LJ::UNICODE,
-# in which case it means a UTF-8 character).
-
-use constant BMAX_SUBJECT => 255; # *_SUBJECT for journal events, not comments
-use constant CMAX_SUBJECT => 100;
-use constant BMAX_COMMENT => 65535;
-use constant CMAX_COMMENT => 16000;
-use constant BMAX_MEMORY => 150;
-use constant CMAX_MEMORY => 80;
-use constant BMAX_NAME => 100;
-use constant CMAX_NAME => 50;
-use constant BMAX_KEYWORD => 80;
-use constant CMAX_KEYWORD => 40;
-use constant BMAX_PROP => 255; # logprop[2]/talkprop[2]/userproplite (not userprop)
-use constant CMAX_PROP => 100;
-use constant BMAX_GRPNAME => 90;
-use constant CMAX_GRPNAME => 40;
-use constant BMAX_BIO => 65535;
-use constant CMAX_BIO => 65535;
-use constant BMAX_EVENT => 450000;
-use constant CMAX_EVENT => 300000;
-use constant BMAX_SITEKEYWORD => 100;
-use constant CMAX_SITEKEYWORD => 50;
-use constant BMAX_UPIC_COMMENT => 255;
-use constant CMAX_UPIC_COMMENT => 120;
-use constant BMAX_UPIC_DESCRIPTION => 255;
-use constant CMAX_UPIC_DESCRIPTION => 120;
-
-# user.dversion values:
-# 0: unclustered (unsupported)
-# 1: clustered, not pics (unsupported)
-# 2: clustered
-# 3: weekuserusage populated (Note: this table's now gone)
-# 4: userproplite2 clustered, and cldversion on userproplist table
-# 5: overrides clustered, and style clustered
-# 6: clustered memories, friend groups, and keywords (for memories)
-# 7: clustered userpics, keyword limiting, and comment support
-# 8: clustered polls
-# 9: userpicmap3, with mapid
-#
-# Dreamwidth installations should ALL be dversion >= 8. We do not support anything
-# else and are ripping out code to support all previous dversions.
-#
-use constant MAX_DVERSION => 9;
-$LJ::MAX_DVERSION = MAX_DVERSION;
-
-1;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/LJ/Global/Constants.pm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cgi-bin/LJ/Global/Constants.pm Tue Oct 18 19:08:17 2011 +0800
@@ -0,0 +1,77 @@
+# 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.
+
+# LJ::Constants module, but actually loads everything into package
+# "LJ". doesn't export to other modules. for compat, other callers
+# still can do LJ::BMAX_NAME, etc
+
+package LJ;
+use strict;
+
+use constant ENDOFTIME => 2147483647;
+$LJ::EndOfTime = 2147483647; # for string interpolation
+
+use constant MAX_32BIT_UNSIGNED => 4294967295;
+$LJ::MAX_32BIT_UNSIGNED = 4294967295;
+
+use constant MAX_32BIT_SIGNED => 2147483647;
+$LJ::MAX_32BIT_SIGNED = 2147483647;
+
+# width constants. BMAX_ constants are restrictions on byte width,
+# CMAX_ on character width (character means byte unless $LJ::UNICODE,
+# in which case it means a UTF-8 character).
+
+use constant BMAX_SUBJECT => 255; # *_SUBJECT for journal events, not comments
+use constant CMAX_SUBJECT => 100;
+use constant BMAX_COMMENT => 65535;
+use constant CMAX_COMMENT => 16000;
+use constant BMAX_MEMORY => 150;
+use constant CMAX_MEMORY => 80;
+use constant BMAX_NAME => 100;
+use constant CMAX_NAME => 50;
+use constant BMAX_KEYWORD => 80;
+use constant CMAX_KEYWORD => 40;
+use constant BMAX_PROP => 255; # logprop[2]/talkprop[2]/userproplite (not userprop)
+use constant CMAX_PROP => 100;
+use constant BMAX_GRPNAME => 90;
+use constant CMAX_GRPNAME => 40;
+use constant BMAX_BIO => 65535;
+use constant CMAX_BIO => 65535;
+use constant BMAX_EVENT => 450000;
+use constant CMAX_EVENT => 300000;
+use constant BMAX_SITEKEYWORD => 100;
+use constant CMAX_SITEKEYWORD => 50;
+use constant BMAX_UPIC_COMMENT => 255;
+use constant CMAX_UPIC_COMMENT => 120;
+use constant BMAX_UPIC_DESCRIPTION => 255;
+use constant CMAX_UPIC_DESCRIPTION => 120;
+
+# user.dversion values:
+# 0: unclustered (unsupported)
+# 1: clustered, not pics (unsupported)
+# 2: clustered
+# 3: weekuserusage populated (Note: this table's now gone)
+# 4: userproplite2 clustered, and cldversion on userproplist table
+# 5: overrides clustered, and style clustered
+# 6: clustered memories, friend groups, and keywords (for memories)
+# 7: clustered userpics, keyword limiting, and comment support
+# 8: clustered polls
+# 9: userpicmap3, with mapid
+#
+# Dreamwidth installations should ALL be dversion >= 8. We do not support anything
+# else and are ripping out code to support all previous dversions.
+#
+use constant MAX_DVERSION => 9;
+$LJ::MAX_DVERSION = MAX_DVERSION;
+
+1;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/LJ/Keywords.pm
--- a/cgi-bin/LJ/Keywords.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/LJ/Keywords.pm Tue Oct 18 19:08:17 2011 +0800
@@ -12,7 +12,7 @@
# part of this distribution.
use strict;
-use LJ::Constants;
+use LJ::Global::Constants;
package LJ;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/LJ/Setting/Name.pm
--- a/cgi-bin/LJ/Setting/Name.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/LJ/Setting/Name.pm Tue Oct 18 19:08:17 2011 +0800
@@ -15,7 +15,7 @@
use base 'LJ::Setting::TextSetting';
use strict;
use warnings;
-use LJ::Constants;
+use LJ::Global::Constants;
sub current_value {
my ($class, $u) = @_;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/LJ/Tags.pm
--- a/cgi-bin/LJ/Tags.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/LJ/Tags.pm Tue Oct 18 19:08:17 2011 +0800
@@ -14,7 +14,7 @@
package LJ::Tags;
use strict;
-use LJ::Constants;
+use LJ::Global::Constants;
use LJ::Lang;
# <LJFUNC>
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/LJ/Talk.pm
--- a/cgi-bin/LJ/Talk.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/LJ/Talk.pm Tue Oct 18 19:08:17 2011 +0800
@@ -17,7 +17,7 @@
use MIME::Words;
use Carp qw(croak);
-use LJ::Constants;
+use LJ::Global::Constants;
use LJ::Event::JournalNewComment;
use LJ::Event::JournalNewComment::Edited;
use LJ::Comment;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/LJ/User.pm Tue Oct 18 19:08:17 2011 +0800
@@ -34,7 +34,7 @@
use Storable;
use lib "$LJ::HOME/cgi-bin";
use List::Util ();
-use LJ::Constants;
+use LJ::Global::Constants;
use LJ::MemCache;
use LJ::Session;
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/LJ/Userpic.pm
--- a/cgi-bin/LJ/Userpic.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/LJ/Userpic.pm Tue Oct 18 19:08:17 2011 +0800
@@ -16,7 +16,7 @@
use Carp qw(croak);
use Digest::MD5;
use LJ::Event::NewUserpic;
-use LJ::Constants;
+use LJ::Global::Constants;
use Storable;
##
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/LJ/Widget/CreateAccountProfile.pm
--- a/cgi-bin/LJ/Widget/CreateAccountProfile.pm Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/LJ/Widget/CreateAccountProfile.pm Tue Oct 18 19:08:17 2011 +0800
@@ -16,7 +16,7 @@
use strict;
use base qw(LJ::Widget);
use Carp qw(croak);
-use LJ::Constants;
+use LJ::Global::Constants;
sub need_res { qw( stc/widgets/createaccountprofile.css stc/simple-form.css js/widgets/createaccountprofile.js ) }
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/ljlib.pl
--- a/cgi-bin/ljlib.pl Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/ljlib.pl Tue Oct 18 19:08:17 2011 +0800
@@ -62,7 +62,7 @@
use LJ::Error;
use LJ::User; # has a bunch of pkg LJ, non-OO methods at bottom
use LJ::Entry; # has a bunch of pkg LJ, non-OO methods at bottom
-use LJ::Constants;
+use LJ::Global::Constants; # formerly LJ::Constants
use Time::Local ();
use Storable ();
use Compress::Zlib ();
diff -r ee20fa5fbfd0 -r 451c5db8e7ac cgi-bin/ljprotocol.pl
--- a/cgi-bin/ljprotocol.pl Tue Oct 18 18:56:44 2011 +0800
+++ b/cgi-bin/ljprotocol.pl Tue Oct 18 19:08:17 2011 +0800
@@ -17,7 +17,7 @@
use strict;
no warnings 'uninitialized';
-use LJ::Constants;
+use LJ::Global::Constants;
use LJ::Console;
use LJ::Event::JournalNewEntry;
use LJ::Event::AddedToCircle;
--------------------------------------------------------------------------------
