mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 22:27:34 +02:00
Fixes #905 and other PHP notices.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if($_GET['action'] == 'dialog')
|
||||
if(!empty($_GET['action']) && $_GET['action'] == 'dialog')
|
||||
{
|
||||
define('e_MINIMAL',true);
|
||||
}
|
||||
@@ -431,7 +431,7 @@ class media_form_ui extends e_admin_form_ui
|
||||
*/
|
||||
public function resizeImage($oldpath,$img_import_w,$img_import_h)
|
||||
{
|
||||
|
||||
$mes = e107::getMessage();
|
||||
try
|
||||
{
|
||||
$thumb = PhpThumbFactory::create($oldpath);
|
||||
@@ -584,7 +584,7 @@ class media_form_ui extends e_admin_form_ui
|
||||
$text = "<input type='button' value='Select' data-placement='left' class='e-media-select e-dialog-save e-dialog-close btn btn-primary btn-large' data-id='{$id}' data-name=\"".$title."\" data-type='file' data-target='{$tagid}' data-bbcode='{$bbcode}' data-path='{$path}' data-preview='{$preview}' title=\"".$title."\" />";
|
||||
}
|
||||
|
||||
$text .= $this->renderValue('options',$value,'',$id);
|
||||
$text = $this->renderValue('options',$value,'',$id);
|
||||
|
||||
return "<div class='nowrap'>".$text."</div>";
|
||||
|
||||
@@ -1861,7 +1861,7 @@ class media_admin_ui extends e_admin_ui
|
||||
$tp = e107::getParser();
|
||||
$f = e107::getFile()->get_file_info($oldpath,TRUE);
|
||||
|
||||
$mes->addDebug("checkDupe(): newpath=".$newpath."<br />oldpath=".$oldpath."<br />".print_r($upload,TRUE));
|
||||
$mes->addDebug("checkDupe(): newpath=".$newpath."<br />oldpath=".$oldpath."<br />".print_r($newpath,TRUE));
|
||||
if(file_exists($newpath) || e107::getDb()->db_Select("core_media","*","media_url = '".$tp->createConstants($newpath,'rel')."' LIMIT 1") )
|
||||
{
|
||||
$mes->addWarning($newpath." already exists.");
|
||||
@@ -2023,7 +2023,7 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
// $waterMarkPath = e_THEME.e107::getPref('sitetheme')."/images/watermark.png"; // Now performed site-wide dynamically.
|
||||
|
||||
if(is_readable($waterMarkPath))
|
||||
// if(is_readable($waterMarkPath))
|
||||
{
|
||||
// $text .= $frm->checkbox_label("Add Watermark", 'batch_import_watermark',1);
|
||||
}
|
||||
|
@@ -11,12 +11,34 @@
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
|
||||
class e107_event
|
||||
{
|
||||
var $functions = array();
|
||||
var $includes = array();
|
||||
|
||||
protected $coreEvents = array( // used by e_notify admin area.
|
||||
protected $coreEvents;
|
||||
|
||||
protected $oldCoreEvents = array(
|
||||
|
||||
'usersup' => 'user_signup_submitted',
|
||||
'userveri' => 'user_signup_activated',
|
||||
'flood' => 'user_ban_flood',
|
||||
'subnews' => 'user_news_submit',
|
||||
'fileupload' => 'user_file_upload',
|
||||
'newspost' => 'admin_news_created',
|
||||
'newsupd' => 'admin_news_updated',
|
||||
'newsdel' => 'admin_news_deleted'
|
||||
);
|
||||
|
||||
|
||||
function __construct()
|
||||
{
|
||||
|
||||
// e107::lan('core','notify'); //FIXME e_LANGUAGE is not defined at this point.
|
||||
|
||||
$this->coreEvents = array( // used by e_notify admin area.
|
||||
|
||||
'session' => array(
|
||||
|
||||
@@ -60,17 +82,10 @@ class e107_event
|
||||
|
||||
);
|
||||
|
||||
protected $oldCoreEvents = array(
|
||||
}
|
||||
|
||||
|
||||
|
||||
'usersup' => 'user_signup_submitted',
|
||||
'userveri' => 'user_signup_activated',
|
||||
'flood' => 'user_ban_flood',
|
||||
'subnews' => 'user_news_submit',
|
||||
'fileupload' => 'user_file_upload',
|
||||
'newspost' => 'admin_news_created',
|
||||
'newsupd' => 'admin_news_updated',
|
||||
'newsdel' => 'admin_news_deleted'
|
||||
);
|
||||
|
||||
|
||||
function coreList()
|
||||
@@ -119,7 +134,6 @@ class e107_event
|
||||
|
||||
/**
|
||||
* Trigger event
|
||||
* TODO - admin log for failed callback attempts?
|
||||
*
|
||||
* @param string $eventname
|
||||
* @param mixed $data
|
||||
|
@@ -3170,6 +3170,10 @@ class e_form
|
||||
$ttl = $expand."<button class='btn btn-default btn-mini pull-right'>More..</button>";
|
||||
$ttl1 = "<button class='btn btn-default btn-mini pull-right'>..Less</button>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$ttl1 = null;
|
||||
}
|
||||
|
||||
$expands = '<a href="#'.$elid.'-expand" class="e-show-if-js e-expandit">'.defset($ttl, $ttl)."</a>";
|
||||
$contracts = '<a href="#'.$elid.'-expand" class="e-show-if-js e-expandit">'.defset($ttl1, $ttl1)."</a>";
|
||||
@@ -3266,7 +3270,7 @@ class e_form
|
||||
// Support readParms example: thumb={width}
|
||||
if(!isset($parms['w']) && is_numeric($parms['thumb']) && '1' != $parms['thumb'])
|
||||
{
|
||||
$thparms['w'] = intval($thumb);
|
||||
$thparms['w'] = intval($parms['thumb']);
|
||||
}
|
||||
elseif(vartrue($parms['thumb_aw'])) // Legacy v2.
|
||||
{
|
||||
|
@@ -67,10 +67,11 @@ document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"".e_PLUGIN_ABS
|
||||
";
|
||||
|
||||
*/
|
||||
if(USER_AREA)
|
||||
{
|
||||
$logJS = "
|
||||
|
||||
$logJS = "
|
||||
|
||||
$(function() {
|
||||
$(function() {
|
||||
|
||||
function rstr2b64(input)
|
||||
{
|
||||
@@ -116,13 +117,12 @@ $(function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
";
|
||||
});
|
||||
";
|
||||
|
||||
|
||||
|
||||
|
||||
if(USER_AREA)
|
||||
{
|
||||
e107::js('footer-inline', $logJS, 'jquery');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user