This function doesn't need the global $user now.
This commit is contained in:
parent
3cfe182ad3
commit
e6e9aced1c
2 changed files with 4 additions and 6 deletions
|
@ -175,6 +175,10 @@ class ImageIO extends SimpleExtension {
|
|||
if($user->is_admin()) {
|
||||
$event->add_part($this->theme->get_deleter_html($event->image->id));
|
||||
}
|
||||
/* In the future, could perhaps allow users to replace images that they own as well... */
|
||||
if ($user->is_admin() && $config->get_bool("upload_replace")) {
|
||||
$event->add_part($this->theme->get_replace_html($event->image->id));
|
||||
}
|
||||
}
|
||||
|
||||
public function onImageAddition($event) {
|
||||
|
@ -209,11 +213,6 @@ class ImageIO extends SimpleExtension {
|
|||
$h_image_rate = sprintf("%.1f", ($i_image_count / $i_days_old));
|
||||
$images_link = make_link("post/list/user_id=$u_id/1");
|
||||
$event->add_stats("<a href='$images_link'>Images uploaded</a>: $i_image_count, $h_image_rate per day");
|
||||
|
||||
/* In the future, could perhaps allow users to replace images that they own as well... */
|
||||
if ($user->is_admin() && $config->get_bool("upload_replace")) {
|
||||
$event->add_part($this->theme->get_replace_html($event->image->id));
|
||||
}
|
||||
}
|
||||
|
||||
public function onSetupBuilding($event) {
|
||||
|
|
|
@ -7,7 +7,6 @@ class ImageIOTheme {
|
|||
* @param $image_id The image to delete
|
||||
*/
|
||||
public function get_deleter_html($image_id) {
|
||||
global $user;
|
||||
global $config;
|
||||
|
||||
if($config->get_bool("jquery_confirm")) {
|
||||
|
|
Reference in a new issue