Merge branch 'master' of github.com:shish/shimmie2
This commit is contained in:
commit
2677a597c9
@ -182,7 +182,7 @@ class NumericScore extends Extension {
|
|||||||
|
|
||||||
public function onNumericScoreSet(NumericScoreSetEvent $event) {
|
public function onNumericScoreSet(NumericScoreSetEvent $event) {
|
||||||
global $user;
|
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);
|
$this->add_vote($event->image_id, $user->id, $event->score);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,6 +487,9 @@ class CommentList extends Extension {
|
|||||||
|
|
||||||
// all checks passed
|
// all checks passed
|
||||||
else {
|
else {
|
||||||
|
if($user->is_anonymous()) {
|
||||||
|
set_prefixed_cookie("nocache", "Anonymous Commenter", time()+60*60*24, "/");
|
||||||
|
}
|
||||||
$database->Execute(
|
$database->Execute(
|
||||||
"INSERT INTO comments(image_id, owner_id, owner_ip, posted, comment) ".
|
"INSERT INTO comments(image_id, owner_id, owner_ip, posted, comment) ".
|
||||||
"VALUES(:image_id, :user_id, :remote_addr, now(), :comment)",
|
"VALUES(:image_id, :user_id, :remote_addr, now(), :comment)",
|
||||||
|
@ -100,6 +100,9 @@ class TagEditTheme extends Themelet {
|
|||||||
$proto_domain = explode("://", $source);
|
$proto_domain = explode("://", $source);
|
||||||
$h_source = html_escape($proto_domain[1]);
|
$h_source = html_escape($proto_domain[1]);
|
||||||
$u_source = html_escape($source);
|
$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 "<a href='$u_source'>$h_source</a>";
|
||||||
}
|
}
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user