mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
BC Fix for media-manager paths using the old {e_MEDIA} variable with the [img] bbcode.
This commit is contained in:
@@ -681,7 +681,7 @@ class media_admin_ui extends e_admin_ui
|
||||
'checkboxes' => array('title'=> '', 'type' => null, 'data'=> null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||
'media_id' => array('title'=> LAN_ID, 'type' => 'number', 'data'=> 'int', 'width' =>'5%', 'forced'=> TRUE, 'nolist'=>TRUE),
|
||||
'media_preview' => array('title'=>'Preview', 'type'=>'method', 'data'=>false, 'forced'=>true, 'width' => '110px', 'thclass' => 'center', 'class'=>'center'),
|
||||
'media_url' => array('title'=> 'Path', 'type' => 'text', 'data'=> 'str', 'thclass' => 'left', 'class'=>'left', 'width' => 'auto', 'writeParms'=>'size=xxlarge'),
|
||||
'media_url' => array('title'=> 'Path', 'type' => 'text', 'data'=> 'str', 'inline'=>false, 'thclass' => 'left', 'class'=>'left', 'width' => 'auto', 'writeParms'=>'size=xxlarge'),
|
||||
'media_category' => array('title'=> LAN_CATEGORY, 'type' => 'comma', 'inline'=>false, 'data'=> 'str', 'width' => '10%', 'filter' => true, 'batch' => true, 'class'=>'left'),
|
||||
|
||||
// Upload should be managed completely separately via upload-handler.
|
||||
@@ -820,14 +820,19 @@ class media_admin_ui extends e_admin_ui
|
||||
protected $cats = array();
|
||||
protected $owner = array();
|
||||
protected $ownercats = array();
|
||||
|
||||
|
||||
|
||||
function init()
|
||||
{
|
||||
if(E107_DEBUG_LEVEL > 0)
|
||||
{
|
||||
$this->fields['media_url']['inline'] = true;
|
||||
}
|
||||
|
||||
$sql = e107::getDb();
|
||||
// $sql->db_Select_gen("SELECT media_cat_title, media_title_nick FROM #core_media as m LEFT JOIN #core_media_cat as c ON m.media_category = c.media_cat_owner GROUP BY m.media_category");
|
||||
$sql->db_Select_gen("SELECT media_cat_title, media_cat_owner, media_cat_category FROM #core_media_cat");
|
||||
while($row = $sql->db_Fetch())
|
||||
$sql->gen("SELECT media_cat_title, media_cat_owner, media_cat_category FROM #core_media_cat");
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
$cat = $row['media_cat_category'];
|
||||
$owner = $row['media_cat_owner'];
|
||||
|
@@ -21,11 +21,11 @@ class bb_img extends e_bb_base
|
||||
$safe = array();
|
||||
|
||||
if(vartrue($parms['class'])) $safe['class'] = eHelper::secureClassAttr($parms['class']);
|
||||
if(vartrue($parms['id'])) $safe['id'] = eHelper::secureIdAttr($parms['id']);
|
||||
if(vartrue($parms['id'])) $safe['id'] = eHelper::secureIdAttr($parms['id']);
|
||||
if(vartrue($parms['style'])) $safe['style'] = eHelper::secureStyleAttr($parms['style']);
|
||||
if($safe)
|
||||
{
|
||||
return '[img='.eHelper::buildAttr($safe).']'.$code_text.'[/img]';
|
||||
return '[img '.eHelper::buildAttr($safe).']'.$code_text.'[/img]';
|
||||
}
|
||||
return '[img]'.$code_text.'[/img]';
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class bb_img extends e_bb_base
|
||||
$tp = e107::getParser();
|
||||
|
||||
// Replace the bbcode path with a real one.
|
||||
$code_text = str_replace('{e_MEDIA}','{e_MEDIA_IMAGE}',$code_text); //BC 0.8 fix.
|
||||
$code_text = str_replace('{e_MEDIA}images/','{e_MEDIA_IMAGE}',$code_text); //BC 0.8 fix.
|
||||
$code_text = str_replace('{e_MEDIA_IMAGE}', e_HTTP."thumb.php?src=e_MEDIA_IMAGE/", $code_text);
|
||||
$code_text = str_replace('{e_THEME}', e_HTTP."thumb.php?src=e_THEME/", $code_text);
|
||||
$imgParms = $this->processParm($code_text, $parm);
|
||||
|
Reference in New Issue
Block a user