Permalink
Browse files

misc. fixes, syncs, etc.

  • Loading branch information...
1 parent 158b89f commit ea5719d7baa4183c4c0fc867e6aec67039c4fe22 @pudge pudge committed Jul 12, 2005
@@ -899,20 +899,19 @@ sub getMetamodsForUserRaw {
}
sub getCSSValuesHashForCol {
- my ($self, $col) = @_;
- my $values = $self->sqlSelectColArrayref($col, "css", "", "", { distinct => 1});
- my $result;
- %$result = map { $_ => 1 } @$values;
+ my($self, $col) = @_;
+ my $values = $self->sqlSelectColArrayref($col, 'css', '', '', { distinct => 1 });
+ my $result = { map { $_ => 1 } @$values };
return $result;
}
sub getCSS {
- my ($self) = @_;
+ my($self) = @_;
my $user = getCurrentUser();
my $page = $user->{currentPage};
- my $skid = getCurrentSkin("skid");
+ my $skid = getCurrentSkin('skid');
my $admin = $user->{is_admin};
- my $theme = $user->{light} ? "light" : "";
+ my $theme = $user->{light} ? 'light' : "";
my $constants = getCurrentStatic();
my $expire_time = $constants->{css_expire} || 3600;
@@ -927,9 +926,9 @@ sub getCSS {
my $css_skids_ref = $self->{_css_skids_cache};
my $css_themes_ref = $self->{_css_themes_cache};
- $css_pages_ref = $self->getCSSValuesHashForCol("page") if !$css_pages_ref;
- $css_skids_ref = $self->getCSSValuesHashForCol("skid") if !$css_skids_ref;
- $css_themes_ref= $self->getCSSValuesHashForCol("theme") if !$css_themes_ref;
+ $css_pages_ref = $self->getCSSValuesHashForCol('page') if !$css_pages_ref;
+ $css_skids_ref = $self->getCSSValuesHashForCol('skid') if !$css_skids_ref;
+ $css_themes_ref= $self->getCSSValuesHashForCol('theme') if !$css_themes_ref;
$page = '' if !$css_pages_ref->{$page};
$skid = 0 if !$css_skids_ref->{$skid};
@@ -957,7 +956,6 @@ sub getCSS {
$css_ref->{$skid}{$page}{$admin}{$theme} = $css;
return $css;
-
}
########################################################
@@ -4349,7 +4347,7 @@ sub setStory {
# keep the value the same.
# Note: this isn't exactly right. If the stories table is the
# only one being written to, we shouldn't set last_update
- # manually, we should let it be set iff another column changes.
+ # manually, we should let it be set if another column changes.
# Doing it this way doesn't really hurt anything though.
if (!exists($change_hr->{last_update})
@@ -9300,7 +9298,7 @@ sub getSlashConf {
)],
charrefs_bad_entity => [qw( zwnj zwj lrm rlm )],
charrefs_bad_numeric => [qw( 8204 8205 8206 8207 8236 8237 8238 )],
- charrefs_good_entity => [qw( amp lt gt euro pound yen )],
+ charrefs_good_entity => [qw( amp lt gt euro pound yen rsquo lsquo rdquo ldquo ndash mdash )],
charrefs_good_numeric => [ ],
cur_performance_stat_ops => [ ],
fixhrefs => [ ],
@@ -676,10 +676,10 @@ EOT
# box. -- Pater
getSkinColors() unless $user->{colors};
- return sidebox('Advertisement', "<div class=\"ad$num\" align=\"center\">" . $user->{state}{ad}{$num} . "</div>", "advertisement");
- } else { return ""; }
+ return sidebox('Advertisement', qq'<div class="ad$num" align="center">' . $user->{state}{ad}{$num} . "</div>", "advertisement");
+ } else { return ''; }
} else {
- return $user->{state}{ad}{$num} ? "<div class=\"ad$num\">$user->{state}{ad}{$num}</div>": "";
+ return $user->{state}{ad}{$num} ? qq'<div class="ad$num">$user->{state}{ad}{$num}</div>': '';
}
}
@@ -1423,7 +1423,12 @@ sub processCustomTags {
my $substr = substr($str, $pos);
if ($substr =~ m/^$close/si) {
my $len = length($1);
- my $code = strip_code($3);
+ my $codestr = $3;
+ # remove these if they were added by url2html; I know
+ # this is a rather cheesy way to do this, but c'est la vie
+ # -- pudge
+ $codestr =~ s{<a href="[^"]+" rel="url2html-$$">(.+?)</a>}{$1}g;
+ my $code = strip_code($codestr);
my $newstr = "<blockquote>$code</blockquote>";
substr($str, $pos, $len) = $newstr;
pos($str) = $pos + length($newstr);
@@ -2249,7 +2254,7 @@ sub url2html {
my $extra = '';
$extra = $1 if $url =~ s/([?!;:.,']+)$//;
$extra = ')' . $extra if $url !~ /\(/ && $url =~ s/\)$//;
- qq[<a href="$url">$url</a>$extra];
+ qq[<a href="$url" rel="url2html-$$">$url</a>$extra];
}ogie;
return $text;
@@ -967,14 +967,6 @@ sub portalsidebox {
Print links to pages for additional comments.
-
-
-#========================================================================
-
-=head2 linkCommentPages(SID, PID, CID, TOTAL)
-
-Print links to pages for additional comments.
-
=over 4
=item Parameters
@@ -1520,7 +1520,7 @@ sub editStory {
});
my $ispell_comments = {
- introtext => get_ispell_comments($storyref->{introtext}),
+ introtext => get_ispell_comments("$storyref->{title} $storyref->{introtext}"),
bodytext => get_ispell_comments($storyref->{bodytext}),
} unless $user->{no_spell};
@@ -2009,6 +2009,7 @@ sub updateStory {
introtext => $form->{introtext},
relatedtext => $form->{relatedtext},
-rendered => 'NULL', # freshenup.pl will write this
+ is_dirty => 1
};
for (qw(dept bodytext relatedtext)) {
@@ -13,36 +13,39 @@ __name__
aclEdit
__template__
-<P>Existing ACLs and users that have their permissions:
+<p>Existing ACLs and users that have their permissions:
-<P><TABLE CELLSPACING=2 BORDER=0>
+<p><table cellspacing=2 border=0>
[% FOREACH acl = acls.keys %]
- <TR>
- <TD>[% acl | strip_nohtml %]</TD>
- <TD ALIGN="RIGHT">([% acls.$acl.size %])</TD>
- <TD>
+ <tr>
+ <td>[% acl | strip_nohtml %]</td>
+ <td align="right">([% acls.$acl.size %])</td>
+ <td>
[% FOREACH uid = acls.$acl.nsort %]
- <A HREF="[% gSkin.rootdir %]/users.pl?uid=[% uid | strip_attribute %]">[% uid %]</A>
+ <a href="[% gSkin.rootdir %]/users.pl?uid=[% uid | strip_attribute %]">[% uid %]</a>
[% END %]
- </TD>
- </TR>
+ </td>
+ </tr>
[% END %]
-</TABLE>
+</table>
-<FORM ACTION="[% env.script_name %]" METHOD="POST">
-<INPUT TYPE="HIDDEN" NAME="op" VALUE="acls">
- <P>Enter name of new ACL category to create:
- <INPUT TYPE="TEXT" NAME="thisname" VALUE="">
- <INPUT TYPE="SUBMIT" NAME="aclsave" VALUE="Create">
- <BR>(It will be assigned to you, for starters, after which you will
+<form action="[% env.script_name %]" method="post">
+<fieldset>
+<legend>ACL Editor</legend>
+<input type="hidden" name="op" value="acls">
+ <label>Enter name of new ACL category to create:</label>
+ <input type="text" name="thisname" value="">
+ <input type="submit" name="aclsave" value="Create" class="button">
+ <br>(It will be assigned to you, for starters, after which you will
be able to assign it to other users by editing them in users.pl.
To delete a category, simply remove it from all users.)
- <BR>Recognized ACL categories so far: <tt>candelcomments_always modpoints_always stats</tt>
+ <br>Recognized ACL categories so far: <tt>candelcomments_always modpoints_always stats</tt>
<br>Don't name an ACL the same as an AL2 type, or there
will be trouble! Current AL2 types: <tt>comment ban
expired nopost nopalm norss nosubmit trusted proxy</tt>
<!-- XXXSRCID The code needs to check getAL2Types() to prevent that error from even being possible -->
-</FORM>
+ </fieldset>
+</form>
__seclev__
500
@@ -39,7 +39,7 @@
}
- slashdLog("old: $old new: $new");
+ return "old: $old new: $new";
};
sub load_from_source {
Oops, something went wrong. Retry.

0 comments on commit ea5719d

Please sign in to comment.