changelog_bot (changelog_bot) wrote in changelog,
changelog_bot
changelog_bot
changelog

[ljcom] r9309: OPSC-123 Merge oauth branch to trunk

Committer: aurbanowich
OPSC-123 Merge oauth branch to trunk
* stage 1 : merge trunk to branches/oauth

U   branches/oauth/bin/upgrading/en_LJ.dat
U   branches/oauth/bin/upgrading/proplists-local.dat
U   branches/oauth/bin/upgrading/s2layers/3column/layout.s2
U   branches/oauth/bin/upgrading/s2layers/anovelconundrum/layout.s2
U   branches/oauth/bin/upgrading/s2layers/boxer/layout.s2
U   branches/oauth/bin/upgrading/s2layers/component/layout.s2
U   branches/oauth/bin/upgrading/update-db-local.pl
U   branches/oauth/cgi-bin/LJ/Hooks/Homepage.pm
U   branches/oauth/cgi-bin/LJ/Hooks/SUP.pm
U   branches/oauth/cgi-bin/LJ/Pay/Payment/PayItem/RenameAction.pm
U   branches/oauth/cgi-bin/LJ/Pay/RecBill/Card.pm
U   branches/oauth/cgi-bin/LJ/UserManage.pm
U   branches/oauth/cgi-bin/LJ/Widget/CreditCard.pm
U   branches/oauth/cgi-bin/LJ/Widget/Shop.pm
U   branches/oauth/cgi-bin/LJ/Widget/UpdatesForUser.pm
U   branches/oauth/cgi-bin/LJ/Worker/UserManage/CheckTables.pm
U   branches/oauth/cgi-bin/LJ/Worker/UserManage/PrePurge.pm
U   branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterCommentPurge.pm
U   branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterDelete.pm
U   branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterPostPurge.pm
U   branches/oauth/cgi-bin/bml/scheme/lanzelot.look
U   branches/oauth/htdocs/404-error-local.bml
A   branches/oauth/htdocs/defaultpic.bml
U   branches/oauth/htdocs/error-page.bml
A   branches/oauth/htdocs/img/preloader.gif
A   branches/oauth/htdocs/img/reskining/july2010/
A   branches/oauth/htdocs/img/reskining/reskining-corner.png
U   branches/oauth/htdocs/rename/use.bml.text.local
U   branches/oauth/htdocs/stc/home.css
U   branches/oauth/htdocs/stc/lanzelot/css/modules.css
A   branches/oauth/htdocs/stc/reskining/july2010/
A   branches/oauth/htdocs/stc/reskining/reskining-corner.png
U   branches/oauth/htdocs/stc/shop/ie.css
U   branches/oauth/htdocs/stc/shop/shop.css
U   branches/oauth/htdocs/stc/widgets/extblocks.css
U   branches/oauth/htdocs/stc/widgets/updates-for-user.css
U   branches/oauth/templates/Shop/MainPage.tmpl
U   branches/oauth/templates/Shop/PaidAccount.tmpl
Modified: branches/oauth/bin/upgrading/en_LJ.dat
===================================================================
--- branches/oauth/bin/upgrading/en_LJ.dat	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/bin/upgrading/en_LJ.dat	2010-08-04 08:57:33 UTC (rev 9309)
@@ -4808,6 +4808,8 @@
 
 protocol.not_validated=Your e-mail address has not been validated.  You may continue to use [[sitename]], but if you do not validate your address, you will not have access to all functions of the site.  See the instructions that were mailed to you when you created your journal, or visit [[siteroot]]/support/faqbrowse.bml?faqid=11 for more information.
 
+reskining.july2010=sometext1 <lj user="test"> sometext2 <lj user="test"> sometext3 
+
 schemes.horizon.desc|staleness=1
 schemes.horizon.desc=site default
 
@@ -5349,6 +5351,18 @@
 
 shop.view.promo.paidaccount.text=Get access to all the great features of a paid account.
 
+shop.view.promo.book.title=LiveJournal: The First Decade
+
+shop.view.promo.book.buy=Buy
+
+shop.view.promo.book.desc=A powerful, eclectic collection of stories, artwork, memoirs, and more, created by LiveJournal users over the past ten years.
+
+shop.view.promo.book.note=By LiveJournal Users
+
+shop.view.promo.book.author=Book of Andrew Podshebyakin,
+
+shop.view.promo.book.author-note=past editor of LiveJournal
+
 shop.view.wallet.buy.desc=Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo, qui ratione voluptatem sequi nesciunt, neque porro quisquam est
 
 shop.view.wallet.confirm_xfer=Are you sure you want to proceed? Your LJ Wallet will be billed for {{tokens}} tokens. Attention: this transaction is non-refundable!

Modified: branches/oauth/bin/upgrading/proplists-local.dat
===================================================================
--- branches/oauth/bin/upgrading/proplists-local.dat	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/bin/upgrading/proplists-local.dat	2010-08-04 08:57:33 UTC (rev 9309)
@@ -412,3 +412,22 @@
   des: a boolean value indicating that the user has been warned by email that thet are going to be expunged very shortly
   cldversion: 8
 
