Index: trunk/core/kernel/utility/http_query.php
===================================================================
diff -u -r4614 -r4636
--- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4614)
+++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4636)
@@ -89,7 +89,7 @@
function Init($prefix, $special)
{
$this->AddAllVars();
-
+
$this->specialsToRemove = $this->Get('remove_specials');
if($this->specialsToRemove)
{
@@ -775,6 +775,32 @@
}
return $ret;
}
+
+ function writeRequestLog($filename)
+ {
+ $folder_path = dirname(FULL_PATH.'/'.$filename);
+ if (is_writable($folder_path)) {
+ $fp = fopen(FULL_PATH.'/'.$filename, 'a');
+ if ($fp) {
+ $session =& $this->Application->recallObject('Session');
+ $user_id = $session->GetField('PortalUserId');
+ $admin_mark = $this->Application->IsAdmin() ? 'ADMIN' : 'FRONT';
+
+ $data = '['.date('D M d H:i:s Y').'] '.$admin_mark.'; ip: '.$_SERVER['REMOTE_ADDR'].'; user_id: '.$user_id.'; sid: '.$this->Application->GetSID().'; request: '."\n";
+ $data .= "_GET:\n".print_r($this->Get, true)."_POST:\n".print_r($this->Post, true)."_COOKIE:\n".print_r($this->Cookie, true)."\n".str_repeat('=', 100)."\n";
+
+ fwrite($fp, $data);
+ fclose($fp);
+ }
+ else {
+ trigger_error('Requrest Log directory not writable', E_USER_WARNING);
+ }
+ }
+ else {
+ trigger_error('Requrest Log directory not writable', E_USER_WARNING);
+ }
+ }
+
}
?>
\ No newline at end of file
Index: trunk/core/units/groups/groups_config.php
===================================================================
diff -u -r4625 -r4636
--- trunk/core/units/groups/groups_config.php (.../groups_config.php) (revision 4625)
+++ trunk/core/units/groups/groups_config.php (.../groups_config.php) (revision 4636)
@@ -42,7 +42,7 @@
'groups_select' => Array('prefixes' => Array('g_List'), 'format' => "!la_title_Groups! (#g_recordcount#) - !la_title_SelectGroup!"),
),
- 'Section' => 'in-portal:user_groups',
+ 'PermSection' => 'in-portal:user_groups',
'Sections' => Array(
'in-portal:user_groups' => Array(
Index: trunk/core/units/categories/categories_config.php
===================================================================
diff -u -r4620 -r4636
--- trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 4620)
+++ trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 4636)
@@ -98,7 +98,7 @@
'icon' => 'cat_settings',
'label' => 'la_tab_Settings',
'url' => Array('index_file' => 'config/edit_config.php', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit'),
+ 'permissions' => Array('view', 'edit'),
'priority' => 4,
'type' => stTREE,
),
@@ -108,7 +108,7 @@
'icon' => 'settings_search',
'label' => 'la_tab_ConfigSearch',
'url' => Array('t' => 'config/config_search', 'index_file' => 'index4.php', 'module_key' => 'category', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit'),
+ 'permissions' => Array('view', 'edit'),
'priority' => 5,
'type' => stTREE,
),
@@ -118,7 +118,7 @@
'icon' => 'settings_email',
'label' => 'la_tab_ConfigE-mail',
'url' => Array('index_file' => 'config/module_email.php', 'module' => 'In-Portal:Category', 'pass_section' => true, 'lpn' => 1, 'pass' => 'm'),
- 'permissions' => Array('view'),
+ 'permissions' => Array('view', 'edit'),
'priority' => 6,
'type' => stTREE,
),
Index: trunk/core/units/admin/admin_config.php
===================================================================
diff -u -r4625 -r4636
--- trunk/core/units/admin/admin_config.php (.../admin_config.php) (revision 4625)
+++ trunk/core/units/admin/admin_config.php (.../admin_config.php) (revision 4636)
@@ -129,7 +129,7 @@
'icon' => 'modules',
'label' => 'la_title_Module_Status',
'url' => Array('t' => 'modules/modules_list', 'index_file' => 'index4.php', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit'),
+ 'permissions' => Array('view', 'edit', 'advanced:approve', 'advanced:decline'),
'priority' => 1,
'type' => stTREE,
),
Index: trunk/kernel/units/groups/groups_config.php
===================================================================
diff -u -r4625 -r4636
--- trunk/kernel/units/groups/groups_config.php (.../groups_config.php) (revision 4625)
+++ trunk/kernel/units/groups/groups_config.php (.../groups_config.php) (revision 4636)
@@ -42,7 +42,7 @@
'groups_select' => Array('prefixes' => Array('g_List'), 'format' => "!la_title_Groups! (#g_recordcount#) - !la_title_SelectGroup!"),
),
- 'Section' => 'in-portal:user_groups',
+ 'PermSection' => 'in-portal:user_groups',
'Sections' => Array(
'in-portal:user_groups' => Array(
Index: trunk/kernel/units/categories/categories_config.php
===================================================================
diff -u -r4620 -r4636
--- trunk/kernel/units/categories/categories_config.php (.../categories_config.php) (revision 4620)
+++ trunk/kernel/units/categories/categories_config.php (.../categories_config.php) (revision 4636)
@@ -98,7 +98,7 @@
'icon' => 'cat_settings',
'label' => 'la_tab_Settings',
'url' => Array('index_file' => 'config/edit_config.php', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit'),
+ 'permissions' => Array('view', 'edit'),
'priority' => 4,
'type' => stTREE,
),
@@ -108,7 +108,7 @@
'icon' => 'settings_search',
'label' => 'la_tab_ConfigSearch',
'url' => Array('t' => 'config/config_search', 'index_file' => 'index4.php', 'module_key' => 'category', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit'),
+ 'permissions' => Array('view', 'edit'),
'priority' => 5,
'type' => stTREE,
),
@@ -118,7 +118,7 @@
'icon' => 'settings_email',
'label' => 'la_tab_ConfigE-mail',
'url' => Array('index_file' => 'config/module_email.php', 'module' => 'In-Portal:Category', 'pass_section' => true, 'lpn' => 1, 'pass' => 'm'),
- 'permissions' => Array('view'),
+ 'permissions' => Array('view', 'edit'),
'priority' => 6,
'type' => stTREE,
),
Index: trunk/kernel/units/admin/admin_config.php
===================================================================
diff -u -r4625 -r4636
--- trunk/kernel/units/admin/admin_config.php (.../admin_config.php) (revision 4625)
+++ trunk/kernel/units/admin/admin_config.php (.../admin_config.php) (revision 4636)
@@ -129,7 +129,7 @@
'icon' => 'modules',
'label' => 'la_title_Module_Status',
'url' => Array('t' => 'modules/modules_list', 'index_file' => 'index4.php', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit'),
+ 'permissions' => Array('view', 'edit', 'advanced:approve', 'advanced:decline'),
'priority' => 1,
'type' => stTREE,
),
Index: trunk/kernel/units/languages/languages_event_handler.php
===================================================================
diff -u -r4625 -r4636
--- trunk/kernel/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 4625)
+++ trunk/kernel/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 4636)
@@ -5,7 +5,7 @@
function mapPermissions()
{
parent::mapPermissions();
- $this->permMapping['OnChangeLanguage'] = Array('self' => 'view');
+ $this->permMapping['OnChangeLanguage'] = Array('self' => true);
}
Index: trunk/core/units/languages/languages_event_handler.php
===================================================================
diff -u -r4625 -r4636
--- trunk/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 4625)
+++ trunk/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 4636)
@@ -5,7 +5,7 @@
function mapPermissions()
{
parent::mapPermissions();
- $this->permMapping['OnChangeLanguage'] = Array('self' => 'view');
+ $this->permMapping['OnChangeLanguage'] = Array('self' => true);
}
Index: trunk/core/units/languages/languages_config.php
===================================================================
diff -u -r4625 -r4636
--- trunk/core/units/languages/languages_config.php (.../languages_config.php) (revision 4625)
+++ trunk/core/units/languages/languages_config.php (.../languages_config.php) (revision 4636)
@@ -88,7 +88,7 @@
'format' => "#lang_status# '#lang_titlefield#' - !la_title_EditingEmailEvent! '#emailmessages_titlefield#'"),
),
- 'Section' => 'in-portal:configure_lang',
+ 'PermSection' => 'in-portal:configure_lang',
'Sections' => Array(
'in-portal:configure_lang' => Array(
Index: trunk/kernel/units/languages/languages_config.php
===================================================================
diff -u -r4625 -r4636
--- trunk/kernel/units/languages/languages_config.php (.../languages_config.php) (revision 4625)
+++ trunk/kernel/units/languages/languages_config.php (.../languages_config.php) (revision 4636)
@@ -88,7 +88,7 @@
'format' => "#lang_status# '#lang_titlefield#' - !la_title_EditingEmailEvent! '#emailmessages_titlefield#'"),
),
- 'Section' => 'in-portal:configure_lang',
+ 'PermSection' => 'in-portal:configure_lang',
'Sections' => Array(
'in-portal:configure_lang' => Array(
Index: trunk/core/admin_templates/groups/groups_edit_permissions.tpl
===================================================================
diff -u -r4625 -r4636
--- trunk/core/admin_templates/groups/groups_edit_permissions.tpl (.../groups_edit_permissions.tpl) (revision 4625)
+++ trunk/core/admin_templates/groups/groups_edit_permissions.tpl (.../groups_edit_permissions.tpl) (revision 4636)
@@ -90,7 +90,7 @@
" alt="" border="0"/>
- []
+ [, ]
Index: trunk/core/kernel/application.php
===================================================================
diff -u -r4627 -r4636
--- trunk/core/kernel/application.php (.../application.php) (revision 4627)
+++ trunk/core/kernel/application.php (.../application.php) (revision 4636)
@@ -1323,6 +1323,11 @@
$user =& $this->recallObject('u');
$user->SetError('ValidateLogin', 'session_expired', 'la_text_sess_expired');
}
+
+ if (($user_id != -2) && constOn('DBG_REQUREST_LOG') ) {
+ $http_query =& $this->recallObject('HTTPQuery');
+ $http_query->writeRequestLog(DBG_REQUREST_LOG);
+ }
}
/**
Index: trunk/kernel/admin_templates/groups/groups_edit_permissions.tpl
===================================================================
diff -u -r4625 -r4636
--- trunk/kernel/admin_templates/groups/groups_edit_permissions.tpl (.../groups_edit_permissions.tpl) (revision 4625)
+++ trunk/kernel/admin_templates/groups/groups_edit_permissions.tpl (.../groups_edit_permissions.tpl) (revision 4636)
@@ -90,7 +90,7 @@
" alt="" border="0"/>
- []
+ [, ]
Index: trunk/core/units/users/users_config.php
===================================================================
diff -u -r4625 -r4636
--- trunk/core/units/users/users_config.php (.../users_config.php) (revision 4625)
+++ trunk/core/units/users/users_config.php (.../users_config.php) (revision 4636)
@@ -81,7 +81,7 @@
),
- 'Section' => 'in-portal:user_list',
+ 'PermSection' => 'in-portal:user_list',
'Sections' => Array(
'in-portal:users' => Array(
@@ -109,7 +109,7 @@
'icon' => 'users_settings',
'label' => 'la_tab_ConfigSettings',
'url' => Array('index_file' => 'config/edit_config.php', 'module' => 'In-Portal:Users', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit'),
+ 'permissions' => Array('view', 'edit'),
'priority' => 3,
'type' => stTREE,
),
@@ -119,7 +119,7 @@
'icon' => 'settings_email',
'label' => 'la_tab_ConfigE-mail',
'url' => Array('index_file' => 'config/module_email.php', 'module' => 'In-Portal:Users', 'pass_section' => true, 'lpn' => 1, 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit'),
+ 'permissions' => Array('view', 'edit'),
'priority' => 4,
'type' => stTREE,
),
Index: trunk/kernel/units/users/users_config.php
===================================================================
diff -u -r4625 -r4636
--- trunk/kernel/units/users/users_config.php (.../users_config.php) (revision 4625)
+++ trunk/kernel/units/users/users_config.php (.../users_config.php) (revision 4636)
@@ -81,7 +81,7 @@
),
- 'Section' => 'in-portal:user_list',
+ 'PermSection' => 'in-portal:user_list',
'Sections' => Array(
'in-portal:users' => Array(
@@ -109,7 +109,7 @@
'icon' => 'users_settings',
'label' => 'la_tab_ConfigSettings',
'url' => Array('index_file' => 'config/edit_config.php', 'module' => 'In-Portal:Users', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit'),
+ 'permissions' => Array('view', 'edit'),
'priority' => 3,
'type' => stTREE,
),
@@ -119,7 +119,7 @@
'icon' => 'settings_email',
'label' => 'la_tab_ConfigE-mail',
'url' => Array('index_file' => 'config/module_email.php', 'module' => 'In-Portal:Users', 'pass_section' => true, 'lpn' => 1, 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit'),
+ 'permissions' => Array('view', 'edit'),
'priority' => 4,
'type' => stTREE,
),
Index: trunk/core/kernel/db/db_event_handler.php
===================================================================
diff -u -r4630 -r4636
--- trunk/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 4630)
+++ trunk/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 4636)
@@ -105,6 +105,9 @@
'OnRemoveFilters' => Array('self' => 'view', 'subitem' => 'view'),
'OnSetPerPage' => Array('self' => 'view', 'subitem' => 'view'),
+
+ 'OnSearch' => Array('self' => 'view', 'subitem' => 'view'),
+ 'OnSearchReset' => Array('self' => 'view', 'subitem' => 'view'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
Index: trunk/core/units/configuration/configuration_config.php
===================================================================
diff -u -r4446 -r4636
--- trunk/core/units/configuration/configuration_config.php (.../configuration_config.php) (revision 4446)
+++ trunk/core/units/configuration/configuration_config.php (.../configuration_config.php) (revision 4636)
@@ -42,7 +42,7 @@
'VariableName' => Array('type' => 'string','not_null' => '1','default' => ''),
'VariableValue' => array('type'=>'string', 'default'=>''),
'ModuleOwner' => array('type'=>'string', 'default'=>'In-Portal'),
- 'Section' => array('type'=>'string','not_null' => '1','default'=>''),
+ 'PermSection' => array('type'=>'string','not_null' => '1','default'=>''),
),
'VirtualFields' => Array(
Index: trunk/core/kernel/utility/event.php
===================================================================
diff -u -r4627 -r4636
--- trunk/core/kernel/utility/event.php (.../event.php) (revision 4627)
+++ trunk/core/kernel/utility/event.php (.../event.php) (revision 4636)
@@ -283,7 +283,7 @@
function getSection()
{
$main_prefix = $this->Application->GetTopmostPrefix($this->Prefix);
- $section = $this->Application->getUnitOption($main_prefix, 'Section');
+ $section = $this->Application->getUnitOption($main_prefix, 'PermSection');
if (!$section) {
trigger_error('Permission section not specified for prefix '.$main_prefix.'', E_USER_ERROR);
Index: trunk/kernel/units/configuration/configuration_config.php
===================================================================
diff -u -r4446 -r4636
--- trunk/kernel/units/configuration/configuration_config.php (.../configuration_config.php) (revision 4446)
+++ trunk/kernel/units/configuration/configuration_config.php (.../configuration_config.php) (revision 4636)
@@ -42,7 +42,7 @@
'VariableName' => Array('type' => 'string','not_null' => '1','default' => ''),
'VariableValue' => array('type'=>'string', 'default'=>''),
'ModuleOwner' => array('type'=>'string', 'default'=>'In-Portal'),
- 'Section' => array('type'=>'string','not_null' => '1','default'=>''),
+ 'PermSection' => array('type'=>'string','not_null' => '1','default'=>''),
),
'VirtualFields' => Array(
Index: trunk/core/kernel/processors/main_processor.php
===================================================================
diff -u -r4590 -r4636
--- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 4590)
+++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 4636)
@@ -701,7 +701,7 @@
$has_permission = true;
foreach($permissions as $permission)
{
- $has_permission = $has_permission && $this->Application->CheckPermission($permission);
+ $has_permission = $has_permission && $this->Application->CheckPermission($permission, 0);
}
$group_has_permission = $group_has_permission || $has_permission;