mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Quick media-manager fix.
This commit is contained in:
@@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_admin/update_routines.php,v $
|
||||
| $Revision: 1.68 $
|
||||
| $Date: 2009-12-10 21:26:53 $
|
||||
| $Author: e107steved $
|
||||
| $Revision: 1.69 $
|
||||
| $Date: 2009-12-11 00:36:24 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -1084,10 +1084,10 @@ function addIndexToTable($target, $indexSpec, $just_check, &$updateMessages, $op
|
||||
*/
|
||||
function catch_error(&$target)
|
||||
{
|
||||
if (vartrue($target->mySQLlastErrText) && E107_DEBUG_LEVEL != 0)
|
||||
if (vartrue($target->getLastErrText()) && E107_DEBUG_LEVEL != 0)
|
||||
{
|
||||
$tmp2 = debug_backtrace();
|
||||
$tmp = $target->mySQLlastErrText;
|
||||
$tmp = $target->getLastErrText();
|
||||
echo $tmp." [ ".basename(__FILE__)." on line ".$tmp2[0]['line']."] <br />";
|
||||
}
|
||||
return;
|
||||
|
@@ -9,9 +9,9 @@
|
||||
* Form Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $
|
||||
* $Revision: 1.94 $
|
||||
* $Date: 2009-12-09 18:33:41 $
|
||||
* $Author: secretr $
|
||||
* $Revision: 1.95 $
|
||||
* $Date: 2009-12-11 00:36:25 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -121,6 +121,23 @@ class e_form
|
||||
//FIXME - use the media-manager as an image selector.
|
||||
function imagepicker($name, $default, $label = '', $sc_parameters = '')
|
||||
{
|
||||
// Temporary Fix for using Media-Manager data
|
||||
|
||||
$sql = e107::getDb();
|
||||
if($sql->db_Select('core_media','*',"media_userclass IN (".USERCLASS_LIST.") ORDER BY media_name"))
|
||||
{
|
||||
while($row = $sql->db_Fetch())
|
||||
{
|
||||
$opts[$row['media_category']][$row['media_url']] = $row['media_name']. " (".$row['media_dimensions'].") ";
|
||||
}
|
||||
|
||||
asort($opts);
|
||||
|
||||
return $this->selectbox($name,$opts,$default, array('default'=>' '));
|
||||
}
|
||||
|
||||
// ----------------
|
||||
|
||||
if(is_string($sc_parameters)) parse_str($sc_parameters, $sc_parameters);
|
||||
if(!$label) $label = LAN_SELECT;
|
||||
$parms = "name={$name}";
|
||||
@@ -419,6 +436,14 @@ class e_form
|
||||
return "<select name='{$name}'".$this->get_attributes($options, $name).">";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param object $name
|
||||
* @param object $option_array
|
||||
* @param object $selected [optional]
|
||||
* @param object $options [optional]
|
||||
* @return
|
||||
*/
|
||||
function selectbox($name, $option_array, $selected = false, $options = array())
|
||||
{
|
||||
if($option_array == 'yesno')
|
||||
|
@@ -9,9 +9,9 @@
|
||||
* Featurebox Item model
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/includes/item.php,v $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2009-12-10 22:46:45 $
|
||||
* $Author: secretr $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2009-12-11 00:36:30 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -86,6 +86,11 @@ class plugin_featurebox_item extends e_model
|
||||
$tp = e107::getParser();
|
||||
|
||||
$src = $tp->replaceConstants($this->get('fb_image'), 'full');
|
||||
|
||||
|
||||
//FIXME - doesn't display anything that uses {e_MEDIA} in the path.
|
||||
|
||||
|
||||
if(isset($parm['src']))
|
||||
{
|
||||
return $src;
|
||||
|
Reference in New Issue
Block a user