Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sat, Feb 1, 11:06 AM

in-portal

Index: branches/unlabeled/unlabeled-1.9.4/core/admin_templates/groups/permissions_selector.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.9.4/core/admin_templates/groups/permissions_selector.tpl (revision 5727)
+++ branches/unlabeled/unlabeled-1.9.4/core/admin_templates/groups/permissions_selector.tpl (revision 5728)
@@ -1,80 +1,80 @@
<inp2:m_RequireLogin permissions="in-portal:user_groups.advanced:manage_permissions" system="1"/>
<inp2:m_include t="incs/header" nobody="yes"/>
<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
<inp2:m_ParseBlock name="section_header" prefix="g" icon="icon46_usergroups" module="in-portal" title="!la_title_Groups!"/>
<inp2:m_ParseBlock name="blue_bar" prefix="g" title_preset="groups_edit_additional_permissions" module="in-portal" icon="icon46_usergroups"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
set_hidden_field('advanced_save', 1);
- submit_event('g-perm','OnGroupSavePermissions');
+ submit_event('g-perm','OnSavePermissions');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
window.close();
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:g_SaveWarning name="grid_save_warning"/>
<inp2:m_DefineElement name="permission_element" prefix="g-perm">
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<td>
<inp2:m_param name="section_name"/>.<inp2:m_param name="perm_name"/>
</td>
<td>
<input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:$prefix_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
<input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="old_permission_element" prefix="g-perm">
<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
<td>
<inp2:m_phrase name="$label"/>
</td>
<td>
<input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:$prefix_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
<input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
</td>
</tr>
</inp2:m_DefineElement>
<inp2:g-perm_LoadPermissions/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_set {$PrefixSpecial}_sequence="1" odd_even="table_color1"/>
<tr class="subsectiontitle">
<td><inp2:m_phrase label="la_col_PermissionName"/></td>
<td><inp2:m_phrase label="la_col_PermissionValue"/></td>
</tr>
<inp2:m_if check="m_GetEquals" name="section_name" value="in-portal:root">
<inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="LOGIN" label="lu_PermName_Login_desc"/>
<inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="ADMIN" label="lu_PermName_Admin_desc"/>
<inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="SYSTEM_ACCESS.READONLY" label="la_PermName_SystemAccess.ReadOnly_desc"/>
<inp2:m_else/>
<inp2:adm_ListSectionPermissions render_as="permission_element" type="1"/>
</inp2:m_if>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.9.4/core/admin_templates/groups/permissions_selector.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9
\ No newline at end of property
+1.9.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.2.4/core/admin_templates/groups/groups_edit_tabs.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.2.4/core/admin_templates/groups/groups_edit_tabs.tpl (revision 5727)
+++ branches/unlabeled/unlabeled-1.2.4/core/admin_templates/groups/groups_edit_tabs.tpl (revision 5728)
Property changes on: branches/unlabeled/unlabeled-1.2.4/core/admin_templates/groups/groups_edit_tabs.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.2.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.4/core/units/images/image_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.3.4/core/units/images/image_tag_processor.php (revision 5727)
+++ branches/unlabeled/unlabeled-1.3.4/core/units/images/image_tag_processor.php (revision 5728)
@@ -1,206 +1,204 @@
<?php
class ImageTagProcessor extends kDBTagProcessor {
function Image($params)
{
$params['img_path'] = $this->ImageSrc($params);
- if ($params['img_path'] === false) return ;
$params['img_size'] = $this->ImageSize($params);
if (!$params['img_size']){
$params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
}
$object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
$params['alt'] = htmlspecialchars($object->GetField('AltName'));
$params['name'] = $this->SelectParam($params, 'block,render_as');
return $this->Application->ParseBlock($params);
}
function ItemImage($params)
{
$this->LoadItemImage($params);
$params['img_path'] = $this->ImageSrc($params);
$params['img_size'] = $this->ImageSize($params);
if (!$params['img_size']){
if (isset($params['DefaultWidth'])) {
$params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
}
}
$params['name'] = $this->SelectParam($params, 'render_as,block');
$object =& $this->Application->recallObject($this->getPrefixSpecial());
if ( !$object->isLoaded() && !$this->SelectParam($params, 'default_image,DefaultImage') ) return false;
$params['alt'] = htmlspecialchars($object->GetField('AltName'));
return $this->Application->ParseBlock($params);
}
function LargeImageExists($params) {
$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
if ( $object->GetDBField('SameImages') == null || $object->GetDBField('SameImages')=='1' )
{
return false;
}
else
{
return true;
}
}
function LoadItemImage($params)
{
$parent_item =& $this->Application->recallObject($params['PrefixSpecial']);
$object =& $this->Application->recallObject($this->getPrefixSpecial(), null, Array('skip_autoload' => true));
// if we need primary thumbnail which is preloaded with products list
$object->Clear();
// if we need primary thumbnail which is preloaded with products list
if (
$this->SelectParam($params, 'thumbnail,Thumbnail') &&
(
(
$this->SelectParam($params, 'primary,Primary')
||
!isset($params['name'])
)
&&
!$this->Application->GetVar('img_id')
&&
isset($parent_item->Fields['LocalThumb'])
)
)
{
$object->SetDefaultValues();
$object->SetDBFieldsFromHash($parent_item->GetFieldValues(), Array('SameImages', 'LocalThumb', 'ThumbPath', 'ThumbUrl', 'LocalImage', 'LocalPath', 'Url') );
$object->Loaded = true;
}
else { // if requested image is not primary thumbnail - load it directly
$id_field = $this->Application->getUnitOption($this->Prefix, 'ForeignKey');
$parent_table_key = $this->Application->getUnitOption($this->Prefix, 'ParentTableKey');
$keys[$id_field] = $parent_item->GetDBField($parent_table_key);
// which image to load?
if ( getArrayValue($params, 'Primary') ) { //load primary image
$keys['DefaultImg'] = 1;
}
elseif ( getArrayValue($params, 'name') ) { //load by name
$keys['Name'] = $params['name'];
}
elseif ( $image_id = $this->Application->GetVar($this->Prefix.'_id') ) {
$keys['ImageId'] = $image_id;
}
else {
$keys['DefaultImg'] = 1; //if primary was not set explicity and name was also not passed - load primary
}
$object->Load($keys);
}
}
function ImageSrc($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
$ret = '';
// if we need thumb, or full image is same as thumb
if ( $this->SelectParam($params, 'thumbnail,Thumbnail') || $object->GetDBField('SameImages') )
{
// return local image or url
$ret = $object->GetDBField('LocalThumb') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('ThumbPath') : $object->GetDBField('ThumbUrl');
if ( $object->GetDBField('LocalThumb') && !file_exists(FULL_PATH.'/'.$object->GetDBField('ThumbPath')) ) $ret = '';
}
else { // if we need full which is not the same as thumb
$ret = $object->GetDBField('LocalImage') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('LocalPath') : $object->GetDBField('Url');
if ( $object->GetDBField('LocalImage') && !file_exists(FULL_PATH.'/'.$object->GetDBField('LocalPath')) ) $ret = '';
}
- $default_image = $this->SelectParam($params, 'default_image,DefaultImage');
- return ($ret && $ret != PROTOCOL.SERVER_NAME.BASE_PATH && $ret != PROTOCOL.SERVER_NAME.BASE_PATH.'/') ? $ret : ($default_image ? PROTOCOL.SERVER_NAME.BASE_PATH.THEMES_PATH.'/'.$default_image : false);
+ return ($ret && $ret != PROTOCOL.SERVER_NAME.BASE_PATH && $ret != PROTOCOL.SERVER_NAME.BASE_PATH.'/') ? $ret : PROTOCOL.SERVER_NAME.BASE_PATH.THEMES_PATH.'/'.$this->SelectParam($params, 'default_image,DefaultImage');
}
function GetFullPath($path)
{
if(!$path) return $path;
// absolute url
if( preg_match('/^(.*):\/\/(.*)$/U', $path) )
{
if(strpos($path, PROTOCOL.SERVER_NAME.BASE_PATH) === 0)
{
$path = str_replace(PROTOCOL.SERVER_NAME.BASE_PATH, FULL_PATH.'/', $path);
}
return $path;
}
// relative url
return FULL_PATH.'/'.substr(THEMES_PATH,1).'/'.$path;
}
/**
* Makes size clause for img tag, such as
* ' width="80" height="100"' according to max_width
* and max_heght limits.
*
* @param array $params
* @return string
*/
function ImageSize($params)
{
$img_path = $this->GetFullPath( getArrayValue($params, 'img_path') );
$image_info = @getimagesize($img_path);
// if( !($img_path && file_exists($img_path) && isset($image_info) ) )
if( !$image_info )
{
trigger_error('Image <b>'.$img_path.'</b> <span class="debug_error">missing or invalid</span>', E_USER_WARNING);
return false;
}
$orig_width = getArrayValue($image_info, 0);
$orig_height = getArrayValue($image_info, 1);
$max_width = getArrayValue($params, 'MaxWidth');
$max_height = getArrayValue($params, 'MaxHeight');
$too_large = is_numeric($max_width) ? ($orig_width > $max_width) : false;
$too_large = $too_large || (is_numeric($max_height) ? ($orig_height > $max_height) : false);
if($too_large)
{
$width_ratio = $max_width ? $max_width / $orig_width : 1;
$height_ratio = $max_height ? $max_height / $orig_height : 1;
$ratio = min($width_ratio, $height_ratio);
$width = ceil($orig_width * $ratio);
$height = ceil($orig_height * $ratio);
}
else
{
$width = $orig_width;
$height = $orig_height;
}
$size_clause = ' width="'.$width.'" height="'.$height.'"';
return $size_clause;
}
// used in admin
function ImageUrl($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
if ($object->GetDBField('SameImages') ? $object->GetDBField('LocalThumb') : $object->GetDBField('LocalImage') )
{
$ret = $this->Application->Phrase(getArrayValue($params,'local_phrase'));
}
else
{
$ret = $object->GetDBField('SameImages') ? $object->GetDBField('ThumbUrl') : $object->GetDBField('Url');
}
return $ret;
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.4/core/units/images/image_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.4/core/units/relationship/relationship_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.4/core/units/relationship/relationship_config.php (revision 5727)
+++ branches/unlabeled/unlabeled-1.4.4/core/units/relationship/relationship_config.php (revision 5728)
@@ -1,107 +1,107 @@
<?php
-
+
$config = Array(
'Prefix' => 'rel',
-
+
'Clones' => Array(
- 'c-rel' => Array('ParentPrefix' => 'c'),
+
'l-rel' => Array('ParentPrefix' => 'l'),
'n-rel' => Array('ParentPrefix' => 'n'),
'bb-rel'=> Array('ParentPrefix' => 'bb'),
- /*'p-rel' => Array('ParentPrefix' => 'p'),*/
'cms-rel'=> Array('ParentPrefix' => 'cms'),
+ /*'p-rel' => Array('ParentPrefix' => 'p'),*/
),
-
+
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'RelationshipEventHandler','file'=>'relationship_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
'AutoLoad' => true,
- 'Hooks' => Array(
+ 'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => '#PARENT#',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnDeleteForeignRelations',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'RelationshipId',
'StatusField' => Array('Enabled','Type'),
'TableName' => TABLE_PREFIX.'Relationship',
'ParentTableKey'=> 'ResourceId',
'ForeignKey' => 'SourceId',
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
-
+
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
Array('mode' => 'AND', 'filters' => Array('show_recip','show_oneway'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Enabled != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Enabled != 0' ),
's1' => Array(),
'show_recip' => Array('label' => 'la_Reciprocal', 'on_sql' => '', 'off_sql' => '%1$s.Type != 1' ),
'show_oneway' => Array('label' => 'la_OneWay', 'on_sql' => '', 'off_sql' => '%1$s.Type != 2' ),
)
),
-
+
'CalculatedFields' => Array(
'' => Array(
'ItemName' => 'TRIM(CONCAT(#ITEM_NAMES#))',
'ItemType' => '#ITEM_TYPES#',
),
),
-
+
'ListSQLs' => Array( ''=> 'SELECT %1$s.RelationshipId, %1$s.Priority, %1$s.Type, %1$s.Enabled %2$s
FROM %1$s #ITEM_JOIN#',
), // key - special, value - list select sql
-
- 'ListSortings' => Array(
+
+ 'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('Priority' => 'desc'),
'Sorting' => Array('ItemName' => 'asc', 'ItemType' => 'asc'),
)
- ),
+ ),
'ItemSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %1$s #ITEM_JOIN#',),
-
+
'Fields' => Array(
'RelationshipId' => Array(),
'SourceId' => Array('type'=>'int'),
'TargetId' => Array('type'=>'int'),
'SourceType' => Array('type'=>'int','not_null'=>1,'default'=>0),
'TargetType' => Array('type'=>'int','not_null'=>1,'default'=>0),
'Type' => Array('type'=>'int','formatter'=>'kOptionsFormatter','options'=>Array(1=>'la_Reciprocal',0=>'la_OneWay'),'not_null'=>1,'default'=>0,'use_phrases'=>1),
'Enabled' => Array('type'=>'int','formatter'=>'kOptionsFormatter','options'=>Array(0=>'la_Disabled',1=>'la_Enabled'),'not_null'=>1,'default'=>1,'use_phrases'=>1),
'Priority' => Array('type'=>'int','not_null'=>1,'default'=>0),
),
'VirtualFields' => Array( 'ItemName' => Array(),
'ItemType' => Array(),
),
-
+
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif','1_0'=>'icon16_relation_one-way.gif','0_0'=>'icon16_relation_one-way_disabled.gif','1_1'=>'icon16_relation_reciprocal.gif','0_1'=>'icon16_relation_reciprocal_disabled.gif'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
'Fields' => Array(
'ItemName' => Array( 'title'=>'la_col_TargetId', 'data_block' => 'grid_checkbox_td'),
'ItemType' => Array( 'title'=>'la_col_TargetType' ),
'Type' => Array( 'title'=>'la_col_RelationshipType' ),
'Enabled' => Array( 'title'=>'la_col_Status' ),
),
-
+
),
),
);
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.4/core/units/relationship/relationship_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_config.php (revision 5727)
+++ branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_config.php (revision 5728)
@@ -1,136 +1,131 @@
<?php
-
+
$config = Array(
'Prefix' => 'rev',
-
+
'Clones' => Array(
- 'l-rev' => Array(
- 'ParentPrefix' => 'l',
- ),
- 'n-rev' => Array(
- 'ParentPrefix' => 'n',
- ),
- 'bb-rev'=> Array(
- 'ParentPrefix' => 'bb',
- ),
+
+ 'l-rev' => Array('ParentPrefix' => 'l'),
+ 'n-rev' => Array('ParentPrefix' => 'n'),
+ 'bb-rev'=> Array('ParentPrefix' => 'bb'),
/*'p-rev' => Array('ParentPrefix' => 'p'),*/
),
-
+
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ReviewsEventHandler','file'=>'reviews_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ReviewsTagProcessor','file'=>'reviews_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
-
+
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
-
-
+
+
'ParentPrefix' => 'p', // replace all usage of rev to "p-rev" and then remove this param from here and Prefix too
-
+
'IDField' => 'ReviewId',
'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
'TableName' => TABLE_PREFIX.'ItemReview',
'ParentTableKey' => 'ResourceId', // linked field in master table
'ForeignKey' => 'ItemId', // linked field in subtable
-
+
'AutoDelete' => true,
'AutoClone' => true,
-
+
'TitlePresets' => Array(
'reviews_edit' => Array('format' => "!la_title_Editing_Review!"),
- ),
+ ),
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
)
),
-
+
'CalculatedFields' => Array(
'' => Array(
'ReviewedBy' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = -1, \'root\', IF (%1$s.CreatedById = -2, \'Guest\', \'n/a\')), pu.Login )',
),
'products' => Array(
'ReviewedBy' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = -1, \'root\', IF (%1$s.CreatedById = -2, \'Guest\', \'n/a\')), pu.Login )',
'ItemName' => 'pr.l1_Name',
'ProductId' => 'pr.ProductId',
),
'product' => Array(
'ReviewedBy' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = -1, \'root\', IF (%1$s.CreatedById = -2, \'Guest\', \'n/a\')), pu.Login )',
'ItemName' => 'pr.l1_Name',
'ProductId' => 'pr.ProductId',
),
-
+
),
-
- // key - special, value - list select sql
+
+ // key - special, value - list select sql
'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
-
+
'products' => ' SELECT %1$s.* %2$s
FROM %1$s, '.TABLE_PREFIX.'Products pr
LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
-
+
'product' => ' SELECT %1$s.* %2$s
FROM %1$s, '.TABLE_PREFIX.'Products pr
LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
),
'ItemSQLs' => Array( ''=> 'SELECT * FROM %s'),
-
- 'ListSortings' => Array(
+
+ 'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('Priority' => 'desc'),
'Sorting' => Array('CreatedOn' => 'desc'),
)
- ),
-
+ ),
+
'Fields' => Array(
'ReviewId' => Array('type'=>'int'),
'CreatedOn' => Array('formatter'=>'kDateFormatter','not_null'=>1,'default'=>'#NOW#'),
'ReviewText' => Array('type'=>'string','required'=>1,'not_null'=>1,'default'=>''),
'IPAddress' => Array('type'=>'string','max_value_inc'=>15,'not_null'=>1,'default'=>''),
'ItemId' => Array('type'=>'int','not_null'=>1,'default'=>0),
'CreatedById' => Array('formatter'=>'kLEFTFormatter','options'=>Array(-1=>'root',-2=>'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'','left_key_field'=>'PortalUserId','left_title_field'=>'Login','required'=>1,'not_null'=>1,'default'=>-1),
'ItemType' => Array('type'=>'int','not_null'=>1,'default'=>0),
'Priority' => Array('type'=>'int','not_null'=>1,'default'=>0),
- 'Status' => Array('formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1=>'la_Active',2=>'la_Pending',0=>'la_Disabled'),'not_null'=>1,'default'=>2 ),
+ 'Status' => Array('formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1=>'la_Active',2=>'la_Pending',0=>'la_Disabled'),'not_null'=>1,'default'=>0 ),
'TextFormat' => Array('type'=>'int','not_null'=>1,'default'=>0),
'Module' => Array('type'=>'string','not_null'=>1,'default'=>''),
),
'VirtualFields' => Array(
'ReviewedBy' => Array(),
),
-
+
'Grids' => Array(
'Default' => Array( 'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_review.gif',2=>'icon16_review_pending.gif',0=>'icon16_review_disabled.gif'),
'Fields' => Array(
'ReviewText' => Array( 'title'=>'la_col_ReviewText', 'data_block' => 'reviewtext_checkbox_td'),
'ReviewedBy' => Array( 'title'=>'la_col_ReviewedBy' ),
'CreatedOn_formatted' => Array( 'title'=>'la_col_CreatedOn', 'sort_field' => 'CreatedOn' ),
'Status' => Array( 'title'=>'la_col_Status' ),
),
-
+
),
-
+
'ReviewsSection' => Array( 'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_review.gif',2=>'icon16_review_pending.gif',0=>'icon16_review_disabled.gif'),
'Fields' => Array(
'ReviewText' => Array( 'title'=>'la_col_ReviewText', 'data_block' => 'grid_checkbox_namelink_td'),
'ReviewedBy' => Array( 'title'=>'la_col_ReviewedBy' ),
'CreatedOn_formatted' => Array( 'title'=>'la_col_CreatedOn', 'sort_field' => 'CreatedOn' ),
'Status' => Array( 'title'=>'la_col_Status' ),
),
-
+
),
),
);
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_tag_processor.php (revision 5727)
+++ branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_tag_processor.php (revision 5728)
@@ -1,95 +1,97 @@
<?php
class ReviewsTagProcessor extends kDBTagProcessor
{
+
+
/**
* Returns a link for editing product
*
* @param Array $params
* @return string
*/
function ItemEditLink($params)
{
$item_prefix = $params['item_prefix'];
$id_field = $this->Application->getUnitOption($item_prefix,'IDField');
$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
$item_id = $object->GetDBField($id_field);
return $this->Application->HREF($params['edit_template'],'', Array(
'm_opener' => 'd',
$item_prefix.'_mode' => 't',
$item_prefix.'_event' => 'OnEdit',
$item_prefix.'_id' => $item_id,
'pass' => 'all,'.$item_prefix
), 'index4.php');
}
/**
* Get's reuested field value
*
* @param Array $params
* @return string
* @access public
*/
function Field($params)
{
$field = $this->SelectParam($params, 'name,field');
$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
if ($field == 'ReviewText') {
if ($object->GetDBField('TextFormat') == 1) {
$params['no_special'] = 'no_special';
}
else {
unset($params['no_special']);
}
}
return parent::Field($params);
}
function AlreadyReviewed($params)
{
$user_id = ($this->Application->GetVar('u_id') == 0) ? -2 : $this->Application->GetVar('u_id');
$object =& $this->getObject( Array('skip_autoload' => true) );
$product_info = $object->getLinkedInfo();
$sql = ' SELECT * FROM '.TABLE_PREFIX.'SpamControl
WHERE ItemResourceId='.$product_info['ParentId'].'
AND IPaddress="'.$_SERVER['REMOTE_ADDR'].'"
AND PortalUserId='.$user_id.'
AND DataType="Review"';
$res = $this->Conn->GetRow($sql);
if($res['Expire'] > adodb_mktime())
{
$ret = 1;
}
else
{
$sql = 'DELETE FROM '.TABLE_PREFIX.'SpamControl
WHERE ItemResourceId='.$product_info['ParentId'].'
AND IPaddress="'.$_SERVER['REMOTE_ADDR'].'"
AND PortalUserId='.$user_id.'
AND DataType="Review"';
$this->Conn->Query($sql);
$ret = 0;
}
return $ret;
}
function HasError($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
if (method_exists($object, 'GetErrorMsg')) {
return parent::HasError($params);
}
else {
return 0;
}
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.4/core/units/reviews/reviews_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.4/core/units/images/images_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.4/core/units/images/images_config.php (revision 5727)
+++ branches/unlabeled/unlabeled-1.4.4/core/units/images/images_config.php (revision 5728)
@@ -1,140 +1,140 @@
<?php
$config = Array(
'Prefix' => 'img',
'Clones' => Array(
'l-img' => Array('ParentPrefix' => 'l'),
'n-img' => Array('ParentPrefix' => 'n'),
'bb-img'=> Array('ParentPrefix' => 'bb'),
/*'p-img' => Array('ParentPrefix' => 'p'),*/
- 'c-img' => Array('ParentPrefix' => 'c'),
+ 'catimg' => Array('ParentPrefix' => 'c'),
),
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ImageEventHandler','file'=>'image_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ImageTagProcessor','file'=>'image_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'AggregateTags' => Array(
Array(
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'Image',
'LocalTagName' => 'ItemImage',
),
Array(
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ListImages',
'LocalTagName' => 'PrintList2',
'LocalSpecial' => 'list',
),
Array(
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'LargeImageExists',
'LocalTagName' => 'LargeImageExists',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'ImageId',
'StatusField' => Array('Enabled', 'DefaultImg'), // field, that is affected by Approve/Decline events
'TitleField' => 'Name', // field, used in bluebar when editing existing item
'TableName' => TABLE_PREFIX.'Images',
'ParentTableKey'=> 'ResourceId', // linked field in master table
'ForeignKey' => 'ResourceId', // linked field in subtable
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Enabled != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Enabled != 0' ),
)
),
'CalculatedFields' => Array(
'' => Array(
'Preview' => '0',
),
),
'ListSQLs' => Array( ''=>'SELECT * FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('Priority' => 'desc'),
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'ImageId' => Array('type'=>'int'),
'ResourceId' => Array('type'=>'int', 'not_null'=>1, 'default' => 0),
'Url' => Array('max_len'=>255, 'default' => '', 'not_null'=>1),
'Name' => Array('max_len'=>255, 'required'=>1, 'not_null'=>1, 'default' => ''),
'AltName' => Array('max_len'=>255, 'required'=>1, 'not_null'=>1),
'ImageIndex' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
'LocalImage' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
'LocalPath' => Array('formatter'=>'kPictureFormatter', 'skip_empty'=>1, 'max_len'=>240, 'default' => '', 'not_null' => 1, 'include_path' => 1,
'allowed_types' => Array(
0 => 'image/jpeg',
1 => 'image/pjpeg',
2 => 'image/png',
3 => 'image/gif',
4 => 'image/bmp'
),
'error_msgs' => Array( 'bad_file_format' => '!la_error_InvalidFileFormat!',
'bad_file_size' => '!la_error_FileTooLarge!',
'cant_save_file' => '!la_error_cant_save_file!'
)
),
'Enabled' => Array('formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'default' => 0, 'not_null'=>1),
'DefaultImg' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
'ThumbUrl' => Array('max_len' => 255),
'Priority' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
'ThumbPath' => Array( 'formatter'=>'kPictureFormatter', 'skip_empty'=>1, 'max_len' => 255,
'allowed_types' => Array(
0 => 'image/jpeg',
1 => 'image/pjpeg',
2 => 'image/png',
3 => 'image/gif',
4 => 'image/bmp'
),
'error_msgs' => Array( 'bad_file_format' => '!la_error_InvalidFileFormat!',
'bad_file_size' => '!la_error_FileTooLarge!',
'cant_save_file' => '!la_error_cant_save_file!'
)
),
'LocalThumb' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
'SameImages' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
),
'VirtualFields' => Array(
'Preview' => Array(),
'ImageUrl' => Array(),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon17_custom.gif','1_0'=>'icon16_image.gif','0_0'=>'icon16_image_disabled.gif','1_1'=>'icon16_image_primary.gif'),
'Fields' => Array(
'Name' => Array( 'title'=>'la_col_ImageName' , 'data_block' => 'image_caption_td'),
'AltName' => Array( 'title'=>'la_col_AltName' ),
'Url' => Array( 'title'=>'la_col_ImageUrl', 'data_block' => 'image_url_td' ),
'Enabled' => Array( 'title'=>'la_col_ImageEnabled' ),
'Preview' => Array( 'title'=>'la_col_Preview', 'data_block' => 'image_preview_td' ),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.4/core/units/images/images_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.4/core/units/statistics/statistics_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.4/core/units/statistics/statistics_tag_processor.php (revision 5727)
+++ branches/unlabeled/unlabeled-1.4.4/core/units/statistics/statistics_tag_processor.php (revision 5728)
Property changes on: branches/unlabeled/unlabeled-1.4.4/core/units/statistics/statistics_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.4/core/admin_templates/categories/xml/tree_categories.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.4.4/core/admin_templates/categories/xml/tree_categories.tpl (revision 5727)
+++ branches/unlabeled/unlabeled-1.4.4/core/admin_templates/categories/xml/tree_categories.tpl (revision 5728)
@@ -1,7 +1,7 @@
<inp2:m_XMLTemplate/>
<inp2:m_DefineElement name="category">
- <folder name="<inp2:Field name="Name"/>" icon="<inp2:c_ModulePath/>img/icons/icon24_catalog.gif" href="<inp2:CategoryLink template="catalog" pass="m" m_opener="r"/>" onclick="checkCatalog(<inp2:m_get name="c_id"/>)" load_url="<inp2:CategoryLink pass="m"/>"></folder>
+ <folder name="<inp2:Field name="Name"/>" icon="<inp2:c_ModulePath/>img/icons/icon24_catalog.gif" href="<inp2:CategoryLink index_file="browse.php" template="catalog" pass="m"/>" onclick="checkEditMode()" load_url="<inp2:CategoryLink pass="m"/>"></folder>
</inp2:m_DefineElement>
<tree>
<inp2:c_ListCategories render_as="category" row_start_render_as="html:" row_end_render_as="html:" per_page="-1"/>
</tree>
Property changes on: branches/unlabeled/unlabeled-1.4.4/core/admin_templates/categories/xml/tree_categories.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.4.1
\ No newline at end of property

Event Timeline