mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-05-07 06:55 am

[dw-free] Change synlevel to cut

[commit: http://hg.dwscoalition.org/dw-free/rev/518d4ce82ef7]

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

Change synlevel option 'ljcut' to just 'cut'.

Patch by [personal profile] hotlevel4.

Files modified:
  • cgi-bin/ljfeed.pl
  • cgi-bin/ljhooks.pl
--------------------------------------------------------------------------------
diff -r 2aa125cdbad1 -r 518d4ce82ef7 cgi-bin/ljfeed.pl
--- a/cgi-bin/ljfeed.pl	Thu May 07 06:51:55 2009 +0000
+++ b/cgi-bin/ljfeed.pl	Thu May 07 06:55:22 2009 +0000
@@ -41,9 +41,9 @@ sub make_feed
     LJ::text_out(\$u->{$_})
         foreach ("name", "url", "urlname");
 
-    # opt_synlevel will default to 'ljcut'
-    $u->{'opt_synlevel'} = 'ljcut'
-        unless $u->{'opt_synlevel'} =~ /^(?:full|ljcut|summary|title)$/;
+    # opt_synlevel will default to 'cut'
+    $u->{'opt_synlevel'} = 'cut'
+        unless $u->{'opt_synlevel'} =~ /^(?:full|cut|summary|title)$/;
 
     # some data used throughout the channel
     my $journalinfo = {
@@ -211,7 +211,7 @@ sub make_feed
                                        {
                                         wordlength => 0,
                                         preformatted => $logprops{$itemid}->{opt_preformatted},
-                                        cuturl => $u->{opt_synlevel} eq 'ljcut' ? "$journalinfo->{link}$ditemid.html" : "",
+                                        cuturl => $u->{opt_synlevel} eq 'cut' ? "$journalinfo->{link}$ditemid.html" : "",
                                         to_external_site => 1,
                                        });
             # do this after clean so we don't have to about know whether or not
@@ -565,7 +565,7 @@ sub create_view_atom
             $content->appendTextNode( $it->{'event'} );
             $entry_xml->getDocumentElement->appendChild( $content );
         };
-        if ($u->{'opt_synlevel'} eq 'full' || $u->{'opt_synlevel'} eq 'ljcut') {
+        if ( $u->{'opt_synlevel'} eq 'full' || $u->{'opt_synlevel'} eq 'cut' ) {
             # Do this manually for now, until XML::Atom supports new
             # content type classifications.
             $make_content->('content');
diff -r 2aa125cdbad1 -r 518d4ce82ef7 cgi-bin/ljhooks.pl
--- a/cgi-bin/ljhooks.pl	Thu May 07 06:51:55 2009 +0000
+++ b/cgi-bin/ljhooks.pl	Thu May 07 06:55:22 2009 +0000
@@ -109,8 +109,8 @@ sub register_setter
 
 register_setter('synlevel', sub {
     my ($u, $key, $value, $err) = @_;
-    unless ($value =~ /^(title|ljcut|summary|full)$/) {
-        $$err = "Illegal value.  Must be 'title', 'ljcut', 'summary', or 'full'";
+    unless ($value =~ /^(title|cut|summary|full)$/) {
+        $$err = "Illegal value.  Must be 'title', 'cut', 'summary', or 'full'";
         return 0;
     }
 
--------------------------------------------------------------------------------