Line 20 | Line 20 |
---|
}
/**
|
}
/**
|
* @todo [smilies] check regular expressions for special char replacements (stored specialchared in db)
| * @todo {smilies} check regular expressions for special char replacements (stored specialchared in db)
|
*/ class acp_icons {
| */ class acp_icons {
|
Line 91 | Line 91 |
---|
{ $img_size = getimagesize($phpbb_root_path . $img_path . '/' . $path . $img);
|
{ $img_size = getimagesize($phpbb_root_path . $img_path . '/' . $path . $img);
|
| if ($img_size) {
|
if (!$img_size[0] || !$img_size[1] || strlen($img) > 255) { continue;
| if (!$img_size[0] || !$img_size[1] || strlen($img) > 255) { continue;
|
Line 109 | Line 111 |
---|
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1])); $img_size[1] = 127; }
|
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1])); $img_size[1] = 127; }
|
| } } else { // getimagesize can't read the dimensions of the SVG files // https://bugs.php.net/bug.php?id=71517 $xml_get = simplexml_load_file($phpbb_root_path . $img_path . '/' . $path . $img);
$svg_width = intval($xml_get['width']); $svg_height = intval($xml_get['height']);
|
}
$_images[$path . $img]['file'] = $path . $img;
|
}
$_images[$path . $img]['file'] = $path . $img;
|
$_images[$path . $img]['width'] = $img_size[0]; $_images[$path . $img]['height'] = $img_size[1];
| // Give SVG a fallback on failure $_images[$path . $img]['width'] = $img_size ? $img_size[0] : ($svg_width ?: 32); $_images[$path . $img]['height'] = $img_size ? $img_size[1] : ($svg_height ?: 32);
|
} } unset($imglist);
| } } unset($imglist);
|
Line 536 | Line 550 |
---|
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); }
|
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); }
|
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
| if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . utf8_basename($pak))))
|
{ trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING); }
| { trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING); }
|
Line 640 | Line 654 |
---|
{ $replace_sql = ($mode == 'smilies') ? $code : $img; $sql = array(
|
{ $replace_sql = ($mode == 'smilies') ? $code : $img; $sql = array(
|
$fields . '_url' => $img,
| $fields . '_url' => utf8_substr(rawurlencode($img), 0, 50),
|
$fields . '_height' => (int) $height, $fields . '_width' => (int) $width, 'display_on_posting' => (int) $display_on_posting,
| $fields . '_height' => (int) $height, $fields . '_width' => (int) $width, 'display_on_posting' => (int) $display_on_posting,
|
Line 662 | Line 676 |
---|
++$order;
$sql = array(
|
++$order;
$sql = array(
|
$fields . '_url' => $img,
| $fields . '_url' => utf8_substr(rawurlencode($img), 0, 50),
|
$fields . '_height' => (int) $height, $fields . '_width' => (int) $width, $fields . '_order' => (int) $order,
| $fields . '_height' => (int) $height, $fields . '_width' => (int) $width, $fields . '_order' => (int) $order,
|
Line 693 | Line 707 |
---|
foreach ($_paks as $pak) {
|
foreach ($_paks as $pak) {
|
$pak_options .= '<option value="' . $pak . '">' . htmlspecialchars($pak) . '</option>';
| $pak_options .= '<option value="' . $pak . '">' . htmlspecialchars($pak, ENT_COMPAT) . '</option>';
|
}
$template->assign_vars(array(
| }
$template->assign_vars(array(
|