diff --git a/e107_admin/image.php b/e107_admin/image.php index cd24949ac..8b7b39028 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -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 = ""; } - $text .= $this->renderValue('options',$value,'',$id); + $text = $this->renderValue('options',$value,'',$id); return "
".$text."
"; @@ -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."
oldpath=".$oldpath."
".print_r($upload,TRUE)); + $mes->addDebug("checkDupe(): newpath=".$newpath."
oldpath=".$oldpath."
".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); } diff --git a/e107_handlers/event_class.php b/e107_handlers/event_class.php index 2ae195d33..37b7cbdf9 100644 --- a/e107_handlers/event_class.php +++ b/e107_handlers/event_class.php @@ -11,66 +11,81 @@ if (!defined('e107_INIT')) { exit; } + + class e107_event { var $functions = array(); var $includes = array(); - - protected $coreEvents = array( // used by e_notify admin area. - - 'session' => array( - - 'user_signup_submitted' => NU_LAN_2, - 'user_signup_activated' => NU_LAN_3, - 'login' => NU_LAN_4, - 'logout' => NU_LAN_5, - 'user_xup_login' => 'User social login', - 'user_xup_signup' => 'User social signup', - 'user_ban_flood' => NS_LAN_2, - 'user_ban_failed_login' => 'IP banned for multiple failed login attempts', - 'user_profile_display' => "User views profile" - - ), - - 'administrators' => array( - 'admin_password_update' => "Administrator updates their password", - 'admin_user_created' => 'Administrator creates a new user', - 'admin_user_activated' => "Administrator activates a new user" - - ), - - 'news' => array( - - 'admin_news_created' => NN_LAN_3, - 'admin_news_updated' => NN_LAN_4, - 'admin_news_deleted' => NN_LAN_5, - 'user_news_submit' => NN_LAN_2, - ), - - 'mail' => array( - - 'maildone' => NM_LAN_2, - ), - - 'file' => array( - - // 'fileupload' => NF_LAN_2, - 'user_file_upload' => NF_LAN_2, - ), - - ); - + + 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( + + 'user_signup_submitted' => NU_LAN_2, + 'user_signup_activated' => NU_LAN_3, + 'login' => NU_LAN_4, + 'logout' => NU_LAN_5, + 'user_xup_login' => 'User social login', + 'user_xup_signup' => 'User social signup', + 'user_ban_flood' => NS_LAN_2, + 'user_ban_failed_login' => 'IP banned for multiple failed login attempts', + 'user_profile_display' => "User views profile" + + ), + + 'administrators' => array( + 'admin_password_update' => "Administrator updates their password", + 'admin_user_created' => 'Administrator creates a new user', + 'admin_user_activated' => "Administrator activates a new user" + + ), + + 'news' => array( + + 'admin_news_created' => NN_LAN_3, + 'admin_news_updated' => NN_LAN_4, + 'admin_news_deleted' => NN_LAN_5, + 'user_news_submit' => NN_LAN_2, + ), + + 'mail' => array( + + 'maildone' => NM_LAN_2, + ), + + 'file' => array( + + // 'fileupload' => NF_LAN_2, + 'user_file_upload' => NF_LAN_2, + ), + + ); + + } - '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,8 +134,7 @@ class e107_event /** * Trigger event - * TODO - admin log for failed callback attempts? - * + * * @param string $eventname * @param mixed $data * @return mixed diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index c539371cc..97b137e5e 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -3170,6 +3170,10 @@ class e_form $ttl = $expand.""; $ttl1 = ""; } + else + { + $ttl1 = null; + } $expands = ''.defset($ttl, $ttl).""; $contracts = ''.defset($ttl1, $ttl1).""; @@ -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. { diff --git a/e107_plugins/log/e_meta.php b/e107_plugins/log/e_meta.php index 32823135d..94b710f38 100644 --- a/e107_plugins/log/e_meta.php +++ b/e107_plugins/log/e_meta.php @@ -67,62 +67,62 @@ document.write(' input.length * 8) output += b64pad; - else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F); - } - } - return output; - } - - - - - - var ref =\"\"+escape(top.document.referrer); - var colord = window.screen.colorDepth; - var res = window.screen.width + \"x\" + window.screen.height; - var logString = 'referer=' + ref + '&colour=' + colord + '&eself=' + eself + '&res=' + res + '".$err_flag."'; - logString = rstr2b64(logString); - - var url = '".SITEURLBASE.e_PLUGIN_ABS."log/log.php'; - var dataText = 'lv='+logString; - - $.ajax({ - type: 'get', - url: url, - data: {'lv' :logString}, - success: function(e) { - if(e) - { - alert(e); - } - } - }); -}); -"; - - - if(USER_AREA) { + $logJS = " + + $(function() { + + function rstr2b64(input) + { + var b64pad = \"=\"; /* base-64 pad character. \"=\" for strict RFC compliance */ + var tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"; + var output = \"\"; + var len = input.length; + for(var i = 0; i < len; i += 3) + { + var triplet = (input.charCodeAt(i) << 16) + | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0) + | (i + 2 < len ? input.charCodeAt(i+2) : 0); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > input.length * 8) output += b64pad; + else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F); + } + } + return output; + } + + + + + + var ref =\"\"+escape(top.document.referrer); + var colord = window.screen.colorDepth; + var res = window.screen.width + \"x\" + window.screen.height; + var logString = 'referer=' + ref + '&colour=' + colord + '&eself=' + eself + '&res=' + res + '".$err_flag."'; + logString = rstr2b64(logString); + + var url = '".SITEURLBASE.e_PLUGIN_ABS."log/log.php'; + var dataText = 'lv='+logString; + + $.ajax({ + type: 'get', + url: url, + data: {'lv' :logString}, + success: function(e) { + if(e) + { + alert(e); + } + } + }); + }); + "; + + + + e107::js('footer-inline', $logJS, 'jquery'); } }