Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sat, Feb 1, 2:46 PM

in-portal

Index: trunk/kernel/units/configuration/configuration_config.php
===================================================================
--- trunk/kernel/units/configuration/configuration_config.php (revision 1555)
+++ trunk/kernel/units/configuration/configuration_config.php (nonexistent)
@@ -1,52 +0,0 @@
-<?php
-
-$config = Array(
- 'Prefix' => 'conf',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ConfigurationEventHandler','file'=>'configuration_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ConfigurationTagProcessor','file'=>'configuration_tag_processor.php','build_event'=>'OnBuild'),
- 'AutoLoad' => true,
- 'hooks' => Array(),
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'module',
- 5 => 'section',
- ),
- 'IDField' => 'VariableName',
-
- 'TitlePresets' => Array(
- 'config_list' => Array('prefixes' => Array('conf_List'), 'format' => "!la_updating_config!"),
- ),
-
- 'TableName' => TABLE_PREFIX.'ConfigurationValues',
- 'ListSQLs' => Array(''=>'SELECT * FROM '.TABLE_PREFIX.'ConfigurationAdmin LEFT JOIN '.TABLE_PREFIX.'ConfigurationValues Using(VariableName) '),
-
-
- 'ItemSQLs' => Array(''=>'SELECT * FROM '.TABLE_PREFIX.'ConfigurationAdmin LEFT JOIN '.TABLE_PREFIX.'ConfigurationValues Using(VariableName) '),
-
- 'SubTables' => Array(),
-
- 'Fields' => Array(
- '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'=>''),
- ),
-
- 'VirtualFields' => Array(
- 'heading' => Array('type' => 'string','default' => ''),
- 'prompt' => Array('type' => 'string','default' => ''),
- 'element_type' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'validation' => Array('type' => 'string','default' => ''),
- 'ValueList' => Array('type' => 'string','default' => ''),
- 'DisplayOrder' => Array('type' => 'int','not_null' => '1','default' => '0'),
- 'Install' => Array('type' => 'int','not_null' => '1','default' => '1'),
- ),
-
- 'Grids' => Array(),
- );
-
-?>
\ No newline at end of file
Property changes on: trunk/kernel/units/configuration/configuration_config.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/kernel/units/configuration/configuration_event_handler.php
===================================================================
--- trunk/kernel/units/configuration/configuration_event_handler.php (revision 1555)
+++ trunk/kernel/units/configuration/configuration_event_handler.php (nonexistent)
@@ -1,102 +0,0 @@
-<?php
-
- class ConfigurationEventHandler extends InpDBEventHandler {
-
- /**
- * Apply any custom changes to list's sql query
- *
- * @param kEvent $event
- * @access protected
- * @see OnListBuild
- */
- function SetCustomQuery(&$event)
- {
- $object =& $event->getObject();
-
- $module_owner=$this->Application->GetVar('module');
- if ($module_owner===false) {
- $module_owner=$this->myUrlDecode($this->Application->GetVar('conf_module'));
- $this->Application->SetVar("module", $module_owner);
- }
-
- $section=$this->Application->GetVar('section');
- if ($section===false){
- $section=$this->myUrlDecode($this->Application->GetVar('conf_section'));
- $this->Application->SetVar("section", $section);
- }
-
- $object->SetWhereClause('%1$s.ModuleOwner="'.$module_owner.'" AND %1$s.Section="'.$section.'"');
- $object->AddOrderField('DisplayOrder', 'ASC');
- }
-
- /**
- * Enter description here...
- *
- * @param kEvent $event
- */
- function OnBeforeItemUpdate(&$event)
- {
- $object =& $event->getObject();
- if($object->GetDBField('element_type') == 'password')
- {
- if (trim($object->GetDBField('VariableValue'))=='') {
- $field_options=$object->GetFieldOptions('VariableValue');
- $field_options['skip_empty']=1;
- $object->SetFieldOptions('VariableValue', $field_options);
- }else{
- $object->SetDBField('VariableValue', md5($object->GetDBField('VariableValue')));
- }
- }
- }
-
- /**
- * Enter description here...
- *
- * @param kEvent $event
- */
- function OnAfterItemUpdate(&$event)
- {
- $object =& $event->getObject();
- if($object->GetDBField('element_type') == 'password')
- {
- if (trim($object->GetDBField('VariableValue'))=='') {
- $field_options=$object->GetFieldOptions('VariableValue');
- unset($field_options['skip_empty']);
- $object->SetFieldOptions('VariableValue', $field_options);
- }
- }
- }
-
-
- function OnUpdate(&$event)
- {
- parent::OnUpdate($event);
- $module_owner=$this->Application->GetVar('module');
- $section=$this->Application->GetVar('section');
-
- $event->redirect_params = Array('opener' => 's','conf_section'=>$this->myUrlEncode($section), 'conf_module'=>$this->myUrlEncode($module_owner),'pass'=>'all,conf'); //stay!
- }
-
- function OnCancel(&$event)
- {
- parent::OnCancel($event);
- $module_owner=$this->Application->GetVar('module');
- $section=$this->Application->GetVar('section');
-
- $event->redirect_params = Array('opener' => 's','conf_section'=>$this->myUrlEncode($section), 'conf_module'=>$this->myUrlEncode($module_owner),'pass'=>'all,conf'); //stay!
- }
-
- function myUrlDecode($str){
- $str=str_replace(';',':', $str);
- $str=str_replace('!','-', $str);
- return $str;
- }
- function myUrlEncode($str){
- $str=str_replace('-', '!', $str);
- $str=str_replace(':', ';', $str);
- return $str;
- }
-
- }
-
-?>
\ No newline at end of file
Property changes on: trunk/kernel/units/configuration/configuration_event_handler.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/kernel/units/configuration/configuration_tag_processor.php
===================================================================
--- trunk/kernel/units/configuration/configuration_tag_processor.php (revision 1555)
+++ trunk/kernel/units/configuration/configuration_tag_processor.php (nonexistent)
@@ -1,57 +0,0 @@
-<?php
-
-class ConfigurationTagProcessor extends kDBTagProcessor {
-
- function PrintList($params)
- {
- $list =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List',$params);
- $id_field = $this->Application->getUnitOption($this->Prefix,'IDField');
-
- $list->PerPage=-1;
- $list->Query();
- $o = '';
- $list->GoFirst();
-
- $block_params=$this->prepareTagParams($params);
- $block_params['name']=$params['block'];
- $block_params['pass_params']='true';
- $block_params['IdField'] = $id_field;
-
- $next_block=$params['full_block'];
-
- $prev_title="";
-
- while (!$list->EOL())
- {
- $nextItemPrompt=$list->Records[$list->CurrentIndex+1]['prompt'];
- $thisItemPrompt=$list->Records[$list->CurrentIndex]['prompt'];
-
- $this_title=$list->Records[$list->CurrentIndex]['heading'];
-
- if ($this_title!=$prev_title){
- $prev_title=$this_title;
- $section_header_params=array();
- $section_header_params['name']='config_section_header';
- $section_header_params['title']=$this->Application->Phrase($this_title);
- $o.= $this->Application->ParseBlock($section_header_params, 1);
- }
-
- if ($nextItemPrompt==$thisItemPrompt){
- $curr_block=$params['half_block1'];
- $next_block=$params['half_block2'];
- }else{
- $curr_block=$next_block;
- $next_block=$params['full_block'];
- }
- $block_params['name']=$curr_block;
-
- $this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) );
- $o.= $this->Application->ParseBlock($block_params, 1);
-
- $list->GoNext();
- }
- return $o;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: trunk/kernel/units/configuration/configuration_tag_processor.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/core/units/configuration/configuration_event_handler.php
===================================================================
--- trunk/core/units/configuration/configuration_event_handler.php (revision 1555)
+++ trunk/core/units/configuration/configuration_event_handler.php (nonexistent)
@@ -1,102 +0,0 @@
-<?php
-
- class ConfigurationEventHandler extends InpDBEventHandler {
-
- /**
- * Apply any custom changes to list's sql query
- *
- * @param kEvent $event
- * @access protected
- * @see OnListBuild
- */
- function SetCustomQuery(&$event)
- {
- $object =& $event->getObject();
-
- $module_owner=$this->Application->GetVar('module');
- if ($module_owner===false) {
- $module_owner=$this->myUrlDecode($this->Application->GetVar('conf_module'));
- $this->Application->SetVar("module", $module_owner);
- }
-
- $section=$this->Application->GetVar('section');
- if ($section===false){
- $section=$this->myUrlDecode($this->Application->GetVar('conf_section'));
- $this->Application->SetVar("section", $section);
- }
-
- $object->SetWhereClause('%1$s.ModuleOwner="'.$module_owner.'" AND %1$s.Section="'.$section.'"');
- $object->AddOrderField('DisplayOrder', 'ASC');
- }
-
- /**
- * Enter description here...
- *
- * @param kEvent $event
- */
- function OnBeforeItemUpdate(&$event)
- {
- $object =& $event->getObject();
- if($object->GetDBField('element_type') == 'password')
- {
- if (trim($object->GetDBField('VariableValue'))=='') {
- $field_options=$object->GetFieldOptions('VariableValue');
- $field_options['skip_empty']=1;
- $object->SetFieldOptions('VariableValue', $field_options);
- }else{
- $object->SetDBField('VariableValue', md5($object->GetDBField('VariableValue')));
- }
- }
- }
-
- /**
- * Enter description here...
- *
- * @param kEvent $event
- */
- function OnAfterItemUpdate(&$event)
- {
- $object =& $event->getObject();
- if($object->GetDBField('element_type') == 'password')
- {
- if (trim($object->GetDBField('VariableValue'))=='') {
- $field_options=$object->GetFieldOptions('VariableValue');
- unset($field_options['skip_empty']);
- $object->SetFieldOptions('VariableValue', $field_options);
- }
- }
- }
-
-
- function OnUpdate(&$event)
- {
- parent::OnUpdate($event);
- $module_owner=$this->Application->GetVar('module');
- $section=$this->Application->GetVar('section');
-
- $event->redirect_params = Array('opener' => 's','conf_section'=>$this->myUrlEncode($section), 'conf_module'=>$this->myUrlEncode($module_owner),'pass'=>'all,conf'); //stay!
- }
-
- function OnCancel(&$event)
- {
- parent::OnCancel($event);
- $module_owner=$this->Application->GetVar('module');
- $section=$this->Application->GetVar('section');
-
- $event->redirect_params = Array('opener' => 's','conf_section'=>$this->myUrlEncode($section), 'conf_module'=>$this->myUrlEncode($module_owner),'pass'=>'all,conf'); //stay!
- }
-
- function myUrlDecode($str){
- $str=str_replace(';',':', $str);
- $str=str_replace('!','-', $str);
- return $str;
- }
- function myUrlEncode($str){
- $str=str_replace('-', '!', $str);
- $str=str_replace(':', ';', $str);
- return $str;
- }
-
- }
-
-?>
\ No newline at end of file
Property changes on: trunk/core/units/configuration/configuration_event_handler.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/core/units/configuration/configuration_tag_processor.php
===================================================================
--- trunk/core/units/configuration/configuration_tag_processor.php (revision 1555)
+++ trunk/core/units/configuration/configuration_tag_processor.php (nonexistent)
@@ -1,57 +0,0 @@
-<?php
-
-class ConfigurationTagProcessor extends kDBTagProcessor {
-
- function PrintList($params)
- {
- $list =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List',$params);
- $id_field = $this->Application->getUnitOption($this->Prefix,'IDField');
-
- $list->PerPage=-1;
- $list->Query();
- $o = '';
- $list->GoFirst();
-
- $block_params=$this->prepareTagParams($params);
- $block_params['name']=$params['block'];
- $block_params['pass_params']='true';
- $block_params['IdField'] = $id_field;
-
- $next_block=$params['full_block'];
-
- $prev_title="";
-
- while (!$list->EOL())
- {
- $nextItemPrompt=$list->Records[$list->CurrentIndex+1]['prompt'];
- $thisItemPrompt=$list->Records[$list->CurrentIndex]['prompt'];
-
- $this_title=$list->Records[$list->CurrentIndex]['heading'];
-
- if ($this_title!=$prev_title){
- $prev_title=$this_title;
- $section_header_params=array();
- $section_header_params['name']='config_section_header';
- $section_header_params['title']=$this->Application->Phrase($this_title);
- $o.= $this->Application->ParseBlock($section_header_params, 1);
- }
-
- if ($nextItemPrompt==$thisItemPrompt){
- $curr_block=$params['half_block1'];
- $next_block=$params['half_block2'];
- }else{
- $curr_block=$next_block;
- $next_block=$params['full_block'];
- }
- $block_params['name']=$curr_block;
-
- $this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) );
- $o.= $this->Application->ParseBlock($block_params, 1);
-
- $list->GoNext();
- }
- return $o;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: trunk/core/units/configuration/configuration_tag_processor.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: trunk/core/units/configuration/configuration_config.php
===================================================================
--- trunk/core/units/configuration/configuration_config.php (nonexistent)
+++ trunk/core/units/configuration/configuration_config.php (revision 1556)
@@ -0,0 +1,53 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'conf',
+ 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'ConfigurationEventHandler','file'=>'configuration_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'ConfigurationTagProcessor','file'=>'configuration_tag_processor.php','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+ 'Hooks' => Array(),
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ 4 => 'module',
+ 5 => 'section',
+ ),
+
+ 'IDField' => 'VariableName',
+
+ 'TitlePresets' => Array(
+ 'config_list' => Array('prefixes' => Array('conf_List','confg_List'), 'format' => "!la_updating_config!"),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'ConfigurationValues',
+
+ 'ListSQLs' => Array(''=>'SELECT * FROM '.TABLE_PREFIX.'ConfigurationAdmin LEFT JOIN '.TABLE_PREFIX.'ConfigurationValues Using(VariableName) '),
+
+ 'ItemSQLs' => Array(''=>'SELECT * FROM '.TABLE_PREFIX.'ConfigurationAdmin LEFT JOIN '.TABLE_PREFIX.'ConfigurationValues Using(VariableName) '),
+
+ 'SubTables' => Array(),
+
+ 'Fields' => Array(
+ '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'=>''),
+ ),
+
+ 'VirtualFields' => Array(
+ 'heading' => Array('type' => 'string','default' => ''),
+ 'prompt' => Array('type' => 'string','default' => ''),
+ 'element_type' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'validation' => Array('type' => 'string','default' => ''),
+ 'ValueList' => Array('type' => 'string','default' => ''),
+ 'DisplayOrder' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'Install' => Array('type' => 'int','not_null' => '1','default' => '1'),
+ ),
+
+ 'Grids' => Array(),
+ );
+
+?>
\ No newline at end of file
Property changes on: trunk/core/units/configuration/configuration_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline