Merge branch 'master' of github.com:shish/shimmie2

This commit is contained in:
Shish 2012-03-19 20:25:22 +00:00
commit 2677a597c9
3 changed files with 7 additions and 1 deletions

View File

@ -182,7 +182,7 @@ class NumericScore extends Extension {
public function onNumericScoreSet(NumericScoreSetEvent $event) {
global $user;
log_info("numeric_score", "Rated Image #{$event->image_id} as {$event->score}");
log_debug("numeric_score", "Rated Image #{$event->image_id} as {$event->score}");
$this->add_vote($event->image_id, $user->id, $event->score);
}

View File

@ -487,6 +487,9 @@ class CommentList extends Extension {
// all checks passed
else {
if($user->is_anonymous()) {
set_prefixed_cookie("nocache", "Anonymous Commenter", time()+60*60*24, "/");
}
$database->Execute(
"INSERT INTO comments(image_id, owner_id, owner_ip, posted, comment) ".
"VALUES(:image_id, :user_id, :remote_addr, now(), :comment)",

View File

@ -100,6 +100,9 @@ class TagEditTheme extends Themelet {
$proto_domain = explode("://", $source);
$h_source = html_escape($proto_domain[1]);
$u_source = html_escape($source);
if(endsWith($h_source, "/")) {
$h_source = substr($h_source, 0, -1);
}
return "<a href='$u_source'>$h_source</a>";
}
return "Unknown";