Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/acp/config_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ public function get_display_vars($mode)
'allow_gif' => array('lang' => 'GIF_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'),
'allow_jpg' => array('lang' => 'JPG_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'),
'allow_png' => array('lang' => 'PNG_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'),
'allow_webp' => array('lang' => 'WEBP_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'),
'allow_webp' => array('lang' => 'WEBP_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'),
'allow_zip' => array('lang' => 'ZIP_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'),
'description_length' => array('lang' => 'IMAGE_DESC_MAX_LENGTH', 'validate' => 'int', 'type' => 'text:7:5', 'append' => 'CHARACTERS'),
'disp_nextprev_thumbnail' => array('lang' => 'DISP_NEXTPREV_THUMB','validate' => 'bool', 'type' => 'radio:yes_no'),
Expand Down
6 changes: 3 additions & 3 deletions core/file/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static public function mimetype_by_filename($filename)
case '.jpg':
return 'image/jpeg';
break;
case '.webp':
case 'webp':
return 'image/webp';
break;
}
Expand All @@ -149,7 +149,7 @@ static public function extension_by_filename($filename)
case '.jpg':
return 'jpg';
break;
case '.webp':
case 'webp':
return 'webp';
break;
}
Expand Down Expand Up @@ -177,7 +177,7 @@ public function read_image($force_filesize = false)
imagealphablending($this->image, true); // Set alpha blending on ...
imagesavealpha($this->image, true); // ... and save alpha blending!
break;
case '.webp':
case 'webp':
$this->image_type = 'webp';
$this->image = imagecreatefromwebp($this->image_source);
break;
Expand Down
2 changes: 1 addition & 1 deletion core/language/es/gallery_acp.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
'RECENT_ON_INDEX_COUNT' => 'Conteo de imágenes recientes',
'PHPBB_INTEGRATION' => 'Integración de phpBB',
'PNG_ALLOWED' => 'Permitido subir archivos PNG',
'WEBP_ALLOWED' => 'Allowed to upload WEBP files',
'WEBP_ALLOWED' => 'Permitido subir archivos WEBP',
'PURGED_CACHE' => 'Purgó la caché',

'RATE_SCALE' => 'Escala de calificación',
Expand Down
2 changes: 1 addition & 1 deletion core/language/ru/gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
'FILETYPES_GIF' => 'gif',
'FILETYPES_JPG' => 'jpg',
'FILETYPES_PNG' => 'png',
'FILETYPES_WEBP' => 'webp',
'FILETYPES_WEBP' => 'webp',
'FILETYPES_ZIP' => 'zip',

'FULL_EDITOR_GALLERY' => 'Редактировать',
Expand Down
3 changes: 2 additions & 1 deletion core/notification/events/phpbbgallery_image_approved.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function get_email_template_variables()
*/
public function get_url()
{
return $this->get_data('album_url');
return $this->get_data('album_id') ? append_sid($this->phpbb_root_path . 'gallery/album/' . $this->get_data('album_id')) : $this->get_data('album_url');
}

/**
Expand All @@ -166,6 +166,7 @@ public function create_insert_array($data, $pre_create_data = array())
{
$this->set_data('album_name', $data['album_name']);
$this->set_data('album_url', $data['album_url']);
$this->set_data('album_id', $data['album_id']);
parent::create_insert_array($data, $pre_create_data);
}
}
7 changes: 4 additions & 3 deletions core/notification/events/phpbbgallery_image_for_approval.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function is_available()
*/
public static function get_item_id($data)
{
return $data['last_image_id'];
return (int) $data['last_image_id'];
}

/**
Expand All @@ -78,7 +78,7 @@ public static function get_item_id($data)
public static function get_item_parent_id($data)
{
// No parent
return $data['album_id'];
return (int) $data['album_id'];
}

/**
Expand Down Expand Up @@ -155,7 +155,7 @@ public function get_email_template_variables()
*/
public function get_url()
{
return $this->get_data('album_url');
return $this->get_data('album_id') ? append_sid($this->phpbb_root_path . 'gallery/album/' . $this->get_data('album_id')) : $this->get_data('album_url');
}

