Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F847085
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Apr 17, 9:05 PM
Size
13 KB
Mime Type
text/x-diff
Expires
Sat, Apr 19, 9:05 PM (17 h, 22 m)
Engine
blob
Format
Raw Data
Handle
601963
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.3.2/core/units/config_search/config_search_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/core/units/config_search/config_search_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/core/units/config_search/config_search_config.php (revision 1683)
@@ -0,0 +1,99 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'confs',
+ 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'ConfigSearchEventHandler','file'=>'config_search_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'ConfigSearchTagProcessor','file'=>'config_search_tag_processor.php','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+ 'hooks' => Array(),
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ 4 => 'module',
+ 5 => 'section',
+ ),
+
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'cf',
+ 'HookToSpecial' => '',
+ 'HookToEvent' => Array( 'OnSave' ),
+ 'DoPrefix' => 'confs',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnCreateCustomField',
+ ),
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'cf',
+ 'HookToSpecial' => '-item',
+ 'HookToEvent' => Array( 'OnAfterItemDelete' ),
+ 'DoPrefix' => 'confs',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnDeleteCustomField',
+ ),
+ ),
+
+ 'IDField' => 'SearchConfigId',
+
+ 'TitlePresets' => Array(
+ 'config_list_search' => Array('prefixes' => Array('confs_List'), 'format' => "!la_updating_config!"),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'SearchConfig',
+
+ 'ListSQLs' => Array(''=>'SELECT *, IF('.TABLE_PREFIX.'SearchConfig.CustomFieldId=0, 0, 1) AS IsCustom FROM '.TABLE_PREFIX.'SearchConfig'),
+
+ 'ItemSQLs' => Array(''=>'SELECT * FROM '.TABLE_PREFIX.'SearchConfig'),
+
+ 'SubTables' => Array(),
+
+ 'Fields' => Array(
+ 'TableName' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'FieldName' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'SimpleSearch' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'AdvancedSearch' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'Description' => Array('type' => 'string','default' => ''),
+ 'DisplayName' => Array('type' => 'string','default' => ''),
+ 'ModuleName' => Array('type' => 'string','default' => ''),
+ 'ConfigHeader' => Array('type' => 'string','default' => ''),
+ 'DisplayOrder' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'SearchConfigId' => Array('type' => 'int','not_null' => '1','default' => ''),
+ 'Priority' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'FieldType' => Array('type' => 'string','not_null' => '1','default' => 'text'),
+ 'ForeignField' => Array('type' => 'string','default' => ''),
+ 'JoinClause' => Array('type' => 'string','default' => ''),
+ 'IsWhere' => Array('type' => 'string','default' => ''),
+ 'IsNotWhere' => Array('type' => 'string','default' => ''),
+ 'ContainsWhere' => Array('type' => 'string','default' => ''),
+ 'NotContainsWhere' => Array('type' => 'string','default' => ''),
+ 'CustomFieldId' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ ),
+
+ 'VirtualFields' => Array(),
+
+ 'ListSortings' => Array(
+ '' => Array(
+ 'ForcedSorting' => Array('IsCustom' => 'asc'),
+ 'Sorting' => Array('DisplayOrder' => 'asc'),
+ )
+ ),
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+ 'Fields' => Array(
+ 'TableName' => Array( 'title'=>'la_col_TableName', 'data_block' => 'grid_data_td'),
+ 'FieldName' => Array( 'title'=>'la_col_FieldName', 'data_block' => 'grid_data_td' ),
+ 'SimpleSearch' => Array( 'title'=>'la_col_SimpleSearch', 'data_block' => 'grid_data_td'),
+ ),
+ ),
+ ),
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/core/units/config_search/config_search_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/core/units/stylesheets/stylesheets_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/core/units/stylesheets/stylesheets_event_handler.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/core/units/stylesheets/stylesheets_event_handler.php (revision 1683)
@@ -0,0 +1,28 @@
+<?php
+
+ class StylesheetsEventHandler extends InpDBEventHandler
+ {
+
+ /**
+ * Compile stylesheet file based on theme definitions
+ *
+ * @param kEvent $event
+ */
+ function OnCompileStylesheet(&$event)
+ {
+ $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
+ $object =& $event->getObject();
+ $object->SwitchToLive();
+
+ $ids = explode(',', $event->MasterEvent->getEventParam('ids') );
+
+ if(!$ids) return false;
+ foreach($ids as $id)
+ {
+ $object->Load($id);
+ $object->Compile();
+ }
+ }
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/core/units/stylesheets/stylesheets_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/core/units/stylesheets/stylesheets_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/core/units/stylesheets/stylesheets_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/core/units/stylesheets/stylesheets_config.php (revision 1683)
@@ -0,0 +1,114 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'css',
+ 'ItemClass' => Array('class'=>'StylesheetsItem','file'=>'stylesheets_item.php','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'StylesheetsEventHandler','file'=>'stylesheets_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'css',
+ 'HookToSpecial' => '',
+ 'HookToEvent' => Array('OnSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnCompileStylesheet',
+ ),
+ ),
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ 4 => 'mode',
+ ),
+ 'IDField' => 'StylesheetId',
+
+ 'StatusField' => Array('Enabled'),
+
+ 'TitleField' => 'Name',
+
+ 'TitlePresets' => Array(
+ 'default' => Array( 'new_status_labels' => Array('css'=>'!la_title_Adding_Stylesheet!'),
+ 'edit_status_labels' => Array('css'=>'!la_title_Editing_Stylesheet!'),
+ 'new_titlefield' => Array('css'=>'!la_title_New_Stylesheet!'),
+ ),
+
+ 'styles_list' => Array('prefixes' => Array('css_List'), 'format' => "!la_title_Stylesheets! (#css_recordcount#)"),
+
+ 'stylesheets_edit' => Array('prefixes' => Array('css'), 'format' => "#css_status# '#css_titlefield#' - !la_title_General!"),
+
+ 'base_styles' => Array('prefixes' => Array('css','selectors.base_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BaseStyles! (#selectors.base_recordcount#)"),
+
+ 'block_styles' => Array('prefixes' => Array('css','selectors.block_List'), 'format' => "#css_status# '#css_titlefield#' - !la_title_BlockStyles! (#selectors.block_recordcount#)"),
+
+ 'base_style_edit' => Array( 'prefixes' => Array('css','selectors'),
+ 'new_status_labels' => Array('selectors'=>'!la_title_Adding_BaseStyle!'),
+ 'edit_status_labels' => Array('selectors'=>'!la_title_Editing_BaseStyle!'),
+ 'new_titlefield' => Array('selectors'=>'!la_title_New_BaseStyle!'),
+ 'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'"),
+
+ 'block_style_edit' => Array( 'prefixes' => Array('css','selectors'),
+ 'new_status_labels' => Array('selectors'=>'!la_title_Adding_BlockStyle!'),
+ 'edit_status_labels' => Array('selectors'=>'!la_title_Editing_BlockStyle!'),
+ 'new_titlefield' => Array('selectors'=>'!la_title_New_BlockStyle!'),
+ 'format' => "#css_status# '#css_titlefield#' - #selectors_status# '#selectors_titlefield#'"),
+
+ 'style_edit' => Array('prefixes' => Array('selectors'), 'format' => "!la_title_EditingStyle! '#selectors_titlefield#'"),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'Stylesheets',
+ 'SubItems' => Array('selectors'),
+
+ 'FilterMenu' => Array(
+ 'Groups' => Array(
+ Array('mode' => 'AND', 'filters' => Array(0,1), 'type' => WHERE_FILTER),
+ ),
+
+ 'Filters' => Array(
+ 0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 1' ),
+ 1 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 0' ),
+ )
+ ),
+
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ ), // key - special, value - list select sql
+ 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ ),
+ 'ListSortings' => Array(
+ '' => Array(
+ 'Sorting' => Array('Name' => 'asc'),
+ )
+ ),
+ 'Fields' => Array(
+ 'StylesheetId' => Array(),
+ 'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
+ 'Description' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'AdvancedCSS' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'LastCompiled' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => '1','default' => '0'),
+ 'Enabled' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, 'not_null' => '1','default' => 0),
+ ),
+
+ 'VirtualFields' => Array(),
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif',0=>'icon16_style_disabled.gif',1=>'icon16_style.gif'),
+ 'Fields' => Array(
+ 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td'),
+ 'Description' => Array( 'title'=>'la_col_Description', 'data_block' => 'grid_description_td' ),
+ 'Enabled' => Array( 'title'=>'la_col_Status' ),
+ 'LastCompiled' => Array('title' => 'la_col_LastCompiled'),
+ ),
+
+ ),
+ ),
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/core/units/stylesheets/stylesheets_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/core/admin_templates/dummy.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/core/admin_templates/dummy.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/core/admin_templates/dummy.tpl (revision 1683)
@@ -0,0 +1 @@
+
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/core/admin_templates/dummy.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Event Timeline
Log In to Comment