diff --git a/e107_files/bbcode/img.bb b/e107_files/bbcode/img.bb
index 28a8ae48d..cfad12fb7 100644
--- a/e107_files/bbcode/img.bb
+++ b/e107_files/bbcode/img.bb
@@ -12,64 +12,61 @@ $code_text = $tp -> toAttribute($code_text);
if($parm)
{
- $parm = preg_replace('#onerror *=#i','',$parm);
- $parm = str_replace("amp;", "&", $parm);
- parse_str($parm,$tmp);
- foreach($tmp as $p => $v)
- {
- $imgParms[$p]=$v;
- }
+ $parm = preg_replace('#onerror *=#i','',$parm);
+ $parm = str_replace("amp;", "&", $parm);
+ parse_str($parm,$tmp);
+ foreach($tmp as $p => $v)
+ {
+ $imgParms[$p]=$v;
+ }
}
$parmStr="";
foreach($imgParms as $k => $v)
{
- $parmStr .= $tp -> toAttribute($k)."='".$tp -> toAttribute($v)."' ";
+ $parmStr .= $tp -> toAttribute($k)."='".$tp -> toAttribute($v)."' ";
}
if((strpos($code_text,'../') === FALSE) && file_exists(e_IMAGE."newspost_images/".$code_text))
{
- $code_text = e_IMAGE."newspost_images/".$code_text;
+ $code_text = e_IMAGE."newspost_images/".$code_text;
}
if (!$postID || $postID == 'admin')
{
- return "
";
+ return "
";
}
else
{
- if(strstr($postID,'class:'))
+ if(strstr($postID,'class:'))
+ {
+ $uc = substr($postID,6);
+ }
+ else
+ {
+ $uc = $postID;
+ }
+
+ if ($pref['image_post'])
+ {
+ if (check_class($pref['image_post_class'],'',$uc))
{
- $uc = substr($postID,6);
- }
- if ($pref['image_post'])
- {
- if(!isset($uc) || ($uc == ''))
- {
- if (!function_exists('e107_userGetuserclass'))
- {
- require_once(e_HANDLER.'user_func.php');
- }
- $uc = e107_userGetuserclass($postID);
- }
- if (check_class($pref['image_post_class'],$uc))
- {
- return "
";
- }
- else
- {
- return ($pref['image_post_disabled_method'] ? "[ image disabled ]" : "Image: $code_text");
- }
+ return "
";
}
else
{
- if ($pref['image_post_disabled_method'])
- {
- return '[ image disabled ]';
- }
- else
- {
- return "Image: $code_text";
- }
+ return ($pref['image_post_disabled_method'] ? "[ image disabled ]" : "Image: $code_text");
}
+ }
+ else
+ {
+ if ($pref['image_post_disabled_method'])
+ {
+ return '[ image disabled ]';
+ }
+ else
+ {
+ return "Image: $code_text";
+ }
+ }
}
diff --git a/e107_handlers/user_func.php b/e107_handlers/user_func.php
deleted file mode 100644
index d9daa0d93..000000000
--- a/e107_handlers/user_func.php
+++ /dev/null
@@ -1,51 +0,0 @@
-db_Select("user", "user_class, user_admin", "user_id=".intval($user_id)))
- {
- $row = $uc_sql->db_Fetch();
- $uc = $row['user_class'];
- $uc .= ",".e_UC_MEMBER;
- if($row['user_admin'])
- {
- $uc .= ",".e_UC_ADMIN;
- }
- return $uc;
- }
- else
- {
- return "";
- }
- }
-}
-?>
\ No newline at end of file