Skip to content

Commit

Permalink
Misc. thingys
Browse files Browse the repository at this point in the history
  • Loading branch information
pudge committed Apr 5, 2006
1 parent 742b103 commit bf56c21
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
12 changes: 6 additions & 6 deletions plugins/Admin/Admin.pm
Expand Up @@ -574,13 +574,13 @@ sub showSignoffBox {
}

sub ajax_learnword {
my($self) = @_;
my $form = getCurrentForm();
my($self) = @_;
my $form = getCurrentForm();

my $template = $self->getTemplateByName("ispellok", { page => "admin" });
my $template_text = $self->sqlSelect("template", "templates", "tpid = " . $template->{tpid});
$template_text .= $form->{'word'} . ' ';
$self->sqlUpdate("templates", { template => $template_text }, "tpid = " . $template->{tpid});
my $template = $self->getTemplateByName("ispellok", { page => "admin" });
my $template_text = $self->sqlSelect("template", "templates", "tpid = " . $template->{tpid});
$template_text .= $form->{'word'} . ' ';
$self->sqlUpdate("templates", { template => $template_text }, "tpid = " . $template->{tpid});
}

sub DESTROY {
Expand Down
6 changes: 3 additions & 3 deletions plugins/Admin/admin.pl
Expand Up @@ -1440,9 +1440,9 @@ sub editStory {
my $tags_reader = getObject('Slash::Tags', { db_type => 'reader' });
my @tags_example = $tags_reader->getExampleTagsForStory($story);
$tagbox_html .= slashDisplay('tagsstorydivtagbox', {
story => $storyref,
tags_top => \@tags_top,
tags_example => \@tags_example,
story => $storyref,
tags_top => \@tags_top,
tags_example => \@tags_example,
}, { Return => 1 });
}

Expand Down
1 change: 0 additions & 1 deletion plugins/Ajax/htdocs/images/admin.js
Expand Up @@ -153,7 +153,6 @@ function make_spelling_correction(misspelled_word, form_element) {
var correction = document.forms.slashstoryform.elements[selected_key].value;
document.forms.slashstoryform.elements[form_element].value =
document.forms.slashstoryform.elements[form_element].value.replace(re, correction);

}

// Remove this row from the table.
Expand Down
12 changes: 6 additions & 6 deletions plugins/Ajax/mysql_dump.sql
Expand Up @@ -116,12 +116,12 @@ INSERT INTO ajax_ops VALUES (NULL, 'remarks_config', 'Slash::Remarks', 'ajaxFetc
INSERT INTO ajax_ops VALUES (NULL, 'remarks_config_save', 'Slash::Remarks', 'ajaxConfigSave', 'ajax_admin', 'createuse');

# signoff
INSERT INTO ajax_ops VALUES(NULL, 'admin_signoff', 'Slash::Admin', 'ajax_signoff', 'ajax_admin', 'use');
INSERT INTO ajax_ops VALUES (NULL, 'admin_signoff', 'Slash::Admin', 'ajax_signoff', 'ajax_admin', 'use');

# slashboxes
INSERT INTO ajax_ops VALUES(NULL, 'admin_slashdbox', 'Slash::Admin', 'ajax_slashdbox', 'ajax_admin', 'createuse');
INSERT INTO ajax_ops VALUES(NULL, 'admin_storyadminbox', 'Slash::Admin', 'ajax_storyadminbox', 'ajax_admin', 'createuse');
INSERT INTO ajax_ops VALUES(NULL, 'admin_authorbox', 'Slash::Admin', 'ajax_authorbox', 'ajax_admin', 'createuse');
INSERT INTO ajax_ops VALUES(NULL, 'admin_perfbox', 'Slash::Admin', 'ajax_perfbox', 'ajax_admin', 'createuse');
INSERT INTO ajax_ops VALUES(NULL, 'admin_learnword', 'Slash::Admin', 'admin_learnword', 'ajax_admin', 'createuse');
INSERT INTO ajax_ops VALUES (NULL, 'admin_slashdbox', 'Slash::Admin', 'ajax_slashdbox', 'ajax_admin', 'createuse');
INSERT INTO ajax_ops VALUES (NULL, 'admin_storyadminbox', 'Slash::Admin', 'ajax_storyadminbox', 'ajax_admin', 'createuse');
INSERT INTO ajax_ops VALUES (NULL, 'admin_authorbox', 'Slash::Admin', 'ajax_authorbox', 'ajax_admin', 'createuse');
INSERT INTO ajax_ops VALUES (NULL, 'admin_perfbox', 'Slash::Admin', 'ajax_perfbox', 'ajax_admin', 'createuse');
INSERT INTO ajax_ops VALUES (NULL, 'admin_learnword', 'Slash::Admin', 'admin_learnword', 'ajax_admin', 'createuse');

6 changes: 4 additions & 2 deletions plugins/Bookmark/Bookmark.pm
Expand Up @@ -61,7 +61,8 @@ sub getRecentBookmarks {

return $self->sqlSelectAllHashrefArray("*", "bookmarks, urls",
"bookmarks.url_id = urls.url_id",
"ORDER BY bookmarks.createdtime DESC LIMIT $limit");
"ORDER BY bookmarks.createdtime DESC LIMIT $limit"
);
}

sub getPopularBookmarks {
Expand All @@ -74,7 +75,8 @@ sub getPopularBookmarks {
return $self->sqlSelectAllHashrefArray("COUNT(*) AS cnt, bookmarks.title, urls.*",
"bookmarks, urls",
"bookmarks.url_id = urls.url_id $time_clause",
"GROUP BY urls.url_id ORDER BY cnt DESC, bookmarks.createdtime DESC LIMIT $limit");
"GROUP BY urls.url_id ORDER BY cnt DESC, bookmarks.createdtime DESC LIMIT $limit"
);

}

Expand Down
2 changes: 1 addition & 1 deletion sql/mysql/upgrades
Expand Up @@ -3803,4 +3803,4 @@ UPDATE vars SET name='tags_stories_examples_pre' WHERE name='tags_stories_exampl
INSERT INTO vars (name, value, description) VALUES ('tags_stories_examples', '', 'Example tags for stories');

# Changes for plugins/Ajax
INSERT INTO ajax_ops VALUES(NULL, 'admin_learnword', 'Slash::Admin', 'admin_learnword', 'ajax_admin', 'createuse');
INSERT INTO ajax_ops VALUES (NULL, 'admin_learnword', 'Slash::Admin', 'admin_learnword', 'ajax_admin', 'createuse');

0 comments on commit bf56c21

Please sign in to comment.