/**
Expand All @@ -181,6 +181,7 @@ public function create_insert_array($data, $pre_create_data = array())
{
$this->set_data('album_name', $data['album_name']);
$this->set_data('album_url', $data['album_url']);
$this->set_data('album_id', $data['album_id']);
$this->set_data('uploader', $data['uploader']);
parent::create_insert_array($data, $pre_create_data);
}
Expand Down
3 changes: 2 additions & 1 deletion core/notification/events/phpbbgallery_image_not_approved.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function get_email_template_variables()
*/
public function get_url()
{
return $this->get_data('album_url');
return $this->get_data('album_id') ? append_sid($this->phpbb_root_path . 'gallery/album/' . $this->get_data('album_id')) : $this->get_data('album_url');
}

/**
Expand All @@ -166,6 +166,7 @@ public function create_insert_array($data, $pre_create_data = array())
{
$this->set_data('album_name', $data['album_name']);
$this->set_data('album_url', $data['album_url']);
$this->set_data('album_id', $data['album_id']);
parent::create_insert_array($data, $pre_create_data);
}
}
6 changes: 3 additions & 3 deletions core/notification/events/phpbbgallery_new_comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function is_available()
*/
public static function get_item_id($data)
{
return $data['comment_id'];
return (int) $data['comment_id'];
}

/**
Expand All @@ -78,7 +78,7 @@ public static function get_item_id($data)
public static function get_item_parent_id($data)
{
// No parent
return $data['image_id'];
return (int) $data['image_id'];
}

/**
Expand Down Expand Up @@ -155,7 +155,7 @@ public function get_email_template_variables()
*/
public function get_url()
{
return $this->get_data('url');
return $this->get_data('image_id') ? append_sid($this->phpbb_root_path . 'gallery/image/' . $this->get_data('image_id')) : $this->get_data('url');
}

/**
Expand Down
7 changes: 4 additions & 3 deletions core/notification/events/phpbbgallery_new_image.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function is_available()
*/
public static function get_item_id($data)
{
return $data['last_image_id'];
return (int) $data['last_image_id'];
}

/**
Expand All @@ -78,7 +78,7 @@ public static function get_item_id($data)
public static function get_item_parent_id($data)
{
// No parent
return $data['album_id'];
return (int) $data['album_id'];
}

/**
Expand Down Expand Up @@ -149,7 +149,7 @@ public function get_email_template_variables()
*/
public function get_url()
{
return $this->get_data('album_url');
return $this->get_data('album_id') ? append_sid($this->phpbb_root_path . 'gallery/album/' . $this->get_data('album_id')) : $this->get_data('album_url');
}

/**
Expand All @@ -175,6 +175,7 @@ public function create_insert_array($data, $pre_create_data = array())
{
$this->set_data('album_name', $data['album_name']);
$this->set_data('album_url', $data['album_url']);
$this->set_data('album_id', $data['album_id']);
parent::create_insert_array($data, $pre_create_data);
}
}
7 changes: 4 additions & 3 deletions core/notification/events/phpbbgallery_new_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function is_available()
*/
public static function get_item_id($data)
{
return $data['item_id'];
return (int) $data['item_id'];
}

/**
Expand Down Expand Up @@ -154,7 +154,7 @@ public function users_to_query()
*/
public function get_url()
{
return $this->get_data('url');
return $this->get_data('reported_image_id') ? append_sid($this->phpbb_root_path . 'gallery/moderate/image/' . $this->get_data('reported_image_id')) : $this->get_data('url');
}

/**
Expand All @@ -170,7 +170,8 @@ public function create_insert_array($data, $pre_create_data = array())
{
$this->set_data('item_id', $data['item_id']);
$this->set_data('reporter', $data['reporter']);
$this->set_data('reported_image_id', $data['reported_image_id']);
$this->set_data('url', $data['url']);
return parent::create_insert_array($data, $pre_create_data);
parent::create_insert_array($data, $pre_create_data);
}
}
1 change: 1 addition & 0 deletions core/notification/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public function notify($type, $target)
'user_ids' => array_diff($this->gallery_auth->acl_users_ids('m_report', $target['reported_album_id']), array($target['reporter_id'])),
'item_id' => $target['report_id'],
'reporter' => $target['reporter_id'],
'reported_image_id' => $target['reported_image_id'],
'url' => $this->url->get_uri($this->helper->route('phpbbgallery_core_moderate_image', array('image_id' => $target['reported_image_id']))),
);
$phpbb_notifications->add_notifications('phpbbgallery.core.notification.new_report', $notification_data);
Expand Down
Loading