Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Tue, Jun 24, 11:27 PM

in-portal

Index: branches/unlabeled/unlabeled-1.4.2/kernel/units/general/cat_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/kernel/units/general/cat_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/kernel/units/general/cat_tag_processor.php (revision 3906)
@@ -0,0 +1,106 @@
+<?php
+
+ class kCatDBTagProcessor extends kDBTagProcessor {
+
+ function ItemIcon($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+
+ $grids = $this->Application->getUnitOption($this->Prefix,'Grids');
+ $icons =& $grids[ $params['grid'] ]['Icons'];
+
+ $status_fields = $this->Application->getUnitOption($this->Prefix,'StatusField');
+ if(!$status_fields) return $icons['default'];
+
+ $value = $object->GetDBField($status_fields[0]); // sets base status icon
+ if($value == STATUS_ACTIVE)
+ {
+ if( $object->GetDBField('IsPop') ) $value = 'POP';
+ if( $object->GetDBField('IsHot') ) $value = 'HOT';
+ if( $object->GetDBField('IsNew') ) $value = 'NEW';
+ if( $object->GetDBField('EditorsPick') ) $value = 'PICK';
+ }
+
+ return isset($icons[$value]) ? $icons[$value] : $icons['default'];
+ }
+
+ /**
+ * Returns path where exported category items should be saved
+ *
+ * @param Array $params
+ */
+ function ExportPath($params)
+ {
+ $ret = EXPORT_PATH.'/';
+
+ if( getArrayValue($params, 'as_url') )
+ {
+ $ret = str_replace( FULL_PATH.'/', $this->Application->BaseURL(), $ret);
+ }
+
+ $export_options = unserialize($this->Application->RecallVar($this->getPrefixSpecial().'_options'));
+ $ret .= $export_options['ExportFilename'].'.'.($export_options['ExportFormat'] == 1 ? 'csv' : 'xml');
+
+ return $ret;
+ }
+
+ function CategoryPath($params)
+ {
+ if (!isset($params['cat_id']))
+ {
+ $params['cat_id'] = $this->Application->RecallVar($params['session_var'], 0);
+ }
+
+ $block_params['separator'] = $params['separator'];
+
+ if($params['cat_id'] == 0)
+ {
+ $block_params['name'] = $params['rootcatblock'];
+ return $this->Application->ParseBlock($block_params);
+ }
+ else
+ {
+ $cat_object =& $this->Application->recallObject('c', 'c_List');
+ $sql = 'SELECT CategoryId, ParentId, Name FROM '.$cat_object->TableName.' WHERE CategoryId = '.$params['cat_id'];
+ $res = $this->Conn->GetRow($sql);
+
+ $block_params['name'] = $params['block'];
+ $block_params['cat_name'] = $res['Name'];
+ $block_params['cat_id'] = $res['CategoryId'];
+
+ $next_params['separator'] = $params['separator'];
+ $next_params['rootcatblock'] = $params['rootcatblock'];
+ $next_params['block'] = $params['block'];
+ $next_params['cat_id'] = $res['ParentId'];
+ return $this->CategoryPath($next_params).$this->Application->ParseBlock($block_params);
+ }
+ }
+
+ function BuildListSpecial($params)
+ {
+ if ($this->Special != '') return $this->Special;
+ if ( isset($params['parent_cat_id']) ) {
+ $parent_cat_id = $params['parent_cat_id'];
+ }
+ else {
+ $parent_cat_id = $this->Application->GetVar('c_id');
+ if (!$parent_cat_id) {
+ $parent_cat_id = $this->Application->GetVar('m_cat_id');
+ }
+ }
+
+ $recursive = isset($params['recursive']);
+
+ $types = $this->SelectParam($params, 'types');
+ $except = $this->SelectParam($params, 'except');
+
+ if ($types.$except.$recursive == '') {
+ return parent::BuildListSpecial($params);
+ }
+
+ $special = crc32($parent_cat_id.$types.$except.$recursive);
+ return $special;
+ }
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/kernel/units/general/cat_tag_processor.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
Index: branches/unlabeled/unlabeled-1.4.2/core/units/general/cat_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/core/units/general/cat_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/core/units/general/cat_tag_processor.php (revision 3906)
@@ -0,0 +1,106 @@
+<?php
+
+ class kCatDBTagProcessor extends kDBTagProcessor {
+
+ function ItemIcon($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+
+ $grids = $this->Application->getUnitOption($this->Prefix,'Grids');
+ $icons =& $grids[ $params['grid'] ]['Icons'];
+
+ $status_fields = $this->Application->getUnitOption($this->Prefix,'StatusField');
+ if(!$status_fields) return $icons['default'];
+
+ $value = $object->GetDBField($status_fields[0]); // sets base status icon
+ if($value == STATUS_ACTIVE)
+ {
+ if( $object->GetDBField('IsPop') ) $value = 'POP';
+ if( $object->GetDBField('IsHot') ) $value = 'HOT';
+ if( $object->GetDBField('IsNew') ) $value = 'NEW';
+ if( $object->GetDBField('EditorsPick') ) $value = 'PICK';
+ }
+
+ return isset($icons[$value]) ? $icons[$value] : $icons['default'];
+ }
+
+ /**
+ * Returns path where exported category items should be saved
+ *
+ * @param Array $params
+ */
+ function ExportPath($params)
+ {
+ $ret = EXPORT_PATH.'/';
+
+ if( getArrayValue($params, 'as_url') )
+ {
+ $ret = str_replace( FULL_PATH.'/', $this->Application->BaseURL(), $ret);
+ }
+
+ $export_options = unserialize($this->Application->RecallVar($this->getPrefixSpecial().'_options'));
+ $ret .= $export_options['ExportFilename'].'.'.($export_options['ExportFormat'] == 1 ? 'csv' : 'xml');
+
+ return $ret;
+ }
+
+ function CategoryPath($params)
+ {
+ if (!isset($params['cat_id']))
+ {
+ $params['cat_id'] = $this->Application->RecallVar($params['session_var'], 0);
+ }
+
+ $block_params['separator'] = $params['separator'];
+
+ if($params['cat_id'] == 0)
+ {
+ $block_params['name'] = $params['rootcatblock'];
+ return $this->Application->ParseBlock($block_params);
+ }
+ else
+ {
+ $cat_object =& $this->Application->recallObject('c', 'c_List');
+ $sql = 'SELECT CategoryId, ParentId, Name FROM '.$cat_object->TableName.' WHERE CategoryId = '.$params['cat_id'];
+ $res = $this->Conn->GetRow($sql);
+
+ $block_params['name'] = $params['block'];
+ $block_params['cat_name'] = $res['Name'];
+ $block_params['cat_id'] = $res['CategoryId'];
+
+ $next_params['separator'] = $params['separator'];
+ $next_params['rootcatblock'] = $params['rootcatblock'];
+ $next_params['block'] = $params['block'];
+ $next_params['cat_id'] = $res['ParentId'];
+ return $this->CategoryPath($next_params).$this->Application->ParseBlock($block_params);
+ }
+ }
+
+ function BuildListSpecial($params)
+ {
+ if ($this->Special != '') return $this->Special;
+ if ( isset($params['parent_cat_id']) ) {
+ $parent_cat_id = $params['parent_cat_id'];
+ }
+ else {
+ $parent_cat_id = $this->Application->GetVar('c_id');
+ if (!$parent_cat_id) {
+ $parent_cat_id = $this->Application->GetVar('m_cat_id');
+ }
+ }
+
+ $recursive = isset($params['recursive']);
+
+ $types = $this->SelectParam($params, 'types');
+ $except = $this->SelectParam($params, 'except');
+
+ if ($types.$except.$recursive == '') {
+ return parent::BuildListSpecial($params);
+ }
+
+ $special = crc32($parent_cat_id.$types.$except.$recursive);
+ return $special;
+ }
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/core/units/general/cat_tag_processor.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
Index: branches/unlabeled/unlabeled-1.4.2/admin/install/upgrades/inportal_upgrade_v1.1.7.sql
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/admin/install/upgrades/inportal_upgrade_v1.1.7.sql (nonexistent)
+++ branches/unlabeled/unlabeled-1.4.2/admin/install/upgrades/inportal_upgrade_v1.1.7.sql (revision 3906)
@@ -0,0 +1,12 @@
+ALTER TABLE ThemeFiles ADD INDEX (FileName);
+ALTER TABLE ThemeFiles ADD INDEX (FilePath);
+ALTER TABLE Category CHANGE EditorsPick EditorsPick TINYINT(4) NOT NULL DEFAULT '0';
+
+ALTER TABLE PortalUser ADD Company VARCHAR(255) NOT NULL AFTER LastName;
+ALTER TABLE PortalUser ADD Fax VARCHAR(255) NOT NULL AFTER Phone;
+ALTER TABLE PortalUser ADD Street2 VARCHAR(255) NOT NULL AFTER Street;
+
+INSERT INTO ConfigurationAdmin VALUES ('UseCronForRegularEvent', 'la_Text_Website', 'la_UseCronForRegularEvent', 'checkbox', NULL, NULL, 18, 0);
+INSERT INTO ConfigurationValues VALUES ('UseCronForRegularEvent', '0', 'In-Portal', 'in-portal:configure_general');
+
+UPDATE Modules SET Version = '1.1.7' WHERE Name = 'In-Portal';
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/admin/install/upgrades/inportal_upgrade_v1.1.7.sql
___________________________________________________________________
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