+logproplist.origin_url:
+  datatype: char
+  des: URL of entry before copying it for the LJ Times
+  prettyname: URL of origin entry
+
+logproplist.origin_author:
+  datatype: char
+  des: Poster of entry before copying it for the LJ Times
+  prettyname: Poster of origin entry
+
+logproplist.origin_date:
+  datatype: char
+  des: Date (user-setted) of entry before copying it for the LJ Times
+  prettyname: Date of origin entry
+
+logproplist.ljtimes_url:
+  datatype: char
+  des: URL of the copy of this entry in LJ Times
+  prettyname: URL of copy of the entry

Modified: branches/oauth/bin/upgrading/s2layers/3column/layout.s2
===================================================================
--- branches/oauth/bin/upgrading/s2layers/3column/layout.s2	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/bin/upgrading/s2layers/3column/layout.s2	2010-08-04 08:57:33 UTC (rev 9309)
@@ -727,7 +727,7 @@
      if(defined $e.mood_icon) {
         var Image i = $e.mood_icon;
         var string alttext = $e.metadata{"mood"};
-        """<div class="moodpic" style="position: relative;"><img src="$i.url" width="$i.width" height="$i.height" alt="$alttext" title="$alttext" /></div>""";
+        print """<div class="moodpic" style="position: relative;">""" + $i->as_string_ex($i.alttext, "title='$alttext' ") + """</div>""";
      }
 
     $e->print_metadata();    """
@@ -778,7 +778,7 @@
     if(defined $e.mood_icon) {
         var Image i = $e.mood_icon;
         var string alttext = $e.metadata{"mood"};
-        """<div class="moodpic"><img src="$i.url" width="$i.width" height="$i.height" alt="$alttext" title="$alttext" /></div>""";
+        print """<div class="moodpic" style="position: relative;">""" + $i->as_string_ex($i.alttext, "title='$alttext' ") + """</div>""";
     }
 
     $e->print_metadata();

Modified: branches/oauth/bin/upgrading/s2layers/anovelconundrum/layout.s2
===================================================================
--- branches/oauth/bin/upgrading/s2layers/anovelconundrum/layout.s2	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/bin/upgrading/s2layers/anovelconundrum/layout.s2	2010-08-04 08:57:33 UTC (rev 9309)
@@ -711,7 +711,7 @@
             }
             if ($k == "mood" and defined $e.mood_icon) {
                 var Image i = $e.mood_icon;
-                $val = "<img src='$i.url' width='$i.width' height='$i.height' align='middle' alt='$val'> $val";
+                $val = $i->as_string_ex($i.alttext, "align='middle' ") + " " + $val;
             }
             $metadata = """$metadata\n<tr><td align="right"><div class="sc" style="margin-right:1em;">$text:</div></td>
             <td align="left">$val</td></tr>""";

Modified: branches/oauth/bin/upgrading/s2layers/boxer/layout.s2
===================================================================
--- branches/oauth/bin/upgrading/s2layers/boxer/layout.s2	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/bin/upgrading/s2layers/boxer/layout.s2	2010-08-04 08:57:33 UTC (rev 9309)
@@ -882,7 +882,8 @@
                             if ($k == "groups") { $text = $*text_meta_groups; }
                             if ($k == "mood" and defined $e.mood_icon) {
                                 var Image i = $e.mood_icon;
-                                $val = "<img src='$i.url' alt='' width='$i.width' height='$i.height' align='absmiddle' /> $val";
+                                $val = $i->as_string_ex($i.alttext, "align='absmiddle' ") + " " + $val;
+                                
                             }
                             $metadata = $metadata + """<b>$text:</b> $val<br>""";
                         }

Modified: branches/oauth/bin/upgrading/s2layers/component/layout.s2
===================================================================
--- branches/oauth/bin/upgrading/s2layers/component/layout.s2	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/bin/upgrading/s2layers/component/layout.s2	2010-08-04 08:57:33 UTC (rev 9309)
@@ -2174,7 +2174,8 @@
                                       if ($k == "mood" and defined $e.mood_icon)
                                       {
                                           var Image i = $e.mood_icon;
-                                          $val = "<img src='$i.url' width='$i.width' height='$i.height' alt='' /> $val";
+                                          $val = $i->as_string($i.alttext) + " " + $val;
+                                          
                                       }
                                       print safe "<strong>$key:</strong> $val<br />";
                                   }

Modified: branches/oauth/bin/upgrading/update-db-local.pl
===================================================================
--- branches/oauth/bin/upgrading/update-db-local.pl	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/bin/upgrading/update-db-local.pl	2010-08-04 08:57:33 UTC (rev 9309)
@@ -1505,6 +1505,22 @@
 ) TYPE=InnoDB
 EOC
 
+register_tablecreate("featured_photos", <<'EOC');
+CREATE TABLE `featured_photos` (
+  `p_id` int(11) NOT NULL auto_increment,
+  `author` varchar(20) NOT NULL,
+  `title` varchar(250) NOT NULL,
+  `countries` varchar(50) default NULL,
+  `source_post` varchar(250) NOT NULL,
+  `source_img` varchar(250) NOT NULL,
+  `target_img` varchar(200) NOT NULL,
+  `forwhat` varchar(10) NOT NULL,
+  `size` varchar(15) NOT NULL,
+  `is_error` tinyint(4) NOT NULL default '0',
+  PRIMARY KEY  (`p_id`)
+)
+EOC
+
 # *************************************************************
 register_alter(sub {
 

Modified: branches/oauth/cgi-bin/LJ/Hooks/Homepage.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Hooks/Homepage.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Hooks/Homepage.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -140,12 +140,27 @@
 }
 
 
+
+
+## july2010
+sub _is_july2010_reskining_active { 
+    my $params = shift;
+
+    # till 2010-07-22 00:00:00
+    #my $time = time();
+    #return 0 if $time > 1279756800;
+
+    return 1;
+}
+
+
 LJ::register_hook("service_page_reskining", sub {
     my $params = shift || {};
-    if (_is_rainbow2010_reskining_active($params)){
-        LJ::need_res("stc/reskining/rainbow/rainbow2010.css");
-    } elsif (_is_june2010_reskining_active($params)) {
-       LJ::need_res("stc/reskining/june2010/june2010.css");
+    if (_is_july2010_reskining_active($params)) {
+        LJ::need_res("stc/reskining/july2010/july2010.css");
+        my $text = LJ::Lang::ml('reskining.july2010');
+        LJ::CleanHTML::clean(\$text); ## to expand <lj-user> tags 
+        return qq[<dl class="b-reskining-about"><dt></dt><dd>$text</dd></dl>];
     }
 
     return '';

Modified: branches/oauth/cgi-bin/LJ/Hooks/SUP.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Hooks/SUP.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Hooks/SUP.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -373,7 +373,7 @@
         my $cmtobj = LJ::Comment->new($journal, jtalkid => $talkid);
         my $ev     = LJ::Event::JournalNewComment->new($cmtobj);
         my $notification = LJ::NotificationMethod::Email->new($user);
-        $notification->notify($ev);
+        $notification->notify(undef, $ev);
 
         return 1;
     }

Modified: branches/oauth/cgi-bin/LJ/Pay/Payment/PayItem/RenameAction.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Pay/Payment/PayItem/RenameAction.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Pay/Payment/PayItem/RenameAction.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -78,6 +78,11 @@
         return 0;
     }
 
+    if ($source->is_identity) {
+        push @$errs_ref, LJ::Lang::ml('/rename/use.bml.error.cant_rename_identity_account');
+        return 0;
+    }
+
     unless (LJ::canonical_username($dest_name)) {
         push @$errs_ref, LJ::Lang::ml('/rename/use.bml.error.username');
         return 0;

Modified: branches/oauth/cgi-bin/LJ/Pay/RecBill/Card.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Pay/RecBill/Card.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Pay/RecBill/Card.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -137,7 +137,7 @@
     my LJ::Pay::RecBill::Card $self = shift
         or return _err("invalid arguments");
 
-    my $invalid = sub { _err("invalid value for element" => @_) };
+    my $invalid = sub { _err("invalid value for element " => @_) };
 
     # bool-ify
     $self->{pri_flag} = $self->{pri_flag} ? 1 : 0;
@@ -194,10 +194,15 @@
                    length $self->{postal_code} <= 15;
     }
 
-    if (length $self->{email}) {
+    if (length $self->{'email'}) {
+        return $invalid->('email') if length $self->{'email'} > 50;
+
         my @email_errors;
-        LJ::check_email($self->{email}, \@email_errors);
-        return $invalid->('email') if (@email_errors);
+        LJ::check_email($self->{'email'}, \@email_errors);
+        if (@email_errors) {
+            warn "E-mail errors ($self->{'email'}): " . join(", ", @email_errors);
+            return $invalid->('email');
+        }
     }
 
     return 1;

Modified: branches/oauth/cgi-bin/LJ/UserManage.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/UserManage.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/UserManage.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -293,7 +293,8 @@
 
     my @jobs = (
         ['LJ::Worker::UserManage::CheckTables', {
-            'clust' => $u->clusterid,
+            'userid' => $userid,
+            'clust'  => $u->clusterid,
         }],
         ['LJ::Worker::UserManage::PrePurge', {
             'userid' => $userid,
@@ -307,17 +308,22 @@
         }],
     );
     
-    if ($u->is_suspended) {
-        push @jobs, (
+    my ($should_delete_comments, $should_delete_community_posts) = 
+        ($u->is_suspended) ? (1, 1) : split /:/, $u->prop("purge_external_content");
+     
+    if ($should_delete_comments) {
+        push @jobs,
             ['LJ::Worker::UserManage::UserClusterCommentPurge', {
                 'userid'   => $userid,
                 'clusters' => [@LJ::CLUSTERS],
-            }],
+            }];
+    }
+    if ($should_delete_community_posts) {
+        push @jobs,
             ['LJ::Worker::UserManage::UserClusterPostPurge', {
                 'userid'   => $userid,
                 'clusters' => [@LJ::CLUSTERS],
-            }],
-        );
+            }];
     }
 
     push @jobs, (
@@ -346,4 +352,18 @@
     return $class->query_ordered_jobs(\@jobs);
 }
 
+
+sub _exclude_protected_journals_clause {
+
+    my @protected_jorunals_ids;
+    foreach my $journal (keys %LJ::JOURNALS_WITH_PROTECTED_CONTENT) {
+        my $journalu = LJ::load_user($journal);
+        next unless $journalu;
+        push @protected_jorunals_ids, $journalu->{id};
+    }
+    return (@protected_jorunals_ids) 
+        ? 'AND NOT journalid IN (' . join(', ', @protected_jorunals_ids) . ')' 
+        : '';
+}
+ 
 1;

Modified: branches/oauth/cgi-bin/LJ/Widget/CreditCard.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Widget/CreditCard.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Widget/CreditCard.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -219,7 +219,8 @@
                             || ($LJ::IS_DEV_SERVER && LJ::get_remote() && LJ::get_remote()->email_raw),
             class     => 'input_field',
             tabindex  => 12,
-            style     => 'width:225px'
+            style     => 'width:225px',
+            maxlength => 50,
         }
     );
     $ret .= '</dd></dl></li>';

Modified: branches/oauth/cgi-bin/LJ/Widget/Shop.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Widget/Shop.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Widget/Shop.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -518,6 +518,7 @@
 sub extend_vars {
     my ($self, $vars) = @_;
 
+    $vars->{'is_remote_sup'} = LJ::SUP->is_remote_sup;
     $vars->{'errors'} ||= [ map { { 'error' => $_ } } @{$self->errors} ];
     $vars->{'errors_occured'} = $self->errors_occured;
     $vars->{'warnings'} ||= [ map { { 'warning' => $_ } } @{$self->warnings} ];

Modified: branches/oauth/cgi-bin/LJ/Widget/UpdatesForUser.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Widget/UpdatesForUser.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Widget/UpdatesForUser.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -25,47 +25,23 @@
     
     $ret .= "<div class='w-body'>";
     my $inbox = $remote->notification_inbox;
-
-    $ret .= '<dl class="w-list w-list-inbox" ><dt><strong>' . $class->ml('widget.updatesforuser.inbox') . '</strong></dt> ';
-
-    $ret .= "<dd> <a href='$LJ::SITEROOT/inbox/'>" . ($inbox ? $inbox->unread_count : 0) . '</a></dd></dl>';
-
-    my @comments = $remote->get_recent_talkitems(3, memcache => 1); # first param - limit of comments
-    @comments = reverse @comments; # reverse the comments so newest is printed first
-
-    my $comments_time = 0;
-    foreach my $row (@comments) {
-        next if $row->{nodetype} ne 'L';
-        $comments_time = time() - $row->{datepostunix};
-        last;
+    my @all_items = $inbox ? $inbox->all_items : ();
+    my $inbox_time = '';
+    my $inbox_unread = 0;
+    $inbox_unread = $inbox->unread_count if $inbox;
+    if (@all_items and $inbox_unread) {
+        @all_items = sort { $b->when_unixtime <=> $a->when_unixtime } @all_items;
+        my $ago = time() - ($all_items[0])->when_unixtime;
+        $inbox_time = LJ::TimeUtil->ago_text($ago) if $ago > 0 and $ago <= 7*24*60*60;
     }
-    $comments_time = ($comments_time <= 0 || $comments_time > 7*24*60*60) ?
-        '' : LJ::TimeUtil->ago_text($comments_time);
 
-    $ret .= '<dl class="w-list"><dt><strong>' . $class->ml('widget.updatesforuser.comments') . "</strong> (<a href='$LJ::SITEROOT/tools/recent_comments.bml'>" . $class->ml('widget.updatesforuser.comments.all')  . '</a>)';
-    $ret .= ": <em class='w-list-time'>$comments_time</em>" if scalar @comments;
-    $ret .= '</dt>';
+    $ret .= '<dl class="w-list w-list-inbox" ><dt><strong>' . $class->ml('widget.updatesforuser.inbox') . '</strong> ';
+    $ret .= "<em class='w-list-time'>$inbox_time</em>" if $inbox_time;
+    $ret .= '</dt> ';
 
-    $ret .= '<dd><ul>' if @comments;
-    foreach my $row (@comments) {
-        next unless $row->{nodetype} eq 'L';
+    $ret .= "<dd> <a href='$LJ::SITEROOT/inbox/'>$inbox_unread</a>";
+    $ret .= '</dd></dl>';
 
-        # load the comment
-        my $comment = LJ::Comment->new($remote, jtalkid => $row->{jtalkid});
-        next if $comment->is_deleted;
-
-        # load the comment poster
-        my $posteru = $comment->poster;
-        next if $posteru && ($posteru->is_suspended || $posteru->is_expunged);
-        my $poster = $posteru ? $posteru->ljuser_display : $class->ml('widget.recentcomments.anon');
-
-        my $parent_word = $comment->parenttalkid ? 'comment' : 'entry';
-        my $url = $comment->url ? $comment->url : '';
-        my $from = $comment->poster ? $comment->poster->ljuser_display : $class->ml('widget.updatesforuser.anonymous');
-        $ret .= '<li>' . $class->ml('widget.updatesforuser.comment_to_' . $parent_word, { aopts => "href='$url'", ljuser => $from } ) . '</li>';
-    }
-    $ret .= '</ul></dd></dl>' if @comments;
-
     my $friends_time = 0;
     my @notifications = ();
     if ($inbox) {

Modified: branches/oauth/cgi-bin/LJ/Worker/UserManage/CheckTables.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Worker/UserManage/CheckTables.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Worker/UserManage/CheckTables.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -17,15 +17,22 @@
     my $arg = $job->arg;
     $arg = thaw $arg unless ref $arg;
 
-    my $clust = $arg->{'clust'} || die "no source cluster";
+    my $clust = $arg->{'clust'};
 
+    my $callback = $arg->{'callback'};
+
+    unless ($clust) {
+        warn 'unspecified cluster for user #' . $arg->{'userid'} . '.' .
+             'skipping CheckTables.';
+
+        return $class->finished($job, $callback);
+    }
+
     my $dbh = LJ::get_cluster_master($clust); $dbh->{'RaiseError'} = 1;
 
     my @tables = @{$dbh->selectcol_arrayref('SHOW TABLES')};
     my @unspecified_tables = grep { !exists($table_info{$_}) } @tables;
 
-    my $callback = $arg->{'callback'};
-
     if (@unspecified_tables) {
         my $message = "I don't know how to deal with the following tables:\n" .
             join("\n", map { "   $_" } @unspecified_tables) . "\n";

Modified: branches/oauth/cgi-bin/LJ/Worker/UserManage/PrePurge.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Worker/UserManage/PrePurge.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Worker/UserManage/PrePurge.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -19,8 +19,7 @@
 
     my $capclass = LJ::UserManage::READONLY_CAP_CLASS;
     if ($u->in_class($capclass)) {
-        __PACKAGE__->debug_msg($u->user . " is already being moved; skipping\n");
-        return $job->completed;
+        warn $u->user . " is probably already being purged\n";
     }
 
     unless ($u->can_expunge) {

Modified: branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterCommentPurge.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterCommentPurge.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterCommentPurge.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -58,9 +58,11 @@
     my $chunk_size = $LJ::IS_DEV_SERVER ? 10 : 1000;
 
     ## fetch all comments, which not deleted yet 
+    my $exclude_protected_journals = LJ::UserManage::_exclude_protected_journals_clause();
     my $selected = $dbh->selectall_arrayref(qq{
         SELECT * FROM talk2
         WHERE posterid = ? AND state <> 'D'
+        $exclude_protected_journals
         LIMIT $chunk_size
     }, { Slice => {} }, $userid);
 

Modified: branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterDelete.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterDelete.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterDelete.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -51,7 +51,17 @@
     $arg = thaw $arg unless ref $arg;
 
     $userid = $arg->{'userid'} || die "no userid";
-    $clust = $arg->{'clust'} || die "no cluster";
+    $callback = $arg->{'callback'};
+    $clust = $arg->{'clust'};
+
+    unless ($clust) {
+        warn 'unspecified cluster for user #' . $arg->{'userid'} . '.' .
+             'skipping UserClusterDelete ' .
+             '[purging mode: ' . ($class->purging ? 'on' : 'off') .'].';
+
+        return $class->finished($job, $callback);
+    }
+
     $cmid = $arg->{'cmid'} || die "no cluster move id";
 
     $dbh = LJ::get_cluster_master($clust); $dbh->{'RaiseError'} = 1;
@@ -62,8 +72,6 @@
     $arg->{'tables_done'} ||= {};
     %tables_done = %{$arg->{'tables_done'}};
 
-    $callback = $arg->{'callback'};
-
     $start_time = time unless $passed_arg;
 
     my $table = $arg->{'table'};

Modified: branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterPostPurge.pm
===================================================================
--- branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterPostPurge.pm	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/LJ/Worker/UserManage/UserClusterPostPurge.pm	2010-08-04 08:57:33 UTC (rev 9309)
@@ -54,11 +54,12 @@
     __PACKAGE__->debug_msg("delete: from table: log2\n");
 
     my $chunk_size = $LJ::IS_DEV_SERVER ? 10 : 1000;
-
+    my $exclude_protected_journals = LJ::UserManage::_exclude_protected_journals_clause();
     my $selected = $dbh->selectall_arrayref(qq{
         SELECT journalid, jitemid 
         FROM   log2
         WHERE  posterid = ?
+        $exclude_protected_journals
         LIMIT  $chunk_size
     }, { Slice => {} }, $userid);
 

Modified: branches/oauth/cgi-bin/bml/scheme/lanzelot.look
===================================================================
--- branches/oauth/cgi-bin/bml/scheme/lanzelot.look	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/cgi-bin/bml/scheme/lanzelot.look	2010-08-04 08:57:33 UTC (rev 9309)
@@ -341,7 +341,7 @@
 
 
 <!-- your content here -->
-<table class="lanzelot-content l-body">
+<table class="lanzelot-content">
 <tr>
     <td id="Content" align="left">
 

Modified: branches/oauth/htdocs/404-error-local.bml
===================================================================
--- branches/oauth/htdocs/404-error-local.bml	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/htdocs/404-error-local.bml	2010-08-04 08:57:33 UTC (rev 9309)
@@ -1,6 +1,6 @@
 <?_code
 {
-    die LJ::Request::uri();
+    die LJ::Request->uri();
     my @errors = (
 
         qq {

Copied: branches/oauth/htdocs/defaultpic.bml (from rev 9308, trunk/htdocs/defaultpic.bml)
===================================================================
--- branches/oauth/htdocs/defaultpic.bml	                        (rev 0)
+++ branches/oauth/htdocs/defaultpic.bml	2010-08-04 08:57:33 UTC (rev 9309)
@@ -0,0 +1,27 @@
+<?page
+body<=
+<?_code
+{
+#line 6
+    use strict;
+    use vars qw($title);
+
+    my $username = LJ::Request->get_param('user');
+    my $u        = LJ::load_user($username);
+
+    return 'unknown user' unless $u;
+
+    my $userpic = $u->userpic;
+    if ($userpic) {
+        return LJ::Request->redirect($userpic->url);
+    }
+
+    return LJ::Request->redirect("$LJ::STATPREFIX/horizon/nouserpic.png");
+}
+_code?>
+<=body
+title=><?_code return $title; _code?>
+head<=
+<?_code return $headextra; _code?>
+<=head
+page?>

Modified: branches/oauth/htdocs/error-page.bml
===================================================================
--- branches/oauth/htdocs/error-page.bml	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/htdocs/error-page.bml	2010-08-04 08:57:33 UTC (rev 9309)
@@ -18,8 +18,8 @@
 ## private      => private (just me)
 ## members      => only for community members
 
-my $main_req = LJ::Request::prev();
-die "INITIAL" if LJ::Request::is_initial_req();
+my $main_req = LJ::Request->prev();
+die "INITIAL" if LJ::Request->is_initial_req();
 
 my $error_type = $main_req->pnotes('error');
 
@@ -176,6 +176,13 @@
 	</div>
 </div>
 
+|;
+
+my $pagestats_obj = LJ::pagestats_obj();
+$ret .= $pagestats_obj->render( { error_url => $main_req->uri, error_type => $error_type } );
+
+$ret .= qq|
+
 </body>
 </html>
 |;

Copied: branches/oauth/htdocs/img/preloader.gif (from rev 9308, trunk/htdocs/img/preloader.gif)
===================================================================
(Binary files differ)

Copied: branches/oauth/htdocs/img/reskining/reskining-corner.png (from rev 9308, trunk/htdocs/img/reskining/reskining-corner.png)
===================================================================
(Binary files differ)

Modified: branches/oauth/htdocs/rename/use.bml.text.local
===================================================================
--- branches/oauth/htdocs/rename/use.bml.text.local	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/htdocs/rename/use.bml.text.local	2010-08-04 08:57:33 UTC (rev 9309)
@@ -13,6 +13,8 @@
 
 .error.badpass=The passwords for the old and new usernames do not match.
 
+.error.cant_rename_identity_account=Can't rename identity account
+
 .error.differentusername=This isn't the username you were logged in as when you loaded this form.
 
 .error.login=But first, you have to <a [[aopts]]>login</a>.

Modified: branches/oauth/htdocs/stc/home.css
===================================================================
--- branches/oauth/htdocs/stc/home.css	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/htdocs/stc/home.css	2010-08-04 08:57:33 UTC (rev 9309)
@@ -14,15 +14,7 @@
     margin-left: auto !important;
     margin-right: auto !important;
 }
-.homepage-loggedout a,
-.homepage-loggedin a {
-    color: #48779b !important;
-    text-decoration: none;
-}
-.homepage-loggedout a:hover,
-.homepage-loggedin a:hover {
-    text-decoration: underline;
-}
+
 .homepage-loggedout .b-box-container {
     padding: 12px;
     border: 2px solid #a5c4d8;
@@ -662,3 +654,4 @@
 
 
 
+

Modified: branches/oauth/htdocs/stc/lanzelot/css/modules.css
===================================================================
--- branches/oauth/htdocs/stc/lanzelot/css/modules.css	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/htdocs/stc/lanzelot/css/modules.css	2010-08-04 08:57:33 UTC (rev 9309)
@@ -500,4 +500,56 @@
 	top: 0;
 	}
 
+/* Reskining corner & Pop-Up (framework element)
+----------------------------------------- */
+BODY {position: relative;}
+DL.b-reskining-about {
+    display:none;
+    zoom: 1;
+    }
+    DL.b-reskining-about DT {    
+        position: absolute;
+        z-index: 200;
+        right: 0;    
+        top: 0;
+        width: 32px;
+        height: 29px;
+        background: url(../../img/reskining/reskining-corner.png) no-repeat;
+        zoom:1;
+        }
+    DL.b-reskining-about DD {
+        display:none;
+        position: absolute;
+        z-index: 201;
+        right: 0;    
+        top: 0;
+        z-index: 2001;
+        padding: 8px 20px !important;
+        background: #102446;
+        white-space: nowrap;
+        -moz-border-radius-bottomleft: 6px;
+        -webkit-border-bottom-left-radius: 6px;
+        border-radius-bottomleft: 6px;
+        color: #FFF;
+        }
+        DL.b-reskining-about DD A:link,
+        DL.b-reskining-about DD A:visited,
+        DL.b-reskining-about DD A:hover,
+        DL.b-reskining-about DD A:active {
+            border: 0;
+            text-decoration: underline;
+            color: #FFF !important;    
+            }
+    DL.b-reskining-about:hover DD {
+        display: block;    
+        }
 
+/* Home page links
+-------------------------------------------- */
+.homepage-loggedout a:hover, 
+.homepage-loggedin a:hover {
+    text-decoration: none;
+    }
+
+
+

Copied: branches/oauth/htdocs/stc/reskining/reskining-corner.png (from rev 9308, trunk/htdocs/stc/reskining/reskining-corner.png)
===================================================================
(Binary files differ)

Modified: branches/oauth/htdocs/stc/shop/ie.css
===================================================================
--- branches/oauth/htdocs/stc/shop/ie.css	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/htdocs/stc/shop/ie.css	2010-08-04 08:57:33 UTC (rev 9309)
@@ -7,7 +7,8 @@
 .b-gifts-catalog UL,
 .m-payment,
 .b-shop .b-promo,
-.b-gifts-catalog UL LI .item .desc {
+.b-gifts-catalog UL LI .item .desc,
+.b-promo-book {
     zoom:1;
     }
 * HTML .b-gifts-title {

Modified: branches/oauth/htdocs/stc/shop/shop.css
===================================================================
--- branches/oauth/htdocs/stc/shop/shop.css	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/htdocs/stc/shop/shop.css	2010-08-04 08:57:33 UTC (rev 9309)
@@ -296,6 +296,70 @@
 		color: #FFF !important;
 		}
 
+/* Book promo block
+-------------------------------------- */
+.b-promo-book {
+	overflow: hidden;
+	padding: 12px 0 12px 25px;
+	margin: 0 0 17px 0;
+	border: 1px solid #878787;
+	-webkit-border-radius: 5px;
+	-moz-border-radius: 5px;
+	border-radius: 5px;
+	color: #404040;
+	}
+	.b-promo-book .pic,
+	.b-promo-book .desc {
+		padding: 0;
+		margin: 0;
+		}
+	.b-promo-book .pic {
+		float: right;
+		width: 126px;
+		}
+		.b-promo-book .pic IMG {
+			display: block;
+			margin-bottom: 5px;
+			}
+		.b-promo-book .pic BUTTON {
+			display: block;
+			margin: 0 auto;
+			}
+	.b-promo-book .desc {
+		overflow: hidden;
+		padding-right: 5px;
+		}
+	.b-promo-book H3 {
+		padding: 0;
+		margin: 0 0 10px 0;
+		line-height: 20px;
+		font-weight: normal;
+		font-style: normal;
+		font-size: 18px;
+		}
+	.b-promo-book H4,
+	.b-promo-book P {
+		padding: 0;
+		margin: 0;
+		line-height: 15px;
+		font-size: 12px;
+		}
+	.b-promo-book P {
+		margin-bottom: 5px;
+		}
+	.b-promo-book P.note {
+		margin: -10px 0 15px 0;
+		font-size: 11px;
+		}
+	/* English */
+	.b-promo-book-en .pic {
+		width: 160px;
+		}
+		.b-promo-book-en .pic BUTTON {
+			position: relative;
+			margin: -25px auto 0 auto;
+			}
+
 /* Promo block on main
 -------------------------------------- */
 .b-shop .b-promo {

Modified: branches/oauth/htdocs/stc/widgets/extblocks.css
===================================================================
--- branches/oauth/htdocs/stc/widgets/extblocks.css	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/htdocs/stc/widgets/extblocks.css	2010-08-04 08:57:33 UTC (rev 9309)
@@ -3,18 +3,18 @@
 }
 
 /* Fonts reset*/
-.canyon,
+.appwidget-extblock .canyon,
 .promo-block {
         font:12px/1.4 arial,sans-serif;
         color:#404040;
         }
-.canyon A:link,.canyon A:visited,
+.appwidget-extblock .canyon A:link, .appwidget-extblock .canyon A:visited,
 .promo-block A:link, .promo-block A:visited {
         color:#3F5F9E;
         border-bottom:1px solid #CCCCCC;
         text-decoration:none;
         }
-.canyon A:hover,
+.appwidget-extblock .canyon A:hover,
 .promo-block A:hover {
         border-bottom:1px solid #3F5F9E;
         }

Modified: branches/oauth/htdocs/stc/widgets/updates-for-user.css
===================================================================
--- branches/oauth/htdocs/stc/widgets/updates-for-user.css	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/htdocs/stc/widgets/updates-for-user.css	2010-08-04 08:57:33 UTC (rev 9309)
@@ -11,15 +11,17 @@
 		-moz-border-radius-bottomright: 10px;
 		-webkit-border-bottom-left-radius: 10px;
 		-webkit-border-bottom-right-radius: 10px;
+        font-size: 12px;
         }
     .appwidget-updatesforuser DL.w-list {
-        margin: 0 0 1.2em;
+        margin: 0 0 0.8em;
         padding: 0;
         }
         .appwidget-updatesforuser DL.w-list DT {
             position:relative;
             margin: 0;
             padding: 0 0 .5em;
+            font-size: 12px;
             }
             .appwidget-updatesforuser DL.w-list DT A {
                 font-weight: normal;
@@ -29,21 +31,30 @@
                 right: 0;
                 top: 2px;
                 font-style: normal;
-                font-size: 11px;
+                font-size: 12px;
                 color: #c3c3c3;
                 }
         .appwidget-updatesforuser DL.w-list DD {
             margin: 0;
             padding: 0;
+            font-size: 11px;
             }
             .appwidget-updatesforuser DL.w-list DD UL {
                 margin: 0;
-                padding: 0 0 .7em;
+                padding: 0 0 0.3em;
                 list-style: none;
                 }
                 .appwidget-updatesforuser DL.w-list DD UL LI {
                     margin: 0 0 .4em;
+                    font-size: 12px;
                     }
+    .appwidget-updatesforuser DL.w-list-inbox {
+        position: relative;
+        padding-right: 95px;
+        }                
+    .appwidget-updatesforuser DL.w-list-inbox DT {
+        position: static;
+        }
     .appwidget-updatesforuser DL.w-list-inbox DT,
     .appwidget-updatesforuser DL.w-list-inbox DD {
         display: inline;
@@ -63,7 +74,7 @@
             position: relative;
             top: 2px;
             }
+    .appwidget-updatesforuser .w-body P {
+        font-size: 12px;
+        }
 
-
-
-    
\ No newline at end of file

Modified: branches/oauth/templates/Shop/MainPage.tmpl
===================================================================
--- branches/oauth/templates/Shop/MainPage.tmpl	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/templates/Shop/MainPage.tmpl	2010-08-04 08:57:33 UTC (rev 9309)
@@ -4,4 +4,30 @@
 	<span><TMPL_VAR expr="ml('shop.view.promo.paidaccount.text')"></span>
 	</a>
 </div>
+<tmpl_if is_remote_sup>
+<div class="b-promo-book">
+	<div class="pic">
+		<a href="http://www.ozon.ru/context/detail/id/5042911/?partner=lj"><img src="<TMPL_VAR lj_imgprefix>/shop/promo/promo-book-ru.jpg" width="126" height="118" alt="<TMPL_VAR expr="ml('shop.view.promo.book.title')">" /></a>
+		<button type="button" onClick="location.href='http://www.ozon.ru/context/detail/id/5042911/?partner=lj'"><TMPL_VAR expr="ml('shop.view.promo.book.buy')"></button>
+	</div>
+	<div class="desc">
+		<h4><TMPL_VAR expr="ml('shop.view.promo.book.author')"></h4>
+		<p><em><TMPL_VAR expr="ml('shop.view.promo.book.author-note')"></em></p>
+		<h3><a href="http://www.ozon.ru/context/detail/id/5042911/?partner=lj"><TMPL_VAR expr="ml('shop.view.promo.book.title')"></a></h3>
+		<p><TMPL_VAR expr="ml('shop.view.promo.book.desc')"></p>
+	</div>
+</div>
+<tmpl_else>
+<div class="b-promo-book b-promo-book-en">
+	<div class="pic">
+		<a href="http://www.blurb.com/bookstore/detail/867149"><img src="<TMPL_VAR lj_imgprefix>/shop/promo/promo-book-en.jpg" width="160" height="149" alt="<TMPL_VAR expr="ml('shop.view.promo.book.title')">" /></a>
+		<button type="button" onClick="location.href='http://www.blurb.com/bookstore/detail/867149'"><TMPL_VAR expr="ml('shop.view.promo.book.buy')"></button>
+	</div>
+	<div class="desc">
+		<h3><a href="http://www.blurb.com/bookstore/detail/867149"><TMPL_VAR expr="ml('shop.view.promo.book.title')"></a></h3>
+		<p class="note"><em><TMPL_VAR expr="ml('shop.view.promo.book.note')"></em></p>
+		<p><TMPL_VAR expr="ml('shop.view.promo.book.desc')"></p>
+	</div>
+</div>
+</tmpl_if>
 <TMPL_INCLUDE name="templates/Shop/Promoblocks.tmpl">
\ No newline at end of file

Modified: branches/oauth/templates/Shop/PaidAccount.tmpl
===================================================================
--- branches/oauth/templates/Shop/PaidAccount.tmpl	2010-08-04 05:31:12 UTC (rev 9308)
+++ branches/oauth/templates/Shop/PaidAccount.tmpl	2010-08-04 08:57:33 UTC (rev 9309)
@@ -164,7 +164,7 @@
 								<span><select id="_mm" name="giveafter_mm" class="select"><tmpl_loop gift_monthes><option value="<tmpl_var id>" <tmpl_if expr="(id == month)"> selected="selected" </tmpl_if>><tmpl_var name></option></tmpl_loop></select><input type="text" size="2" id="_dd" name="giveafter_dd" value="<tmpl_var mday>" maxlength="2" class="text" /><input type="text" size="4" id="_yyyy" name="giveafter_yyyy" value="<tmpl_var year>" maxlength="4" class="text" /></span>
 							</li>
 							<li class="b-buy-goptions-anon">
-								<input type="checkbox" name="anongift" id="anongift" value="" class="checkbox i-buy-goptions-anon" /><label for="anongift"><tmpl_var giftopt_anon></label>
+								<input type="checkbox" name="anongift" id="anongift" class="checkbox i-buy-goptions-anon" /><label for="anongift"><tmpl_var giftopt_anon></label>
 							</li>
 						</ul>
 					</div>

Tags: bml, css, dat, fortl, gif, ljcom, local, look, pl, pm, png, s2, tmpl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments