Index: trunk/admin/install/upgrades/changelog_1_1_4.txt
===================================================================
diff -u -r3271 -r3287
--- trunk/admin/install/upgrades/changelog_1_1_4.txt (.../changelog_1_1_4.txt) (revision 3271)
+++ trunk/admin/install/upgrades/changelog_1_1_4.txt (.../changelog_1_1_4.txt) (revision 3287)
@@ -9,8 +9,12 @@
File in-portal/admin/reviews.php changed
File in-portal/admin/subitems.php changed
File in-portal/admin/tag_listing.php changed
+File in-portal/admin/backup/backup1.php changed
+File in-portal/admin/backup/restore2.php changed
File in-portal/admin/category/addcategory.php changed
+File in-portal/admin/category/addcategory_images.php changed
File in-portal/admin/category/permcacheupdate.php changed
+File in-portal/admin/config/addlang.php changed
File in-portal/admin/config/addtheme_templates.php changed
File in-portal/admin/config/config_theme.php changed
File in-portal/admin/config/edit_label.php changed
@@ -24,15 +28,21 @@
File in-portal/admin/images/toolbar/tool_import.gif is new
File in-portal/admin/images/toolbar/tool_import_f2.gif is new
File in-portal/admin/images/toolbar/tool_import_f3.gif is new
+File in-portal/admin/images/toolbar/tool_rescan_themes.gif is new
+File in-portal/admin/images/toolbar/tool_rescan_themes_f2.gif is new
+File in-portal/admin/images/toolbar/tool_rescan_themes_f3.gif is new
File in-portal/admin/include/mainscript.js changed
File in-portal/admin/include/mainscript.php changed
File in-portal/admin/include/sections.php changed
File in-portal/admin/install/inportal_data.sql changed
File in-portal/admin/install/inportal_schema.sql changed
File in-portal/admin/install/install_lib.php changed
+File in-portal/admin/install/restore_select.php changed
File in-portal/admin/install/langpacks/english.lang changed
File in-portal/admin/install/upgrades/changelog_1_1_3.txt changed
File in-portal/admin/install/upgrades/changelog_1_1_4.txt is new
+File in-portal/admin/install/upgrades/inportal_check_v1.0.10.php changed
+File in-portal/admin/install/upgrades/inportal_check_v1.0.12.php changed
File in-portal/admin/install/upgrades/inportal_check_v1.1.4.php is new
File in-portal/admin/install/upgrades/inportal_upgrade_v1.1.2.sql changed
File in-portal/admin/install/upgrades/inportal_upgrade_v1.1.3.sql changed
@@ -43,7 +53,11 @@
File in-portal/admin/listview/listview.php changed
File in-portal/admin/templates/cat_element.tpl changed
File in-portal/admin/tree/tree.php changed
+File in-portal/admin/users/addgroup.php changed
+File in-portal/admin/users/adduser.php changed
+File in-portal/admin/users/adduser_images.php changed
File in-portal/admin/users/adduser_permissions.php changed
+File in-portal/admin/users/banuser.php changed
File in-portal/admin/users/group_select.php changed
File in-portal/kernel/action.php changed
File in-portal/kernel/frontaction.php changed
@@ -103,9 +117,14 @@
File in-portal/kernel/admin_templates/regional/languages_export.tpl changed
File in-portal/kernel/admin_templates/regional/languages_import.tpl changed
File in-portal/kernel/admin_templates/stylesheets/stylesheets_edit_block.tpl changed
+File in-portal/kernel/include/advsearch.php changed
+File in-portal/kernel/include/cachecount.php changed
File in-portal/kernel/include/category.php changed
+File in-portal/kernel/include/dates.php changed
File in-portal/kernel/include/debugger.php changed
File in-portal/kernel/include/emailmessage.php changed
+File in-portal/kernel/include/error.php changed
+File in-portal/kernel/include/favorites.php changed
File in-portal/kernel/include/item.php changed
File in-portal/kernel/include/itemdb.php changed
File in-portal/kernel/include/itemrating.php changed
@@ -116,11 +135,16 @@
File in-portal/kernel/include/parse.php changed
File in-portal/kernel/include/parseditem.php changed
File in-portal/kernel/include/portaluser.php changed
+File in-portal/kernel/include/statitem.php changed
+File in-portal/kernel/include/syscache.php changed
File in-portal/kernel/include/theme.php changed
+File in-portal/kernel/include/usersession.php changed
+File in-portal/kernel/include/adodb/adodb-time.inc.php changed
File in-portal/kernel/include/adodb/adodb.inc.php changed
File in-portal/kernel/module_help/languages_list.txt is new
File in-portal/kernel/units/categories/categories_config.php changed
File in-portal/kernel/units/categories/categories_event_handler.php changed
+File in-portal/kernel/units/categories/categories_item.php changed
File in-portal/kernel/units/category_items/category_items_config.php changed
File in-portal/kernel/units/custom_values/custom_values_config.php changed
File in-portal/kernel/units/email_events/email_events_event_handler.php changed
@@ -140,27 +164,36 @@
File in-portal/kernel/units/selectors/selectors_config.php changed
File in-portal/kernel/units/selectors/selectors_event_handler.php changed
File in-portal/kernel/units/selectors/selectors_tag_processor.php changed
+File in-portal/kernel/units/stylesheets/stylesheets_item.php changed
+File in-portal/kernel/units/users/users_config.php changed
File in-portal/kernel/units/users/users_event_handler.php changed
File in-portal/kernel/units/users/users_tag_processor.php changed
File in-portal/kernel/units/visits/visits_config.php changed
+File in-portal/kernel/units/visits/visits_event_handler.php changed
File in-portal/themes/default/error_notfound.tpl is new
File in-portal/themes/default/error_template.tpl changed
+File in-portal/themes/default/redirect.tpl is new
+File in-portal/themes/default/blocks/common/redirect.tpl is new
File in-portal/themes/default/categories/catlist_element.tpl changed
File in-portal/themes/default/common/footer.tpl changed
File in-portal/themes/default/lang_select/lang_menu.tpl changed
File in-portal/themes/default/login/login_form.tpl changed
File in-portal/themes/default/misc/right_loggedin.tpl changed
File kernel4_dev/kernel4/application.php changed
File kernel4_dev/kernel4/event_handler.php changed
+File kernel4_dev/kernel4/event_manager.php changed
File kernel4_dev/kernel4/globals.php changed
+File kernel4_dev/kernel4/kbase.php changed
File kernel4_dev/kernel4/startup.php changed
File kernel4_dev/kernel4/db/db_event_handler.php changed
File kernel4_dev/kernel4/db/db_tag_processor.php changed
File kernel4_dev/kernel4/db/dbitem.php changed
File kernel4_dev/kernel4/languages/phrases_cache.php changed
File kernel4_dev/kernel4/parser/template.php changed
+File kernel4_dev/kernel4/parser/template_parser.php changed
File kernel4_dev/kernel4/processors/main_processor.php changed
File kernel4_dev/kernel4/session/session.php changed
+File kernel4_dev/kernel4/utility/adodb-time.inc.php is new
File kernel4_dev/kernel4/utility/debugger.php changed
File kernel4_dev/kernel4/utility/email.php changed
File kernel4_dev/kernel4/utility/formatters.php changed
@@ -188,43 +221,70 @@
Added label "la_prompt_session_cookie_name" of type "1"
Added label "la_promt_ReferrerCheck" of type "1"
Added label "la_ToolTip_Import" of type "1"
+Added label "la_ToolTip_RescanThemes" of type "1"
Added label "lu_error_404_description" of type "0"
Added label "lu_error_404_title" of type "0"
Added label "lu_getting_rated" of type "0"
Added label "lu_getting_rated_text" of type "0"
Added label "lu_redirecting_text" of type "0"
Added label "lu_redirecting_title" of type "0"
Changed event "CATEGORY.ADD.PENDING" of type "0"
-Changed event "USER.PSWD" of type "0"
-Removed event "USER.VALIDATE" of type "1"
-Removed event "USER.ADD.PENDING" of type "0"
-Added event "USER.ADD.PENDING" of type "0"
-Removed event "USER.PSWDC" of type "0"
+Changed event "CATEGORY.MODIFY" of type "1"
+Changed event "USER.VALIDATE" of type "1"
+Changed event "USER.ADD.PENDING" of type "0"
+Changed event "USER.SUBSCRIBE" of type "0"
+Changed event "USER.APPROVE" of type "1"
+Changed event "CATEGORY.ADD" of type "1"
+Changed event "USER.PSWDC" of type "0"
+Changed event "USER.ADD" of type "0"
Changed event "CATEGORY.ADD" of type "0"
Changed event "USER.UNSUBSCRIBE" of type "1"
-Changed event "CATEGORY.ADD.PENDING" of type "0"
-Changed event "USER.PSWDC" of type "0"
-Added event "USER.UNSUBSCRIBE" of type "1"
-Added event "CATEGORY.ADD" of type "0"
-Removed event "CATEGORY.APPROVE" of type "0"
-Changed event "USER.VALIDATE" of type "0"
-Changed event "CATEGORY.APPROVE" of type "1"
-Changed event "CATEGORY.DENY" of type "1"
+Changed event "CATEGORY.DELETE" of type "0"
+Changed event "USER.DENY" of type "0"
+Changed event "CATEGORY.DENY" of type "0"
Changed event "CATEGORY.APPROVE" of type "0"
-Added event "CATEGORY.DENY" of type "1"
-Added event "CATEGORY.APPROVE" of type "1"
+Changed event "CATEGORY.MODIFY" of type "0"
+Changed event "USER.APPROVE" of type "0"
+Changed event "USER.UNSUBSCRIBE" of type "0"
+Changed event "USER.SUGGEST" of type "0"
+Changed event "USER.MEMBERSHIP.EXPIRATION.NOTICE" of type "0"
+Changed event "CATEGORY.DELETE" of type "1"
+Changed event "USER.SUGGEST" of type "1"
+Changed event "USER.SUBSCRIBE" of type "1"
+Changed event "USER.DENY" of type "1"
+Changed event "USER.ADD.PENDING" of type "1"
+Changed event "USER.ADD" of type "1"
+Changed event "USER.MEMBERSHIP.EXPIRED" of type "1"
Added event "CATEGORY.ADD.PENDING" of type "1"
-Added event "USER.VALIDATE" of type "0"
-Added event "USER.ADD" of type "1"
-Added event "USER.DENY" of type "1"
-Removed event "USER.ADD" of type "1"
-Removed event "CATEGORY.ADD.PENDING" of type "1"
-Removed event "USER.DENY" of type "1"
-Removed event "USER.UNSUBSCRIBE" of type "0"
-Removed event "USER.APPROVE" of type "0"
-Removed event "USER.SUGGEST" of type "0"
-Removed event "USER.PSWD" of type "0"
-Added event "USER.SUGGEST" of type "0"
-Added event "USER.UNSUBSCRIBE" of type "0"
-Added event "USER.APPROVE" of type "0"
-Added event "USER.VALIDATE" of type "1"
+Added event "USER.PSWD" of type "1"
+Added event "USER.MEMBERSHIP.EXPIRED" of type "0"
+Changed event "USER.MEMBERSHIP.EXPIRED" of type "0"
+Changed event "USER.PSWD" of type "1"
+Changed event "USER.MEMBERSHIP.EXPIRED" of type "1"
+Changed event "USER.ADD.PENDING" of type "1"
+Changed event "USER.SUBSCRIBE" of type "1"
+Changed event "USER.ADD" of type "1"
+Changed event "USER.SUGGEST" of type "1"
+Changed event "CATEGORY.ADD.PENDING" of type "1"
+Changed event "USER.DENY" of type "1"
+Changed event "USER.UNSUBSCRIBE" of type "0"
+Changed event "USER.APPROVE" of type "0"
+Changed event "CATEGORY.DELETE" of type "1"
+Changed event "USER.SUGGEST" of type "0"
+Changed event "CATEGORY.APPROVE" of type "0"
+Changed event "CATEGORY.MODIFY" of type "0"
+Changed event "CATEGORY.DENY" of type "0"
+Changed event "USER.DENY" of type "0"
+Changed event "CATEGORY.ADD" of type "0"
+Changed event "USER.UNSUBSCRIBE" of type "1"
+Changed event "CATEGORY.DELETE" of type "0"
+Changed event "CATEGORY.ADD.PENDING" of type "0"
+Changed event "USER.PSWDC" of type "0"
+Changed event "USER.ADD" of type "0"
+Changed event "CATEGORY.ADD" of type "1"
+Changed event "USER.APPROVE" of type "1"
+Changed event "USER.ADD.PENDING" of type "0"
+Changed event "USER.MEMBERSHIP.EXPIRATION.NOTICE" of type "0"
+Changed event "CATEGORY.MODIFY" of type "1"
+Changed event "USER.SUBSCRIBE" of type "0"
+Changed event "USER.VALIDATE" of type "1"
Index: trunk/core/kernel/application.php
===================================================================
diff -u -r3282 -r3287
--- trunk/core/kernel/application.php (.../application.php) (revision 3282)
+++ trunk/core/kernel/application.php (.../application.php) (revision 3287)
@@ -61,7 +61,7 @@
* @access private
*/
var $ConfigHash = Array();
-
+
/**
* Reference to debugger
*
@@ -83,7 +83,7 @@
* @var Array
*/
var $ModuleInfo = Array();
-
+
/**
* Holds DBConnection
*
@@ -152,7 +152,7 @@
}
return $found ? $module_info : false;
}
-
+
/**
* Initializes the Application
*
@@ -165,12 +165,12 @@
function Init()
{
if($this->InitDone) return false;
-
+
if( $this->isDebugMode() && dbg_ConstOn('DBG_PROFILE_MEMORY') )
{
$this->Debugger->appendMemoryUsage('Application before Init:');
}
-
+
if( !$this->isDebugMode() && !constOn('DBG_ZEND_PRESENT') )
{
error_reporting(0);
@@ -182,18 +182,18 @@
$error_handler = set_error_handler( Array(&$this,'handleError') );
if($error_handler) $this->errorHandlers[] = $error_handler;
}
-
+
$this->DB = new kDBConnection(SQL_TYPE, Array(&$this,'handleSQLError') );
$this->DB->Connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB);
$this->DB->debugMode = $this->isDebugMode();
$this->ModuleInfo = $this->DB->Query('SELECT * FROM '.TABLE_PREFIX.'Modules ORDER BY LoadOrder', 'Name');
$this->ConfigHash = $this->DB->GetCol('SELECT VariableValue, VariableName FROM '.TABLE_PREFIX.'ConfigurationValues', 'VariableName');
-
+
$rewrite_on = $this->ConfigValue('UseModRewrite');
$admin_on = getArrayValue($_REQUEST, 'admin') || $this->IsAdmin();
define('MOD_REWRITE', ($rewrite_on || constOn('CMS') ) && !$admin_on ? 1 : 0);
-
+
$this->Factory = new kFactory();
$this->registerDefaultClasses();
@@ -229,7 +229,7 @@
$this->SetVar('theme.current_id', $this->GetVar('m_theme') );
if( $this->GetVar('m_cat_id') === false ) $this->SetVar('m_cat_id', 0);
$language =& $this->recallObject( 'lang.current', null, Array('live_table' => true) );
-
+
$this->ValidateLogin(); // TODO: write that method
if( $this->isDebugMode() )
@@ -280,26 +280,26 @@
$this->SetVar('m_theme', $this->GetDefaultThemeId() );
}
}
-
+
function GetDefaultLanguageId()
{
static $language_id = 0;
-
+
if($language_id > 0) return $language_id;
-
+
$table = $this->getUnitOption('lang','TableName');
$id_field = $this->getUnitOption('lang','IDField');
$language_id = $this->DB->GetOne('SELECT '.$id_field.' FROM '.$table.' WHERE PrimaryLang = 1');
-
+
return $language_id;
}
function GetDefaultThemeId()
{
static $theme_id = 0;
-
+
if($theme_id > 0) return $theme_id;
-
+
if ( constOn('DBG_FORCE_THEME') )
{
$theme_id = DBG_FORCE_THEME;
@@ -340,7 +340,7 @@
$this->registerClass('Params', KERNEL_PATH.'/utility/params.php');
$this->registerClass('Params', KERNEL_PATH.'/utility/params.php', 'kFilenamesCache');
-
+
$this->registerClass('HTTPQuery', KERNEL_PATH.'/utility/http_query.php', 'HTTPQuery', Array('Params') );
$this->registerClass('Session', KERNEL_PATH.'/session/session.php');
@@ -373,7 +373,7 @@
$this->registerClass('TemplateParser', KERNEL_PATH.'/parser/template_parser.php');
$this->registerClass('MainProcessor', KERNEL_PATH.'/processors/main_processor.php','m_TagProcessor');
-
+
$this->registerClass('kMultipleFilter', KERNEL_PATH.'/utility/filters.php');
$this->registerClass('kDBList', KERNEL_PATH.'/db/dblist.php');
$this->registerClass('kDBItem', KERNEL_PATH.'/db/dbitem.php');
@@ -413,7 +413,7 @@
}
return $filename;
}
-
+
/**
* Defines default constants if it's not defined before - in config.php
*
@@ -784,7 +784,7 @@
if(!$t) $t = $this->GetVar('t'); // moved from MainProcessor->T()
if( substr($t, -4) == '.tpl' ) $t = substr($t, 0, strlen($t) - 4 );
-
+
if ( $this->IsAdmin() && $prefix == '') $prefix = '/admin';
if ( $this->IsAdmin() && $prefix == '_FRONT_END_') $prefix = '';
$index_file = isset($index_file) ? $index_file : (defined('INDEX_FILE') ? INDEX_FILE : basename($_SERVER['SCRIPT_NAME']));
@@ -831,14 +831,14 @@
$pass = isset($params['pass']) ? $params['pass'] : '';
$pass_events = isset($params['pass_events']) ? $params['pass_events'] : false; // pass events with url
-
+
$map_link = '';
if( isset($params['anchor']) )
{
$map_link = '#'.$params['anchor'];
unset($params['anchor']);
}
-
+
if ( $this->RewriteURLs() )
{
$session =& $this->recallObject('Session');
@@ -855,17 +855,17 @@
return $ret;
}
-
+
function BuildEnv_NEW($t, $params, $pass = 'all', $pass_events = false)
{
// $session =& $this->recallObject('Session');
$force_admin = getArrayValue($params,'admin') || $this->GetVar('admin');
-
+
// if($force_admin) $sid = $this->GetSID();
$ret = '';
$env = '';
-
+
$encode = false;
if (isset($params['__URLENCODE__']))
{
@@ -896,11 +896,11 @@
$env .= ':'.$this->BuildModuleEnv($pass_element, $params, $pass_events);
}
}
-
+
$ret = trim($ret, '/').'.html';
if($env) $params[ENV_VAR_NAME] = ltrim($env, ':');
}
-
+
unset($params['pass'], $params['opener'], $params['m_event']);
if ($force_admin) $params['admin'] = 1;
@@ -909,14 +909,14 @@
$ret = addslashes($ret);
unset($params['escape']);
}
-
+
$params_str = '';
foreach ($params as $param => $value)
{
- $params_str .= '&'.$param.'='.$value;
+ $params_str .= '&'.$param.'='.$value;
}
- $ret .= preg_replace('/^&(.*)/', '?\\1', $params_str);
-
+ $ret .= preg_replace('/^&(.*)/', '?\\1', $params_str);
+
if ($encode) $ret = str_replace('\\', '%5C', $ret);
return $ret;
}
@@ -940,7 +940,7 @@
}
if(!$query_vars) return '';
-
+
$tmp_string = Array(0 => $prefix_special);
foreach($query_vars as $index => $var_name)
{
@@ -962,7 +962,7 @@
}
return $ret;
}
-
+
function BuildEnv($t, $params, $pass='all', $pass_events=false, $env_var=true)
{
$session =& $this->recallObject('Session');
@@ -1007,7 +1007,7 @@
foreach ($params as $param => $value)
{
- $ret .= '&'.$param.'='.$value;
+ $ret .= '&'.$param.'='.$value;
}
if ($encode) $ret = str_replace('\\', '%5C', $ret);
@@ -1036,7 +1036,7 @@
// pass prefixes and special from previous url
$js_redirect = getArrayValue($params, 'js_redirect');
if( isset($params['js_redirect']) ) unset($params['js_redirect']);
-
+
if (!isset($params['pass'])) $params['pass'] = 'all';
$params['__URLENCODE__'] = 1;
$location = $this->HREF($t, $prefix, $params, $index_file);
@@ -1308,7 +1308,7 @@
{
return constOn('MOD_REWRITE');
}
-
+
/**
* Reads unit (specified by $prefix)
* option specified by $option
Index: trunk/core/kernel/utility/debugger.php
===================================================================
diff -u -r3215 -r3287
--- trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 3215)
+++ trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 3287)
@@ -61,6 +61,7 @@
var $Data = Array();
var $ProfilerData = Array();
var $ProfilerTotals = Array();
+ var $ProfilerTotalCount = Array();
var $RecursionStack = Array(); // prevent recursion when processing debug_backtrace() function results
var $TraceNextError=false;
@@ -84,7 +85,7 @@
var $IncludeLevel=0;
var $reportDone = false;
-
+
function Debugger()
{
$this->profileStart('kernel4_startup', 'Startup and Initialization of kernel4');
@@ -176,14 +177,14 @@
{
$traceRec =& $trace[$i];
$argsID = 'trace_args_'.$dataIndex.'_'.$i;
-
+
$has_args = isset($traceRec['args']);
-
+
if(isset($traceRec['file']))
{
$func_name=isset($traceRec['class'])?$traceRec['class'].$traceRec['type'].$traceRec['function']:$traceRec['function'];
$args_link = $has_args ? 'Function' : 'Function';
-
+
$ret .= $args_link.': '.$this->getFileLink($traceRec['file'],$traceRec['line'],$func_name);
$ret .= ' in '.basename($traceRec['file']).' on line '.$traceRec['line'].'
';
}
@@ -222,28 +223,28 @@
$app_class = defined('APPLICATION_CLASS') ? strtolower(APPLICATION_CLASS) : 'kApplication';
return get_class($object) == $app_class;
}
-
+
function processTraceArguments(&$traceArgs)
{
if(!$traceArgs) return '';
-
+
$array_keys = array_keys($traceArgs);
foreach($array_keys as $argID)
{
$argValue =& $traceArgs[$argID];
-
+
if( is_array($argValue) || is_object($argValue) )
{
if(is_object($argValue) && !in_array(get_class($argValue),$this->RecursionStack) )
{
array_push($this->RecursionStack, get_class($argValue));
-
+
if( get_class($argValue) == 'kfactory' || $this->isApplication($argValue) || get_class($argValue) == 'templateparser' )
{
$argValue = null;
continue;
}
-
+
// object & not in stack - ok
settype($argValue,'array');
$this->processTraceArguments($argValue);
@@ -414,7 +415,7 @@
{
$value = htmlspecialchars(print_r($value, true));
}
-
+
$in_cookie = isset($_COOKIE[$key]);
$src = isset($_GET[$key]) && !$in_cookie ? 'GE' : (isset($_POST[$key]) && !$in_cookie ? 'PO' : ($in_cookie ? 'CO' : '?') );
echo '