mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Minor fixes and improvements
This commit is contained in:
parent
4908a3fe37
commit
f7532e6351
@ -1879,7 +1879,9 @@ class e_parse
|
||||
$e107->site_theme ? $e107->getFolder('themes').$e107->site_theme.'/' : '',
|
||||
defset('THEME_ABS'),
|
||||
(ADMIN ? $e107->getFolder('admin') : ''),
|
||||
''
|
||||
'',
|
||||
$e107->getFolder('core'),
|
||||
$e107->getFolder('system'),
|
||||
);
|
||||
|
||||
switch ($mode)
|
||||
@ -1908,7 +1910,9 @@ class e_parse
|
||||
defset('THEME_ABS'),
|
||||
defset('THEME_ABS'),
|
||||
(ADMIN ? e_ADMIN_ABS : ''),
|
||||
$e107->server_path
|
||||
$e107->server_path,
|
||||
'', // no e_CORE absolute path
|
||||
'', // no e_SYSTEM absolute path
|
||||
);
|
||||
break;
|
||||
|
||||
@ -1936,7 +1940,9 @@ class e_parse
|
||||
defset('THEME_ABS') ? SITEURLBASE.THEME_ABS : '',
|
||||
defset('THEME_ABS') ? SITEURLBASE.THEME_ABS : '',
|
||||
(ADMIN ? SITEURLBASE.e_ADMIN_ABS : ''),
|
||||
SITEURL
|
||||
SITEURL,
|
||||
'', // no e_CORE absolute path
|
||||
'', // no e_SYSTEM absolute path
|
||||
);
|
||||
break;
|
||||
}
|
||||
@ -1965,6 +1971,8 @@ class e_parse
|
||||
"{THEME_ABS}",
|
||||
"{e_ADMIN}",
|
||||
"{e_BASE}",
|
||||
"{e_CORE}",
|
||||
"{e_SYSTEM}",
|
||||
);
|
||||
|
||||
/*if (ADMIN)
|
||||
|
@ -545,6 +545,11 @@ class e_form
|
||||
$for_id = $this->_format_id('', $name, $value, 'for');
|
||||
return "<label$for_id>{$text}</label>";
|
||||
}
|
||||
|
||||
function help($text)
|
||||
{
|
||||
return !empty($text) ? '<div class="field-help">'.$text.'</div>' : '';
|
||||
}
|
||||
|
||||
function select_open($name, $options = array())
|
||||
{
|
||||
|
@ -17,6 +17,7 @@ if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
/*
|
||||
* Type defines
|
||||
* XXX - convert to eMessage class constants
|
||||
*/
|
||||
define('E_MESSAGE_INFO', 'info');
|
||||
define('E_MESSAGE_SUCCESS', 'success');
|
||||
@ -62,7 +63,7 @@ class eMessage
|
||||
*
|
||||
* @var eMessage
|
||||
*/
|
||||
protected static $_instance = null;
|
||||
//protected static $_instance = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -72,11 +73,11 @@ class eMessage
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function __construct()
|
||||
public function __construct()
|
||||
{
|
||||
//if(!session_id()) session_start();
|
||||
|
||||
require_once(e_HANDLER.'e107_class.php');
|
||||
// require_once(e_HANDLER.'e107_class.php');
|
||||
$this->_session_id = '_system_messages';
|
||||
|
||||
$this->reset()->mergeWithSession();
|
||||
@ -86,22 +87,21 @@ class eMessage
|
||||
* Cloning is not allowed
|
||||
*
|
||||
*/
|
||||
private function __clone()
|
||||
{
|
||||
}
|
||||
// private function __clone()
|
||||
// {
|
||||
// }
|
||||
|
||||
/**
|
||||
* Get singleton instance (php4 no more supported)
|
||||
*
|
||||
* Singleton is not required, we go for factory instead
|
||||
* @return eMessage
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
if(null == self::$_instance)
|
||||
{
|
||||
self::$_instance = new self();
|
||||
}
|
||||
return self::$_instance;
|
||||
// if(null == self::$_instance)
|
||||
// {
|
||||
// self::$_instance = new self();
|
||||
// }
|
||||
return e107::getMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -272,7 +272,7 @@ class e_db_mysql
|
||||
{
|
||||
echo "** $query<br />\n";
|
||||
}
|
||||
if ($debug !== FALSE || strstr(e_QUERY, 'showsql'))
|
||||
if ($debug !== FALSE || strstr($_SERVER['QUERY_STRING'], 'showsql'))
|
||||
{
|
||||
$queryinfo[] = "<b>{$qry_from}</b>: $query";
|
||||
}
|
||||
|
@ -88,9 +88,11 @@ class e_online
|
||||
|
||||
$online_warncount = $online_bancount * 0.9; // Set warning threshold at 90% of ban threshold
|
||||
//TODO Add support for all queries.
|
||||
$page = (strpos(e_SELF, 'forum_') !== FALSE) ? e_SELF.'.'.e_QUERY : e_SELF;
|
||||
$page = (strpos(e_SELF, 'comment') !== FALSE) ? e_SELF.'.'.e_QUERY : $page;
|
||||
$page = (strpos(e_SELF, 'content') !== FALSE) ? e_SELF.'.'.e_QUERY : $page;
|
||||
// $page = (strpos(e_SELF, 'forum_') !== FALSE) ? e_SELF.'.'.e_QUERY : e_SELF;
|
||||
// $page = (strpos(e_SELF, 'comment') !== FALSE) ? e_SELF.'.'.e_QUERY : $page;
|
||||
// $page = (strpos(e_SELF, 'content') !== FALSE) ? e_SELF.'.'.e_QUERY : $page;
|
||||
$page = e_REQUEST_URI; // mod rewrite & single entry support
|
||||
// FIXME parse url, trigger registered e_online callbacks
|
||||
$page = $e107->tp->toDB($page, true); /// @todo - try not to use toDB() - triggers prefilter
|
||||
$ip = $e107->getip();
|
||||
$udata = ($user->isUser() ? $user->getId().'.'.$user->getName() : '0');
|
||||
|
Loading…
x
Reference in New Issue
Block a user