Attached Files |
per_page_in_unit_configs.patch [^] (37,875 bytes) 2010-02-23 14:03
[Show Content]
Index: custom/units/widgets/widgets_config.php
===================================================================
--- custom/units/widgets/widgets_config.php (revision 13152)
+++ custom/units/widgets/widgets_config.php (working copy)
@@ -22,10 +22,11 @@
'AutoLoad' => true,
'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'RewriteListener' => 'WidgetRewriteListener',
@@ -43,7 +44,7 @@
'AutoDelete' => true, // delete these items when parent is being deleted
'AutoClone' => true, // clone these items when parent is being cloned
*/
-
+
// used to build editing links in admin grids
'AdminTemplatePath' => 'widgets',
'AdminTemplatePrefix' => 'widget_',
@@ -65,9 +66,9 @@
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
-
-
+
+
'PermSection' => Array('main' => 'custom:widgets'),
'Sections' => Array (
@@ -101,8 +102,8 @@
'Sorting' => Array ('Title' => 'asc'),
)
),
-
- 'VirtualFields' => Array (
+
+ 'VirtualFields' => Array (
'VirtualActionField' => Array ('type' => 'string', 'default' => ''),
),
@@ -179,7 +180,7 @@
// 'Icons' => Array ('default' => 'icon16_custom.gif'),
'Fields' => Array (
'WidgetId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Title' => Array ('title' => 'la_col_Name', 'data_block' => 'grid_custom_td'),
+ 'Title' => Array ('title' => 'la_col_Name', 'data_block' => 'grid_custom_td'),
'Image' => Array ('title' => 'la_col_Image', 'data_block' => 'grid_image_td'),
'Type' => Array ('title' => 'la_col_Type', 'filter_block' => 'grid_options_filter'),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
Index: in-auction/units/category_listing/category_listing_config.php
===================================================================
--- in-auction/units/category_listing/category_listing_config.php (revision 13152)
+++ in-auction/units/category_listing/category_listing_config.php (working copy)
@@ -69,10 +69,11 @@
),
'QueryString' => Array(
1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'type',
- 5 => 'mode',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'type',
+ 6 => 'mode',
),
Index: in-auction/units/detail_template/detail_template_config.php
===================================================================
--- in-auction/units/detail_template/detail_template_config.php (revision 13152)
+++ in-auction/units/detail_template/detail_template_config.php (working copy)
@@ -35,10 +35,11 @@
*/
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'DetailTemplateId',
'StatusField' => Array(),
Index: in-auction/units/error_log/error_log_config.php
===================================================================
--- in-auction/units/error_log/error_log_config.php (revision 13152)
+++ in-auction/units/error_log/error_log_config.php (working copy)
@@ -25,10 +25,11 @@
),
'QueryString' => Array (
1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'type',
- 5 => 'mode',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'type',
+ 6 => 'mode',
),
Index: in-auction/units/listing/listing_config.php
===================================================================
--- in-auction/units/listing/listing_config.php (revision 13152)
+++ in-auction/units/listing/listing_config.php (working copy)
@@ -29,9 +29,10 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'type',
- 5 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'type',
+ 6 => 'mode',
),
'IDField' => 'ListingId',
Index: in-auction/units/product_listing/product_listing_config.php
===================================================================
--- in-auction/units/product_listing/product_listing_config.php (revision 13152)
+++ in-auction/units/product_listing/product_listing_config.php (working copy)
@@ -59,10 +59,11 @@
),
'QueryString' => Array(
1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'type',
- 5 => 'mode',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'type',
+ 6 => 'mode',
),
Index: in-auction/units/schedule/schedule_config.php
===================================================================
--- in-auction/units/schedule/schedule_config.php (revision 13152)
+++ in-auction/units/schedule/schedule_config.php (working copy)
@@ -33,10 +33,11 @@
// ),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'ScheduleId',
'StatusField' => Array('Status'),
Index: in-auction/units/sections/sections_config.php
===================================================================
--- in-auction/units/sections/sections_config.php (revision 13152)
+++ in-auction/units/sections/sections_config.php (working copy)
@@ -156,7 +156,7 @@
'QueryString' => Array(
1 => 'id',
- 2 => 'page',
+ 2 => 'Page',
3 => 'event',
4 => 'type',
5 => 'mode',
Index: in-auction/units/shipping/shipping_config.php
===================================================================
--- in-auction/units/shipping/shipping_config.php (revision 13152)
+++ in-auction/units/shipping/shipping_config.php (working copy)
@@ -74,10 +74,11 @@
),
'QueryString' => Array(
1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'type',
- 5 => 'mode',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'type',
+ 6 => 'mode',
),
Index: in-bulletin/units/censorship/censorship_config.php
===================================================================
--- in-bulletin/units/censorship/censorship_config.php (revision 13152)
+++ in-bulletin/units/censorship/censorship_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'CensorshipId',
Index: in-bulletin/units/emoticons/emoticons_config.php
===================================================================
--- in-bulletin/units/emoticons/emoticons_config.php (revision 13152)
+++ in-bulletin/units/emoticons/emoticons_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'EmoticonId',
Index: in-bulletin/units/poll_answers/poll_answers_config.php
===================================================================
--- in-bulletin/units/poll_answers/poll_answers_config.php (revision 13152)
+++ in-bulletin/units/poll_answers/poll_answers_config.php (working copy)
@@ -25,7 +25,8 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event'
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'AnswerId',
'TableName' => TABLE_PREFIX . 'PollsAnswers',
Index: in-bulletin/units/poll_comments/poll_comments_config.php
===================================================================
--- in-bulletin/units/poll_comments/poll_comments_config.php (revision 13152)
+++ in-bulletin/units/poll_comments/poll_comments_config.php (working copy)
@@ -25,7 +25,8 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event'
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'CommentId',
'TableName' => TABLE_PREFIX . 'PollsComments',
Index: in-bulletin/units/polls/polls_config.php
===================================================================
--- in-bulletin/units/polls/polls_config.php (revision 13152)
+++ in-bulletin/units/polls/polls_config.php (working copy)
@@ -23,10 +23,11 @@
'AutoLoad' => true,
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'PollId',
Index: in-bulletin/units/posts/posts_config.php
===================================================================
--- in-bulletin/units/posts/posts_config.php (revision 13152)
+++ in-bulletin/units/posts/posts_config.php (working copy)
@@ -25,7 +25,8 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'PostingId',
Index: in-bulletin/units/private_message_body/private_message_body_config.php
===================================================================
--- in-bulletin/units/private_message_body/private_message_body_config.php (revision 13152)
+++ in-bulletin/units/private_message_body/private_message_body_config.php (working copy)
@@ -25,7 +25,8 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'PMBodyId',
Index: in-bulletin/units/private_messages/private_messages_config.php
===================================================================
--- in-bulletin/units/private_messages/private_messages_config.php (revision 13152)
+++ in-bulletin/units/private_messages/private_messages_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'PmId',
Index: in-bulletin/units/topics/topics_config.php
===================================================================
--- in-bulletin/units/topics/topics_config.php (revision 13152)
+++ in-bulletin/units/topics/topics_config.php (working copy)
@@ -24,8 +24,9 @@
'QueryString' => Array(
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'ConfigPriority' => 0,
Index: in-commerce/units/addresses/addresses_config.php
===================================================================
--- in-commerce/units/addresses/addresses_config.php (revision 13152)
+++ in-commerce/units/addresses/addresses_config.php (working copy)
@@ -58,10 +58,11 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'AddressId',
Index: in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php
===================================================================
--- in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php (revision 13152)
+++ in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php (working copy)
@@ -29,10 +29,11 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'PaymentTypeId',
Index: in-commerce/units/affiliate_payments/affiliate_payments_config.php
===================================================================
--- in-commerce/units/affiliate_payments/affiliate_payments_config.php (revision 13152)
+++ in-commerce/units/affiliate_payments/affiliate_payments_config.php (working copy)
@@ -44,9 +44,10 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'AffiliatePaymentId',
Index: in-commerce/units/affiliate_plans/affiliate_plans_config.php
===================================================================
--- in-commerce/units/affiliate_plans/affiliate_plans_config.php (revision 13152)
+++ in-commerce/units/affiliate_plans/affiliate_plans_config.php (working copy)
@@ -23,10 +23,11 @@
'AggregateTags' => Array(
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'AffiliatePlanId',
Index: in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_config.php
===================================================================
--- in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_config.php (revision 13152)
+++ in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_config.php (working copy)
@@ -35,9 +35,10 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'AffiliateBracketId',
Index: in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php
===================================================================
--- in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php (revision 13152)
+++ in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php (working copy)
@@ -33,9 +33,10 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'AffiliateItemId',
'StatusField' => Array('Status'),
Index: in-commerce/units/affiliates/affiliates_config.php
===================================================================
--- in-commerce/units/affiliates/affiliates_config.php (revision 13152)
+++ in-commerce/units/affiliates/affiliates_config.php (working copy)
@@ -77,10 +77,11 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'RegularEvents' => Array(
Index: in-commerce/units/brackets/brackets_config.php
===================================================================
--- in-commerce/units/brackets/brackets_config.php (revision 13152)
+++ in-commerce/units/brackets/brackets_config.php (working copy)
@@ -33,9 +33,10 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'BracketId',
'TableName' => TABLE_PREFIX.'ShippingBrackets',
Index: in-commerce/units/coupon_items/coupon_items_config.php
===================================================================
--- in-commerce/units/coupon_items/coupon_items_config.php (revision 13152)
+++ in-commerce/units/coupon_items/coupon_items_config.php (working copy)
@@ -33,9 +33,10 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'CouponItemId',
'StatusField' => Array('Status'),
Index: in-commerce/units/coupons/coupons_config.php
===================================================================
--- in-commerce/units/coupons/coupons_config.php (revision 13152)
+++ in-commerce/units/coupons/coupons_config.php (working copy)
@@ -33,10 +33,11 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode', // 't' for temp '' for normal
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'CouponId',
'StatusField' => Array('Status'),
Index: in-commerce/units/currencies/currencies_config.php
===================================================================
--- in-commerce/units/currencies/currencies_config.php (revision 13152)
+++ in-commerce/units/currencies/currencies_config.php (working copy)
@@ -27,10 +27,11 @@
'AutoLoad' => true,
'hooks' => Array (),
'QueryString' => Array (
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
/*'Hooks' => Array (
Index: in-commerce/units/destinations/destinations_config.php
===================================================================
--- in-commerce/units/destinations/destinations_config.php (revision 13152)
+++ in-commerce/units/destinations/destinations_config.php (working copy)
@@ -33,9 +33,10 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'ZoneDestId',
'TableName' => TABLE_PREFIX.'ShippingZonesDestinations',
Index: in-commerce/units/discount_items/discount_items_config.php
===================================================================
--- in-commerce/units/discount_items/discount_items_config.php (revision 13152)
+++ in-commerce/units/discount_items/discount_items_config.php (working copy)
@@ -33,9 +33,10 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'DiscountItemId',
'StatusField' => Array('Status'),
Index: in-commerce/units/discounts/discounts_config.php
===================================================================
--- in-commerce/units/discounts/discounts_config.php (revision 13152)
+++ in-commerce/units/discounts/discounts_config.php (working copy)
@@ -22,10 +22,11 @@
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode', // 't' for temp '' for normal
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'DiscountId',
'StatusField' => Array('Status'),
Index: in-commerce/units/downloads/downloads_config.php
===================================================================
--- in-commerce/units/downloads/downloads_config.php (revision 13152)
+++ in-commerce/units/downloads/downloads_config.php (working copy)
@@ -38,9 +38,11 @@
),*/
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'TitlePresets' => Array(
'downloads_list'=>Array( 'prefixes' => Array('down_List'),
Index: in-commerce/units/files/files_config.php
===================================================================
--- in-commerce/units/files/files_config.php (revision 13152)
+++ in-commerce/units/files/files_config.php (working copy)
@@ -41,9 +41,10 @@
),*/
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'StatusField' => Array('Status', 'IsPrimary'),
'IDField' => 'FileId',
Index: in-commerce/units/gateway_field_values/gateway_field_values_config.php
===================================================================
--- in-commerce/units/gateway_field_values/gateway_field_values_config.php (revision 13152)
+++ in-commerce/units/gateway_field_values/gateway_field_values_config.php (working copy)
@@ -22,9 +22,10 @@
'AutoLoad' => false,
'hooks' => Array(),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'GWConfigValueId',
'TableName' => TABLE_PREFIX.'GatewayConfigValues',
Index: in-commerce/units/gateways/gateways_config.php
===================================================================
--- in-commerce/units/gateways/gateways_config.php (revision 13152)
+++ in-commerce/units/gateways/gateways_config.php (working copy)
@@ -43,9 +43,10 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'GWConfigFieldId',
'TableName' => TABLE_PREFIX.'GatewayConfigFields',
Index: in-commerce/units/gift_certificates/gift_certificates_config.php
===================================================================
--- in-commerce/units/gift_certificates/gift_certificates_config.php (revision 13152)
+++ in-commerce/units/gift_certificates/gift_certificates_config.php (working copy)
@@ -35,10 +35,11 @@
),
'QueryString' => Array (
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'GiftCertificateId',
Index: in-commerce/units/manufacturers/manufacturers_config.php
===================================================================
--- in-commerce/units/manufacturers/manufacturers_config.php (revision 13152)
+++ in-commerce/units/manufacturers/manufacturers_config.php (working copy)
@@ -33,10 +33,11 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'ManufacturerId',
'StatusField' => Array(),
Index: in-commerce/units/order_items/order_items_config.php
===================================================================
--- in-commerce/units/order_items/order_items_config.php (revision 13152)
+++ in-commerce/units/order_items/order_items_config.php (working copy)
@@ -45,8 +45,9 @@
'QueryString' => Array (
1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'OrderItemId',
Index: in-commerce/units/orders/orders_config.php
===================================================================
--- in-commerce/units/orders/orders_config.php (revision 13152)
+++ in-commerce/units/orders/orders_config.php (working copy)
@@ -108,10 +108,11 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'OrderId',
'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
Index: in-commerce/units/payment_type/payment_type_config.php
===================================================================
--- in-commerce/units/payment_type/payment_type_config.php (revision 13152)
+++ in-commerce/units/payment_type/payment_type_config.php (working copy)
@@ -22,10 +22,11 @@
'AutoLoad' => true,
'QueryString' => Array (
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'PaymentTypeId',
'StatusField' => Array ('Status', 'IsPrimary'),
Index: in-commerce/units/payment_type_currencies/payment_type_currencies_config.php
===================================================================
--- in-commerce/units/payment_type_currencies/payment_type_currencies_config.php (revision 13152)
+++ in-commerce/units/payment_type_currencies/payment_type_currencies_config.php (working copy)
@@ -22,10 +22,11 @@
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'Hooks' => Array(
Index: in-commerce/units/pricing/pricing_config.php
===================================================================
--- in-commerce/units/pricing/pricing_config.php (revision 13152)
+++ in-commerce/units/pricing/pricing_config.php (working copy)
@@ -54,9 +54,10 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'StatusField' => Array('IsPrimary'),
'IDField' => 'PriceId',
Index: in-commerce/units/product_option_combinations/product_option_combinations_config.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_combinations_config.php (revision 13152)
+++ in-commerce/units/product_option_combinations/product_option_combinations_config.php (working copy)
@@ -30,9 +30,10 @@
'AggregateTags' => Array(
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'TitleField' => 'CombinationId',
'IDField' => 'CombinationId',
Index: in-commerce/units/product_options/product_options_config.php
===================================================================
--- in-commerce/units/product_options/product_options_config.php (revision 13152)
+++ in-commerce/units/product_options/product_options_config.php (working copy)
@@ -35,9 +35,10 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'TitleField' => 'Name',
'IDField' => 'ProductOptionId',
Index: in-commerce/units/products/products_config.php
===================================================================
--- in-commerce/units/products/products_config.php (revision 13152)
+++ in-commerce/units/products/products_config.php (working copy)
@@ -23,8 +23,9 @@
'QueryString' => Array(
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'CatalogItem' => true,
Index: in-commerce/units/reports/reports_config.php
===================================================================
--- in-commerce/units/reports/reports_config.php (revision 13152)
+++ in-commerce/units/reports/reports_config.php (working copy)
@@ -22,10 +22,11 @@
'AutoLoad' => true,
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode', // 't' for temp '' for normal
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'Hooks' => Array(
Index: in-commerce/units/shipping/shipping_config.php
===================================================================
--- in-commerce/units/shipping/shipping_config.php (revision 13152)
+++ in-commerce/units/shipping/shipping_config.php (working copy)
@@ -40,10 +40,11 @@
),
),
'QueryString' => Array (
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'ShippingID',
'StatusField' => Array ('Status'),
@@ -82,7 +83,7 @@
'Sections' => Array (
'in-commerce:shipping_folder' => Array (
- 'parent' => 'in-commerce:setting_folder',
+ 'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_shipping',
'use_parent_header' => 1,
'label' => 'la_tab_Shipping',
Index: in-commerce/units/shipping_costs/shipping_costs_config.php
===================================================================
--- in-commerce/units/shipping_costs/shipping_costs_config.php (revision 13152)
+++ in-commerce/units/shipping_costs/shipping_costs_config.php (working copy)
@@ -33,9 +33,10 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'ShippingCostId',
'TableName' => TABLE_PREFIX.'ShippingCosts',
Index: in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 13152)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (working copy)
@@ -30,10 +30,11 @@
'Hooks' => Array (
),
'QueryString' => Array (
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'EngineId',
'StatusField' => Array ('Status'),
Index: in-commerce/units/taxes/taxes_config.php
===================================================================
--- in-commerce/units/taxes/taxes_config.php (revision 13152)
+++ in-commerce/units/taxes/taxes_config.php (working copy)
@@ -22,10 +22,11 @@
'AutoLoad' => true,
'hooks' => Array (),
'QueryString' => Array (
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
/*'Hooks' => Array (
Index: in-commerce/units/taxesdestinations/taxesdestinations_config.php
===================================================================
--- in-commerce/units/taxesdestinations/taxesdestinations_config.php (revision 13152)
+++ in-commerce/units/taxesdestinations/taxesdestinations_config.php (working copy)
@@ -22,9 +22,10 @@
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'Hooks' => Array(
Index: in-commerce/units/zones/zones_config.php
===================================================================
--- in-commerce/units/zones/zones_config.php (revision 13152)
+++ in-commerce/units/zones/zones_config.php (working copy)
@@ -22,9 +22,10 @@
'AutoLoad' => true,
'hooks' => Array (),
'QueryString' => Array (
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'ZoneID',
'TitleField' => 'Name',
Index: in-link/units/l-visits/l-visits_config.php
===================================================================
--- in-link/units/l-visits/l-visits_config.php (revision 13152)
+++ in-link/units/l-visits/l-visits_config.php (working copy)
@@ -58,8 +58,9 @@
'QueryString' => Array (
1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'VisitId',
Index: in-link/units/link_validation/link_validation_config.php
===================================================================
--- in-link/units/link_validation/link_validation_config.php (revision 13152)
+++ in-link/units/link_validation/link_validation_config.php (working copy)
@@ -39,8 +39,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'RegularEvents' => Array (
Index: in-link/units/links/links_config.php
===================================================================
--- in-link/units/links/links_config.php (revision 13152)
+++ in-link/units/links/links_config.php (working copy)
@@ -64,8 +64,9 @@
'QueryString' => Array(
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'AggregateTags' => Array (
Index: in-link/units/listing_types/listing_types_config.php
===================================================================
--- in-link/units/listing_types/listing_types_config.php (revision 13152)
+++ in-link/units/listing_types/listing_types_config.php (working copy)
@@ -36,9 +36,10 @@
'Hooks' => Array(),
'QueryString' => Array(
1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'ListingTypeId',
'TitleField' => 'Name',
Index: in-link/units/listings/listings_config.php
===================================================================
--- in-link/units/listings/listings_config.php (revision 13152)
+++ in-link/units/listings/listings_config.php (working copy)
@@ -37,9 +37,10 @@
'QueryString' => Array(
1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'RegularEvents' => Array(
Index: in-news/units/articles/articles_config.php
===================================================================
--- in-news/units/articles/articles_config.php (revision 13152)
+++ in-news/units/articles/articles_config.php (working copy)
@@ -71,8 +71,9 @@
'QueryString' => Array(
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'RegularEvents' => Array(
per_page_in_unit_configs_core.patch [^] (70,427 bytes) 2010-02-24 04:43
[Show Content]
Index: kernel/db/cat_event_handler.php
===================================================================
--- kernel/db/cat_event_handler.php (revision 13152)
+++ kernel/db/cat_event_handler.php (working copy)
@@ -1737,64 +1737,67 @@
*/
function SetPagination(&$event)
{
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
// get PerPage (forced -> session -> config -> 10)
- $per_page = $this->getPerPage($event);
+ $object->SetPerPage( $this->getPerPage($event) );
+ // main lists on Front-End have special get parameter for page
+ $page = $object->mainList ? $this->Application->GetVar('page') : false;
- $object =& $event->getObject();
- $object->SetPerPage($per_page);
- $this->Application->StoreVarDefault($event->getPrefixSpecial().'_Page', 1, true); // true for optional
+ if (!$page) {
+ // page is given in "env" variable for given prefix
+ $page = $this->Application->GetVar($event->getPrefixSpecial() . '_Page');
+ }
- $page = $this->Application->GetVar($event->getPrefixSpecial().'_Page');
- if (!$page)
- {
- $page = $this->Application->GetVar($event->getPrefixSpecial(true).'_Page');
+ if (!$page && $event->Special) {
+ // when not part of env, then variables like "prefix.special_Page" are
+ // replaced (by PHP) with "prefix_special_Page", so check for that too
+ $page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_Page');
}
- if (!$page)
- {
- if( $this->Application->RewriteURLs() )
- {
- $page = $this->Application->GetVar($event->Prefix.'_Page');
- if (!$page)
- {
- $page = $this->Application->RecallVar($event->Prefix.'_Page');
+ if (!$object->mainList) {
+ // main lists doesn't use session for page storing
+ $this->Application->StoreVarDefault($event->getPrefixSpecial() . '_Page', 1, true); // true for optional
+
+ if (!$page) {
+ if ($this->Application->RewriteURLs()) {
+ // when page not found by prefix+special, then try to search it without special at all
+ $page = $this->Application->GetVar($event->Prefix . '_Page');
+
+ if (!$page) {
+ // page not found in request -> get from session
+ $page = $this->Application->RecallVar($event->Prefix . '_Page');
+ }
+
+ if ($page) {
+ // page found in request -> store in session
+ $this->Application->StoreVar($event->getPrefixSpecial() . '_Page', $page, true); //true for optional
+ }
}
- if($page) $this->Application->StoreVar($event->getPrefixSpecial().'_Page', $page, true); //true for optional
+ else {
+ // page not found in request -> get from session
+ $page = $this->Application->RecallVar($event->getPrefixSpecial() . '_Page');
+ }
}
- else
- {
- $page = $this->Application->RecallVar($event->getPrefixSpecial().'_Page');
+ else {
+ // page found in request -> store in session
+ $this->Application->StoreVar($event->getPrefixSpecial() . '_Page', $page, true); //true for optional
}
- }
- else {
- $this->Application->StoreVar($event->getPrefixSpecial().'_Page', $page, true); //true for optional
- }
- if( !$event->getEventParam('skip_counting') )
- {
- $pages = $object->GetTotalPages();
- if($page > $pages)
- {
- $this->Application->StoreVar($event->getPrefixSpecial().'_Page', 1);
- $page = 1;
+ if ( !$event->getEventParam('skip_counting') ) {
+ // when stored page is larger, then maximal list page number
+ // (such case is also processed in kDBList::Query method)
+ $pages = $object->GetTotalPages();
+
+ if ($page > $pages) {
+ $page = 1;
+ $this->Application->StoreVar($event->getPrefixSpecial().'_Page', 1, true);
+ }
}
}
- /*$cur_per_page = $per_page;
- $per_page = $event->getEventParam('per_page');
- if ($per_page == 'list_next') {
-
- $cur_page = $page;
-
- $object =& $this->Application->recallObject($event->Prefix);
- $object->SetPerPage(1);
- $cur_item_index = $object->CurrentIndex;
-
- $page = ($cur_page-1) * $cur_per_page + $cur_item_index + 1;
- $object->SetPerPage(1);
- }*/
-
$object->SetPage($page);
}
Index: kernel/db/cat_tag_processor.php
===================================================================
--- kernel/db/cat_tag_processor.php (revision 13152)
+++ kernel/db/cat_tag_processor.php (working copy)
@@ -430,7 +430,13 @@
function CombinedSortingDropDownName($params)
{
- return $this->Prefix.'_CombinedSorting';
+ $list =& $this->GetList($params);
+
+ if ($list->mainList) {
+ return parent::CombinedSortingDropDownName($params);
+ }
+
+ return $list->Prefix . '_CombinedSorting';
}
/**
@@ -441,7 +447,13 @@
*/
function SubmitName($params)
{
- return 'events['.$this->Prefix.']['.$params['event'].']';
+ $list =& $this->GetList($params);
+
+ if ($list->mainList) {
+ return parent::SubmitName($params);
+ }
+
+ return 'events[' . $list->Prefix . '][' . $params['event'] . ']';
}
/**
@@ -452,7 +464,13 @@
*/
function VarName($params)
{
- return $this->Prefix.'_'.$params['type'];
+ $list =& $this->GetList($params);
+
+ if ($list->mainList) {
+ return parent::VarName($params);
+ }
+
+ return $list->Prefix . '_' . $params['type'];
}
/**
Index: kernel/db/db_event_handler.php
===================================================================
--- kernel/db/db_event_handler.php (revision 13152)
+++ kernel/db/db_event_handler.php (working copy)
@@ -638,6 +638,14 @@
$this->dbBuild($object,$event);
+ if (!$object->mainList && $event->getEventParam('main_list')) {
+ // once list is set to main, then even "requery" parameter can't remove that
+ /*$passed = $this->Application->GetVar('passed');
+ $this->Application->SetVar('passed', $passed . ',' . $event->Prefix);*/
+
+ $object->mainList = true;
+ }
+
$sql = $this->ListPrepareQuery($event);
$sql = $this->Application->ReplaceLanguageTags($sql);
$object->setSelectSQL($sql);
@@ -704,11 +712,20 @@
*/
function OnSetPerPage(&$event)
{
- $per_page = $this->Application->GetVar($event->getPrefixSpecial(true).'_PerPage');
- $this->Application->StoreVar($event->getPrefixSpecial().'_PerPage', $per_page);
+ $per_page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_PerPage');
+ $event->SetRedirectParam($event->getPrefixSpecial() . '_PerPage', $per_page);
+ $event->SetRedirectParam('pass', 'm,' . $event->getPrefixSpecial());
- $view_name = $this->Application->RecallVar($event->getPrefixSpecial().'_current_view');
- $this->Application->StorePersistentVar($event->getPrefixSpecial().'_PerPage.'.$view_name, $per_page);
+ if (!$this->Application->isAdminUser) {
+ $list_helper =& $this->Application->recallObject('ListHelper');
+ /* @var $list_helper ListHelper */
+
+ $this->_passListParams($event, 'per_page');
+
+ if ($per_page != $list_helper->getDefaultPerPage($event->Prefix)) {
+ $event->SetRedirectParam('per_page', $per_page);
+ }
+ }
}
/**
@@ -719,10 +736,63 @@
function OnSetPage(&$event)
{
$page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_Page');
- $event->SetRedirectParam($event->getPrefixSpecial().'_Page', $page);
+ $event->SetRedirectParam($event->getPrefixSpecial() . '_Page', $page);
+ $event->SetRedirectParam('pass', 'm,' . $event->getPrefixSpecial());
+
+ if (!$this->Application->isAdminUser) {
+ if ($page > 1) {
+ $event->SetRedirectParam('page', $page);
+ }
+
+ $this->_passListParams($event, 'page');
+ }
}
/**
+ * Passes through main list pagination and sorting
+ *
+ * @param kEvent $event
+ * @param string $skip_var
+ */
+ function _passListParams(&$event, $skip_var)
+ {
+ $param_names = array_diff(Array ('page', 'per_page', 'sort_by'), Array ($skip_var));
+
+ $list_helper =& $this->Application->recallObject('ListHelper');
+ /* @var $list_helper ListHelper */
+
+ foreach ($param_names as $param_name) {
+ $value = $this->Application->GetVar($param_name);
+
+ switch ($param_name) {
+ case 'page':
+ if ($value > 1) {
+ $event->SetRedirectParam('page', $value);
+ }
+ break;
+
+ case 'per_page':
+ if ($value > 0) {
+ if ($value != $list_helper->getDefaultPerPage($event->Prefix)) {
+ $event->SetRedirectParam('per_page', $value);
+ }
+ }
+ break;
+
+ case 'sort_by':
+ $event->setPseudoClass('_List');
+ $object =& $event->getObject( Array ('main_list' => 1) );
+ /* @var $object kDBList */
+
+ if ($list_helper->hasUserSorting($object)) {
+ $event->SetRedirectParam('sort_by', $value);
+ }
+ break;
+ }
+ }
+ }
+
+ /**
* Set's correct page for list
* based on data provided with event
*
@@ -732,49 +802,51 @@
*/
function SetPagination(&$event)
{
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
// get PerPage (forced -> session -> config -> 10)
- $per_page = $this->getPerPage($event);
+ $object->SetPerPage( $this->getPerPage($event) );
- $object =& $event->getObject();
- $object->SetPerPage($per_page);
- $this->Application->StoreVarDefault($event->getPrefixSpecial().'_Page', 1, true); // true for optional
+ // main lists on Front-End have special get parameter for page
+ $page = $object->mainList ? $this->Application->GetVar('page') : false;
- $page = $this->Application->GetVar($event->getPrefixSpecial().'_Page');
if (!$page) {
- $page = $this->Application->GetVar($event->getPrefixSpecial(true).'_Page');
+ // page is given in "env" variable for given prefix
+ $page = $this->Application->GetVar($event->getPrefixSpecial() . '_Page');
}
- if (!$page) {
- $page = $this->Application->RecallVar($event->getPrefixSpecial().'_Page');
- }
- else {
- $this->Application->StoreVar($event->getPrefixSpecial().'_Page', $page);
- }
- if( !$event->getEventParam('skip_counting') )
- {
- $pages = $object->GetTotalPages();
- if($page > $pages)
- {
- $this->Application->StoreVar($event->getPrefixSpecial().'_Page', 1);
- $page = 1;
- }
+ if (!$page && $event->Special) {
+ // when not part of env, then variables like "prefix.special_Page" are
+ // replaced (by PHP) with "prefix_special_Page", so check for that too
+ $page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_Page');
}
- /*$per_page = $event->getEventParam('per_page');
- if ($per_page == 'list_next') {
+ if (!$object->mainList) {
+ // main lists doesn't use session for page storing
+ $this->Application->StoreVarDefault($event->getPrefixSpecial() . '_Page', 1, true); // true for optional
- $cur_page = $page;
- $cur_per_page = $per_page;
+ if ($page) {
+ // page found in request -> store in session
+ $this->Application->StoreVar($event->getPrefixSpecial() . '_Page', $page, true); //true for optional
+ }
+ else {
+ // page not found in request -> get from session
+ $page = $this->Application->RecallVar($event->getPrefixSpecial() . '_Page');
+ }
- $object->SetPerPage(1);
+ if ( !$event->getEventParam('skip_counting') ) {
+ // when stored page is larger, then maximal list page number
+ // (such case is also processed in kDBList::Query method)
+ $pages = $object->GetTotalPages();
- $object =& $this->Application->recallObject($event->Prefix);
- $cur_item_index = $object->CurrentIndex;
+ if ($page > $pages) {
+ $page = 1;
+ $this->Application->StoreVar($event->getPrefixSpecial() . '_Page', 1, true);
+ }
+ }
+ }
- $page = ($cur_page-1) * $cur_per_page + $cur_item_index + 1;
- $object->SetPerPage(1);
- }*/
-
$object->SetPage($page);
}
@@ -786,53 +858,84 @@
*/
function getPerPage(&$event)
{
- // 1. per-page is passed as tag parameter to PrintList, InitList, etc.
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
$per_page = $event->getEventParam('per_page');
- /*if ($per_page == 'list_next') {
- $per_page = '';
- }*/
+ if ($per_page) {
+ // per-page is passed as tag parameter to PrintList, InitList, etc.
+ $config_mapping = $this->Application->getUnitOption($event->Prefix, 'ConfigMapping');
- // 2. per-page variable name is store into config variable
- $config_mapping = $this->Application->getUnitOption($event->Prefix, 'ConfigMapping');
- if ($config_mapping) {
- switch ( $per_page ){
- case 'short_list' :
- $per_page = $this->Application->ConfigValue($config_mapping['ShortListPerPage']);
- break;
- case 'default' :
- $per_page = $this->Application->ConfigValue($config_mapping['PerPage']);
- break;
+ // 2. per-page setting is stored in configuration variable
+ if ($config_mapping) {
+ // such pseudo per-pages are only defined in templates directly
+ switch ($per_page) {
+ case 'short_list':
+ $per_page = $this->Application->ConfigValue($config_mapping['ShortListPerPage']);
+ break;
+
+ case 'default':
+ $per_page = $this->Application->ConfigValue($config_mapping['PerPage']);
+ break;
+ }
}
+
+ return $per_page;
}
+ if (!$per_page && $object->mainList) {
+ // main lists on Front-End have special get parameter for per-page
+ $per_page = $this->Application->GetVar('per_page');
+ }
+
if (!$per_page) {
- // per-page is stored to persistent session
- $view_name = $this->Application->RecallVar($event->getPrefixSpecial().'_current_view');
+ // per-page is given in "env" variable for given prefix
+ $per_page = $this->Application->GetVar($event->getPrefixSpecial() . '_PerPage');
+ }
- $storage_prefix = $event->getEventParam('same_special') ? $event->Prefix : $event->getPrefixSpecial();
- $per_page = $this->Application->RecallPersistentVar($storage_prefix.'_PerPage.'.$view_name, ALLOW_DEFAULT_SETTINGS);
+ if (!$per_page && $event->Special) {
+ // when not part of env, then variables like "prefix.special_PerPage" are
+ // replaced (by PHP) with "prefix_special_PerPage", so check for that too
+ $per_page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_PerPage');
+ }
- if (!$per_page) {
- // per-page is stored to current session
- $per_page = $this->Application->RecallVar($storage_prefix.'_PerPage');
+ if (!$object->mainList) {
+ // per-page given in env and not in main list
+ $view_name = $this->Application->RecallVar($event->getPrefixSpecial() . '_current_view');
+
+ if ($per_page) {
+ // per-page found in request -> store in session and persistent session
+ $this->Application->StoreVar($event->getPrefixSpecial() . '_PerPage', $per_page, true); //true for optional
+ $this->Application->StorePersistentVar($event->getPrefixSpecial() . '_PerPage.' . $view_name, $per_page);
}
+ else {
+ // per-page not found in request -> get from pesistent session (or session)
+ $storage_prefix = $event->getEventParam('same_special') ? $event->Prefix : $event->getPrefixSpecial();
+ $per_page = $this->Application->RecallPersistentVar($storage_prefix . '_PerPage.' . $view_name, ALLOW_DEFAULT_SETTINGS);
- if (!$per_page) {
- if ($config_mapping) {
- if (!isset($config_mapping['PerPage'])) {
- trigger_error('Incorrect mapping of <span class="debug_error">PerPage</span> key in config for prefix <b>'.$event->Prefix.'</b>', E_USER_WARNING);
- }
- $per_page = $this->Application->ConfigValue($config_mapping['PerPage']);
- }
if (!$per_page) {
- // none of checked above per-page locations are useful, then try default value
- $default_per_page = $event->getEventParam('default_per_page');
- $per_page = is_numeric($default_per_page) ? $default_per_page : 10;
+ // per-page is stored to current session
+ $per_page = $this->Application->RecallVar($storage_prefix . '_PerPage');
}
}
}
+ if (!$per_page) {
+ // per page wan't found in request/session/persistent session
+ $list_helper =& $this->Application->recallObject('ListHelper');
+ /* @var $list_helper ListHelper */
+
+ // allow to override default per-page value from tag
+ $default_per_page = $event->getEventParam('default_per_page');
+
+ if (!is_numeric($default_per_page)) {
+ $default_per_page = 10;
+ }
+
+ $per_page = $list_helper->getDefaultPerPage($event->Prefix, $default_per_page);
+ }
+
return $per_page;
}
@@ -847,25 +950,36 @@
function SetSorting(&$event)
{
$event->setPseudoClass('_List');
+
$object =& $event->getObject();
+ /* @var $object kDBList */
- $storage_prefix = $event->getEventParam('same_special') ? $event->Prefix : $event->Prefix_Special;
- $cur_sort1 = $this->Application->RecallVar($storage_prefix.'_Sort1');
- $cur_sort1_dir = $this->Application->RecallVar($storage_prefix.'_Sort1_Dir');
- $cur_sort2 = $this->Application->RecallVar($storage_prefix.'_Sort2');
- $cur_sort2_dir = $this->Application->RecallVar($storage_prefix.'_Sort2_Dir');
+ if ($object->mainList) {
+ $sort_by = $this->Application->GetVar('sort_by');
+ $cur_sort1 = $cur_sort1_dir = $cur_sort2 = $cur_sort2_dir = false;
- $sorting_configs = $this->Application->getUnitOption($event->Prefix, 'ConfigMapping');
- $list_sortings = $this->Application->getUnitOption($event->Prefix, 'ListSortings');
- $sorting_prefix = getArrayValue($list_sortings, $event->Special) ? $event->Special : '';
+ if ($sort_by) {
+ list ($cur_sort1, $cur_sort1_dir) = explode(',', $sort_by);
+ }
+ }
+ else {
+ $storage_prefix = $event->getEventParam('same_special') ? $event->Prefix : $event->Prefix_Special;
+ $cur_sort1 = $this->Application->RecallVar($storage_prefix . '_Sort1');
+ $cur_sort1_dir = $this->Application->RecallVar($storage_prefix . '_Sort1_Dir');
+ $cur_sort2 = $this->Application->RecallVar($storage_prefix . '_Sort2');
+ $cur_sort2_dir = $this->Application->RecallVar($storage_prefix . '_Sort2_Dir');
+ }
$tag_sort_by = $event->getEventParam('sort_by');
+
if ($tag_sort_by) {
if ($tag_sort_by == 'random') {
$object->AddOrderField('RAND()', '');
}
else {
+ // multiple sortings could be specified at once
$tag_sort_by = explode('|', $tag_sort_by);
+
foreach ($tag_sort_by as $sorting_element) {
list ($by, $dir) = explode(',', $sorting_element);
$object->AddOrderField($by, $dir);
@@ -873,39 +987,49 @@
}
}
- if ($sorting_configs && isset ($sorting_configs['DefaultSorting1Field'])){
- $list_sortings[$sorting_prefix]['Sorting'] = Array(
+ $list_sortings = $this->Application->getUnitOption($event->Prefix, 'ListSortings');
+ $sorting_prefix = getArrayValue($list_sortings, $event->Special) ? $event->Special : '';
+ $sorting_configs = $this->Application->getUnitOption($event->Prefix, 'ConfigMapping');
+
+ if ($sorting_configs && array_key_exists('DefaultSorting1Field', $sorting_configs)) {
+ // sorting defined in configuration variables overrides one from unit config
+ $list_sortings[$sorting_prefix]['Sorting'] = Array (
$this->Application->ConfigValue($sorting_configs['DefaultSorting1Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting1Dir']),
$this->Application->ConfigValue($sorting_configs['DefaultSorting2Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting2Dir']),
);
}
- // Use default if not specified
- if ( !$cur_sort1 || !$cur_sort1_dir)
- {
- if ( $sorting = getArrayValue($list_sortings, $sorting_prefix, 'Sorting') ) {
+ // use default if not specified in session
+ if (!$cur_sort1 || !$cur_sort1_dir) {
+ $sorting = getArrayValue($list_sortings, $sorting_prefix, 'Sorting');
+
+ if ($sorting) {
reset($sorting);
$cur_sort1 = key($sorting);
$cur_sort1_dir = current($sorting);
+
if (next($sorting)) {
- $cur_sort2 = key($sorting);
- $cur_sort2_dir = current($sorting);
+ $cur_sort2 = key($sorting);
+ $cur_sort2_dir = current($sorting);
}
}
}
- if ( $forced_sorting = getArrayValue($list_sortings, $sorting_prefix, 'ForcedSorting') ) {
+ // always add forced sorting before any user sortings
+ $forced_sorting = getArrayValue($list_sortings, $sorting_prefix, 'ForcedSorting');
+
+ if ($forced_sorting) {
foreach ($forced_sorting as $field => $dir) {
$object->AddOrderField($field, $dir);
}
}
- if($cur_sort1 != '' && $cur_sort1_dir != '')
- {
+ // add user sortings
+ if ($cur_sort1 != '' && $cur_sort1_dir != '') {
$object->AddOrderField($cur_sort1, $cur_sort1_dir);
}
- if($cur_sort2 != '' && $cur_sort2_dir != '')
- {
+
+ if ($cur_sort2 != '' && $cur_sort2_dir != '') {
$object->AddOrderField($cur_sort2, $cur_sort2_dir);
}
}
@@ -1011,6 +1135,7 @@
$this->Application->StoreVar($event->Prefix_Special.'_Sort1', $cur_sort1);
$this->Application->StoreVar($event->Prefix_Special.'_Sort1_Dir', $cur_sort1_dir);
+
if ($use_double_sorting) {
$this->Application->StoreVar($event->Prefix_Special.'_Sort2', $cur_sort2);
$this->Application->StoreVar($event->Prefix_Special.'_Sort2_Dir', $cur_sort2_dir);
@@ -1024,17 +1149,43 @@
*/
function OnSetSortingDirect(&$event)
{
- $combined = $this->Application->GetVar($event->Prefix.'_CombinedSorting');
+ // used on Front-End in category item lists
+ $prefix_special = $event->getPrefixSpecial();
+ $combined = $this->Application->GetVar($event->getPrefixSpecial(true) . '_CombinedSorting');
+
if ($combined) {
- list($field, $dir) = explode('|', $combined);
- $this->Application->StoreVar($event->Prefix.'_Sort1', $field);
- $this->Application->StoreVar($event->Prefix.'_Sort1_Dir', $dir);
+ list ($field, $dir) = explode('|', $combined);
+
+ if ($this->Application->isAdmin || !$this->Application->GetVar('main_list')) {
+ $this->Application->StoreVar($prefix_special . '_Sort1', $field);
+ $this->Application->StoreVar($prefix_special . '_Sort1_Dir', $dir);
+ }
+ else {
+ $event->setPseudoClass('_List');
+ $this->Application->SetVar('sort_by', $field . ',' . $dir);
+
+ $object =& $event->getObject( Array ('main_list' => 1) );
+ /* @var $object kDBList */
+
+ $list_helper =& $this->Application->recallObject('ListHelper');
+ /* @var $list_helper ListHelper */
+
+ $this->_passListParams($event, 'sort_by');
+
+ if ($list_helper->hasUserSorting($object)) {
+ $event->SetRedirectParam('sort_by', $field . ',' . strtolower($dir));
+ }
+
+ $event->SetRedirectParam('pass', 'm');
+ }
+
return ;
}
- $field_pos = $this->Application->GetVar($event->Prefix.'_SortPos');
- $this->Application->LinkVar($event->Prefix.'_Sort'.$field_pos, $event->Prefix.'_Sort'.$field_pos);
- $this->Application->LinkVar($event->Prefix.'_Sort'.$field_pos.'_Dir', $event->Prefix.'_Sort'.$field_pos.'_Dir');
+ // used in "View Menu -> Sort" menu in administrative console
+ $field_pos = $this->Application->GetVar($event->getPrefixSpecial(true) . '_SortPos');
+ $this->Application->LinkVar($event->getPrefixSpecial(true) . '_Sort' . $field_pos, $prefix_special . '_Sort' . $field_pos);
+ $this->Application->LinkVar($event->getPrefixSpecial(true) . '_Sort' . $field_pos . '_Dir', $prefix_special . '_Sort' . $field_pos . '_Dir');
}
/**
Index: kernel/db/db_tag_processor.php
===================================================================
--- kernel/db/db_tag_processor.php (revision 13152)
+++ kernel/db/db_tag_processor.php (working copy)
@@ -388,17 +388,29 @@
}
$requery = isset($params['requery']) && $params['requery'];
+ $main_list = array_key_exists('main_list', $params) && $params['main_list'];
+
if ($list_name && !$requery) {
- $names_mapping = $this->Application->GetVar('NamesToSpecialMapping');
+ // list with "list_name" parameter
+ $names_mapping = $this->Application->GetVar('NamesToSpecialMapping', Array ());
- $special = is_array($names_mapping) && isset($names_mapping[$this->Prefix]) && isset($names_mapping[$this->Prefix][$list_name]) ? $names_mapping[$this->Prefix][$list_name] : false;
-// $special = getArrayValue($names_mapping, $this->Prefix, $list_name);
- if (!$special) {
- $special = $this->BuildListSpecial($params);
+ if (!array_key_exists($this->Prefix, $names_mapping)) {
+ // create prefix-based array to special mapping storage
+ $names_mapping[$this->Prefix] = Array ();
}
+
+ if (!array_key_exists($list_name, $names_mapping[$this->Prefix])) {
+ // special missing -> generate one
+ $special = $main_list ? $this->Special : $this->BuildListSpecial($params);
+ }
+ else {
+ // get special, formed during list initialization
+ $special = $names_mapping[$this->Prefix][$list_name];
+ }
}
else {
- $special = $this->BuildListSpecial($params);
+ // list without "list_name" parameter
+ $special = $main_list ? $this->Special : $this->BuildListSpecial($params);
}
$prefix_special = rtrim($this->Prefix.'.'.$special, '.');
@@ -445,6 +457,13 @@
return $ret;
}
+ function CombinedSortingDropDownName($params)
+ {
+ $list =& $this->GetList($params);
+
+ return $list->getPrefixSpecial() . '_CombinedSorting';
+ }
+
/**
* Prepares name for field with event in it (used only on front-end)
*
@@ -457,7 +476,7 @@
$prefix_special = $list->getPrefixSpecial();
- return 'events['.$prefix_special.']['.$params['event'].']';
+ return 'events[' . $prefix_special . '][' . $params['event'] . ']';
}
/**
@@ -636,20 +655,81 @@
function PageLink($params)
{
- $t = isset($params['template']) ? $params['template'] : '';
- unset($params['template']);
+ static $default_per_page = Array ();
- if (!$t) $t = $this->Application->GetVar('t');
+ $object =& $this->GetList($params);
+ /* @var $object kDBList */
- if (isset($params['page'])) {
- $this->Application->SetVar($this->getPrefixSpecial().'_Page', $params['page']);
+ // process sorting
+ if ($object->mainList) {
+ if (!array_key_exists('sort_by', $params)) {
+ $sort_by = $this->Application->GetVar('sort_by');
+
+ if ($sort_by !== false) {
+ $params['sort_by'] = $sort_by;
+ }
+ }
+ }
+
+ $prefix_special = $this->getPrefixSpecial();
+
+ // process page
+ $page = array_key_exists('page', $params) ? $params['page'] : $this->Application->GetVar($prefix_special . '_Page');
+
+ if (!$page) {
+ // ensure, that page is always present
+ if ($object->mainList) {
+ $params[$prefix_special . '_Page'] = $this->Application->GetVar('page', 1);
+ }
+ else {
+ $params[$prefix_special . '_Page'] = 1;
+ }
+ }
+
+ if (array_key_exists('page', $params)) {
+ $params[$prefix_special . '_Page'] = $params['page'];
unset($params['page']);
}
- if (!isset($params['pass'])) {
- $params['pass'] = 'm,'.$this->getPrefixSpecial();
+ // process per-page
+ $per_page = array_key_exists('per_page', $params) ? $params['per_page'] : $this->Application->GetVar($prefix_special . '_PerPage');
+
+ if (!$per_page) {
+ // ensure, that per-page is always present
+ list ($prefix, ) = explode('.', $prefix_special);
+
+ if (!array_key_exists($prefix, $default_per_page)) {
+ $list_helper =& $this->Application->recallObject('ListHelper');
+ /* @var $list_helper ListHelper */
+
+ $default_per_page[$prefix] = $list_helper->getDefaultPerPage($prefix);
+ }
+
+ if ($object->mainList) {
+ $params[$prefix_special . '_PerPage'] = $this->Application->GetVar('per_page', $default_per_page[$prefix]);
+ }
+ else {
+ $params[$prefix_special . '_PerPage'] = $default_per_page[$prefix];
+ }
}
+ if (array_key_exists('per_page', $params)) {
+ $params[$prefix_special . '_PerPage'] = $params['per_page'];
+ unset($params['per_page']);
+ }
+
+ if (!array_key_exists('pass', $params)) {
+ $params['pass'] = 'm,' . $prefix_special;
+ }
+
+ // process template
+ $t = array_key_exists('template', $params) ? $params['template'] : '';
+ unset($params['template']);
+
+ if (!$t) {
+ $t = $this->Application->GetVar('t');
+ }
+
return $this->Application->HREF($t, '', $params);
}
@@ -1171,7 +1251,28 @@
return $this->PrintPages($params);
}
+ function PerPageBar($params)
+ {
+ $object =& $this->GetList($params);
+ $ret = '';
+ $per_pages = explode(';', $params['per_pages']);
+ $block_params = $this->prepareTagParams($params);
+ $block_params['name'] = $params['render_as'];
+
+ foreach ($per_pages as $per_page) {
+ $block_params['per_page'] = $per_page;
+ $this->Application->SetVar($this->getPrefixSpecial() . '_PerPage', $per_page);
+ $block_params['selected'] = $per_page == $object->PerPage;
+
+ $ret .= $this->Application->ParseBlock($block_params, 1);
+ }
+
+ $this->Application->SetVar($this->getPrefixSpecial() . '_PerPage', $object->PerPage);
+
+ return $ret;
+ }
+
/**
* Returns field name (processed by kMultiLanguage formatter
* if required) and item's id from it's IDField or field required
@@ -1312,52 +1413,11 @@
function OrderChanged($params)
{
$list =& $this->GetList($params);
- $user_sorting_start = $this->getUserSortIndex();
- $sorting_configs = $this->Application->getUnitOption($this->Prefix, 'ConfigMapping', Array ());
- $list_sortings = $this->Application->getUnitOption($this->Prefix, 'ListSortings', Array ());
- $sorting_prefix = getArrayValue($list_sortings, $this->Special) ? $this->Special : '';
+ $list_helper =& $this->Application->recallObject('ListHelper');
+ /* @var $list_helper ListHelper */
- if (array_key_exists('DefaultSorting1Field', $sorting_configs)) {
- $list_sortings[$sorting_prefix]['Sorting'] = Array (
- $this->Application->ConfigValue($sorting_configs['DefaultSorting1Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting1Dir']),
- $this->Application->ConfigValue($sorting_configs['DefaultSorting2Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting2Dir']),
- );
- }
-
- $sorting = getArrayValue($list_sortings, $sorting_prefix, 'Sorting');
- $sort_fields = is_array($sorting) ? array_keys($sorting) : Array ();
-
- for ($order_number = 0; $order_number < 2; $order_number++) {
- // currect sorting in list
- $sorting_pos = $user_sorting_start + $order_number;
- $current_order_field = $list->GetOrderField($sorting_pos, true);
- $current_order_direction = $list->GetOrderDirection($sorting_pos, true);
-
- if (!$current_order_field || !$current_order_direction) {
- // no sorting defined for this sorting position
- continue;
- }
-
- // user sorting found
- if (array_key_exists($order_number, $sort_fields)) {
- // default sorting found
- $default_order_field = $sort_fields[$order_number];
- $default_order_direction = $sorting[$default_order_field];
-
- if ($current_order_field != $default_order_field || $current_order_direction != $default_order_direction) {
- // #1. user sorting differs from default sorting -> changed
- return true;
- }
- }
- else {
- // #2. user sorting + no default sorting -> changed
- return true;
- }
- }
-
- // #3. user sorting match default or not defined -> not changed
- return false;
+ return $list_helper->hasUserSorting($list);
}
/**
@@ -2317,6 +2377,7 @@
function PerPageSelected($params)
{
$list =& $this->GetList($params);
+
return $list->PerPage == $params['per_page'] ? $params['selected'] : '';
}
@@ -2330,7 +2391,7 @@
{
$list =& $this->GetList($params);
- return $list->getPrefixSpecial().'_'.$params['type'];
+ return $list->getPrefixSpecial() . '_' . $params['type'];
}
/**
Index: kernel/db/dblist.php
===================================================================
--- kernel/db/dblist.php (revision 13152)
+++ kernel/db/dblist.php (working copy)
@@ -22,13 +22,12 @@
*/
class kDBList extends kDBBase {
-
/**
* Holds totals for fields specified in config
*
* @var Array
*/
- var $Totals = Array();
+ var $Totals = Array ();
/**
* Description
@@ -61,7 +60,7 @@
*
* @var int
*/
- var $SelectedCount=0;
+ var $SelectedCount = 0;
/**
* Array of records selected
@@ -127,7 +126,7 @@
* @var kMultipleFilter
* @access private
*/
- var $WhereFilter = Array(FLT_SYSTEM => null, FLT_NORMAL => null, FLT_SEARCH => null, FLT_VIEW => null);
+ var $WhereFilter = Array (FLT_SYSTEM => null, FLT_NORMAL => null, FLT_SEARCH => null, FLT_VIEW => null);
/**
* Holds list HAVING filter object
@@ -135,17 +134,26 @@
* @var kMultipleFilter
* @access private
*/
- var $HavingFilter = Array(FLT_SYSTEM => null, FLT_NORMAL => null, FLT_SEARCH => null, FLT_VIEW => null);
+ var $HavingFilter = Array (FLT_SYSTEM => null, FLT_NORMAL => null, FLT_SEARCH => null, FLT_VIEW => null);
- var $AggregateFilter = Array(FLT_SYSTEM => null, FLT_NORMAL => null);
+ var $AggregateFilter = Array (FLT_SYSTEM => null, FLT_NORMAL => null);
- var $GroupByFields = Array();
+ var $GroupByFields = Array ();
var $Queried = false;
+
var $Counted = false;
+
var $TotalsCalculated = false;
/**
+ * Identifies this list as main on the page, that allows to react on "page", "per_page" and "sort_by" parameters from url
+ *
+ * @var bool
+ */
+ var $mainList = false;
+
+ /**
* Creates kDBList
*
* @return kDBList
@@ -289,19 +297,19 @@
if( $this->GetGroupClause() )
{
- $this->RecordsCount = count( $this->Conn->GetCol($sql) );
+ $this->RecordsCount = count( $this->Conn->GetCol($sql) );
}
else
{
$this->RecordsCount = (int)$this->Conn->GetOne($sql);
}
- $system_sql = $this->GetSelectSQL(true,true);
- if($system_sql == $all_sql) //no need to query the same again
- {
- $this->NoFilterCount = $this->RecordsCount;
- return;
- }
+ $system_sql = $this->GetSelectSQL(true,true);
+ if($system_sql == $all_sql) //no need to query the same again
+ {
+ $this->NoFilterCount = $this->RecordsCount;
+ return;
+ }
$sql = $this->getCountSQL($system_sql);
if( $this->GetGroupClause() )
Index: kernel/event_manager.php
===================================================================
--- kernel/event_manager.php (revision 13152)
+++ kernel/event_manager.php (working copy)
@@ -168,7 +168,7 @@
unset($this->queryMaps[$prefix]);
}
-// 'passed' is set later in ProcessRequest - do we really need it here? (it breakes HTTPQuery initialization...)
+// 'passed' is set later in ProcessRequest - do we really need it here? (it breakes HTTPQuery initialization...)
// $this->Application->SetVar('passed', implode(',', array_keys($this->queryMaps)) );
return $query_map;
}
@@ -351,7 +351,11 @@
$query_map = array_flip($query_map);
if (isset($query_map['event'])) {
$event_name = $this->Application->GetVar($prefix_special . '_event');
- if ($event_name) {
+
+ // we need to check for pre 5.1.0 url format, because of "PerPage"
+ // query string part (that was added in place of "event" query
+ // string part) is available only since 5.1.0 version
+ if ($event_name && !is_numeric($event_name)) {
$events[$prefix_special] = $event_name;
}
}
Index: kernel/processors/main_processor.php
===================================================================
--- kernel/processors/main_processor.php (revision 13152)
+++ kernel/processors/main_processor.php (working copy)
@@ -166,7 +166,10 @@
function FormAction($params)
{
- $params['pass'] = 'all,m';
+ if (!array_key_exists('pass', $params)) {
+ $params['pass'] = 'all,m';
+ }
+
$params['pass_category'] = 1;
return $this->Application->HREF('', '', $params);
@@ -1034,4 +1037,24 @@
$format = isset($params['format']) ? $params['format'] : 'd.m.Y H:i:s';
return adodb_date($format);
}
+
+ function GetUrlHiddenFileds($params)
+ {
+ $vars = Array ('page', 'per_page', 'sort_by');
+ $ret = '<input type="hidden" name="main_list" value="1"/>';
+
+ if (array_key_exists('skip', $params)) {
+ $vars = array_diff($vars, $params['skip']);
+ }
+
+ foreach ($vars as $var_name) {
+ $var_value = $this->Application->GetVar($var_name);
+
+ if ($var_value) {
+ $ret .= '<input type="hidden" name="' . $var_name . '" value="' . $var_value . '"/>';
+ }
+ }
+
+ return $ret;
+ }
}
Index: units/agents/agents_config.php
===================================================================
--- units/agents/agents_config.php (revision 13152)
+++ units/agents/agents_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'Hooks' => Array (
Index: units/ban_rules/ban_rules_config.php
===================================================================
--- units/ban_rules/ban_rules_config.php (revision 13152)
+++ units/ban_rules/ban_rules_config.php (working copy)
@@ -25,8 +25,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'RuleId',
Index: units/categories/categories_config.php
===================================================================
--- units/categories/categories_config.php (revision 13152)
+++ units/categories/categories_config.php (working copy)
@@ -59,8 +59,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'AggregateTags' => Array (
Index: units/categories/categories_tag_processor.php
===================================================================
--- units/categories/categories_tag_processor.php (revision 13152)
+++ units/categories/categories_tag_processor.php (working copy)
@@ -737,7 +737,7 @@
*/
function SubmitName($params)
{
- return 'events['.$this->Prefix.']['.$params['event'].']';
+ return 'events[' . $this->Prefix . '][' . $params['event'] . ']';
}
/**
@@ -872,23 +872,9 @@
function PageLink($params)
{
- $t = isset($params['template']) ? $params['template'] : '';
- unset($params['template']);
+ $params['m_cat_page'] = $this->Application->GetVar($this->getPrefixSpecial() . '_Page');
- if (!$t) $t = $this->Application->GetVar('t');
-
- if (isset($params['page'])) {
- $this->Application->SetVar($this->getPrefixSpecial().'_Page', $params['page']);
- unset($params['page']);
- }
-
- $params['m_cat_page'] = $this->Application->GetVar($this->getPrefixSpecial().'_Page');
-
- if (!isset($params['pass'])) {
- $params['pass'] = 'm,'.$this->getPrefixSpecial();
- }
-
- return $this->Application->HREF($t, '', $params);
+ return parent::PageLink($params);
}
/**
Index: units/category_items/category_items_config.php
===================================================================
--- units/category_items/category_items_config.php (revision 13152)
+++ units/category_items/category_items_config.php (working copy)
@@ -30,9 +30,10 @@
'cms-ci'=> Array('ParentPrefix' => 'cms',),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'CategoryId', // in this case idfield doesn't exit in destination table
'StatusField' => Array('PrimaryCat'), // field, that is affected by Approve/Decline events
Index: units/config_search/config_search_config.php
===================================================================
--- units/config_search/config_search_config.php (revision 13152)
+++ units/config_search/config_search_config.php (working copy)
@@ -48,9 +48,10 @@
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'SearchConfigId',
Index: units/configuration/configuration_config.php
===================================================================
--- units/configuration/configuration_config.php (revision 13152)
+++ units/configuration/configuration_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'VariableId',
Index: units/content/content_config.php
===================================================================
--- units/content/content_config.php (revision 13152)
+++ units/content/content_config.php (working copy)
@@ -24,8 +24,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode', // needed?
),
'IDField' => 'PageContentId',
Index: units/custom_fields/custom_fields_config.php
===================================================================
--- units/custom_fields/custom_fields_config.php (revision 13152)
+++ units/custom_fields/custom_fields_config.php (working copy)
@@ -24,10 +24,11 @@
'hooks' => Array(),
'QueryString' => Array(
1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'type',
- 5 => 'mode',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'type',
+ 6 => 'mode',
),
'Hooks' => Array(
Index: units/email_events/email_events_config.php
===================================================================
--- units/email_events/email_events_config.php (revision 13152)
+++ units/email_events/email_events_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'EventId',
Index: units/email_queue/email_queue_config.php
===================================================================
--- units/email_queue/email_queue_config.php (revision 13152)
+++ units/email_queue/email_queue_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'EmailQueueId',
Index: units/favorites/favorites_config.php
===================================================================
--- units/favorites/favorites_config.php (revision 13152)
+++ units/favorites/favorites_config.php (working copy)
@@ -63,9 +63,10 @@
),
'QueryString' => Array (
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'FavoriteId',
Index: units/files/files_config.php
===================================================================
--- units/files/files_config.php (revision 13152)
+++ units/files/files_config.php (working copy)
@@ -25,8 +25,9 @@
'QueryString' => Array (
1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'FileId',
Index: units/form_fields/form_fields_config.php
===================================================================
--- units/form_fields/form_fields_config.php (revision 13152)
+++ units/form_fields/form_fields_config.php (working copy)
@@ -22,9 +22,10 @@
'TagProcessorClass' => Array('class'=>'FormFieldsTagProcessor','file'=>'form_fields_tp.php'),
'AutoLoad' => true,
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'FormFieldId',
Index: units/form_submissions/form_submissions_config.php
===================================================================
--- units/form_submissions/form_submissions_config.php (revision 13152)
+++ units/form_submissions/form_submissions_config.php (working copy)
@@ -22,9 +22,10 @@
'TagProcessorClass' => Array('class'=>'FormSubmissionTagProcessor', 'file' => 'form_submission_tp.php', 'build_event'=>'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'Hooks' => Array(
Index: units/forms/forms_config.php
===================================================================
--- units/forms/forms_config.php (revision 13152)
+++ units/forms/forms_config.php (working copy)
@@ -22,10 +22,11 @@
'TagProcessorClass' => Array('class'=>'FormsTagProcessor','file'=>'forms_tp.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'Hooks' => Array(
Array(
Index: units/groups/groups_config.php
===================================================================
--- units/groups/groups_config.php (revision 13152)
+++ units/groups/groups_config.php (working copy)
@@ -26,9 +26,10 @@
'QueryString' => Array (
1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'GroupId',
Index: units/helpers/helpers_config.php
===================================================================
--- units/helpers/helpers_config.php (revision 13152)
+++ units/helpers/helpers_config.php (working copy)
@@ -58,5 +58,6 @@
Array ('class' => 'kXMLHelper', 'pseudo' => 'kXMLHelper', 'file' => 'xml_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
Array ('class' => 'kCatDBItemExportHelper', 'pseudo' => 'CatItemExportHelper', 'file' => 'cat_dbitem_export_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
Array ('class' => 'EmailMessageHelper', 'pseudo' => 'EmailMessageHelper', 'file' => 'email_message_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
+ Array ('class' => 'ListHelper', 'pseudo' => 'ListHelper', 'file' => 'list_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
),
);
\ No newline at end of file
Index: units/helpers/list_helper.php
===================================================================
--- units/helpers/list_helper.php (revision 0)
+++ units/helpers/list_helper.php (revision 0)
@@ -0,0 +1,125 @@
+<?php
+
+ class ListHelper extends kHelper {
+
+ /**
+ * Detects, that current sorting of the list is not default
+ *
+ * @param kDBList $list
+ * @return bool
+ */
+ function hasUserSorting(&$list)
+ {
+ static $cache = Array ();
+
+ if (array_key_exists($list->getPrefixSpecial(), $cache)) {
+ return $cache[ $list->getPrefixSpecial() ];
+ }
+
+ $user_sorting_start = $this->getUserSortIndex($list);
+
+ $sorting_configs = $this->Application->getUnitOption($list->Prefix, 'ConfigMapping', Array ());
+ $list_sortings = $this->Application->getUnitOption($list->Prefix, 'ListSortings', Array ());
+ $sorting_prefix = getArrayValue($list_sortings, $list->Special) ? $list->Special : '';
+
+ if (array_key_exists('DefaultSorting1Field', $sorting_configs)) {
+ $list_sortings[$sorting_prefix]['Sorting'] = Array (
+ $this->Application->ConfigValue($sorting_configs['DefaultSorting1Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting1Dir']),
+ $this->Application->ConfigValue($sorting_configs['DefaultSorting2Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting2Dir']),
+ );
+ }
+
+ $sorting = getArrayValue($list_sortings, $sorting_prefix, 'Sorting');
+ $sort_fields = is_array($sorting) ? array_keys($sorting) : Array ();
+
+ for ($order_number = 0; $order_number < 2; $order_number++) {
+ // currect sorting in list
+ $sorting_pos = $user_sorting_start + $order_number;
+ $current_order_field = $list->GetOrderField($sorting_pos, true);
+ $current_order_direction = $list->GetOrderDirection($sorting_pos, true);
+
+ if (!$current_order_field || !$current_order_direction) {
+ // no sorting defined for this sorting position
+ continue;
+ }
+
+ // remove language prefix from field
+ $field_options = $list->GetFieldOptions($current_order_field);
+ if (array_key_exists('formatter', $field_options) && $field_options['formatter'] == 'kMultiLanguage') {
+ // remove language prefix
+ $current_order_field = preg_replace('/^l[\d]+_(.*)/', '\\1', $current_order_field);
+ }
+
+ // user sorting found
+ if (array_key_exists($order_number, $sort_fields)) {
+ // default sorting found
+ $default_order_field = $sort_fields[$order_number];
+ $default_order_direction = $sorting[$default_order_field]; // because people can write
+
+ if ($current_order_field != $default_order_field || strcasecmp($current_order_direction, $default_order_direction) != 0) {
+ // #1. user sorting differs from default sorting -> changed
+ $cache[ $list->getPrefixSpecial() ] = true;
+ return true;
+ }
+ }
+ else {
+ // #2. user sorting + no default sorting -> changed
+ $cache[ $list->getPrefixSpecial() ] = true;
+ return true;
+ }
+ }
+
+ // #3. user sorting match default or not defined -> not changed
+ $cache[ $list->getPrefixSpecial() ] = false;
+ return false;
+ }
+
+ /**
+ * Returns default per-page value for given prefix
+ *
+ * @param string $prefix
+ * @param int $default
+ * @return int
+ */
+ function getDefaultPerPage($prefix, $default = 10)
+ {
+ $ret = false;
+ $config_mapping = $this->Application->getUnitOption($prefix, 'ConfigMapping');
+
+ if ($config_mapping) {
+ if (!array_key_exists('PerPage', $config_mapping)) {
+ trigger_error('Incorrect mapping of <span class="debug_error">PerPage</span> key in config for prefix <strong>' . $event->Prefix . '</strong>', E_USER_WARNING);
+ }
+
+ $per_page = $this->Application->ConfigValue($config_mapping['PerPage']);
+
+ if ($per_page) {
+ return $per_page;
+ }
+ }
+
+ // none of checked above per-page locations are useful, then try default value
+ return $default;
+ }
+
+ /**
+ * Returns index where 1st changable sorting field begins
+ *
+ * @param kDBList $list
+ * @return int
+ * @todo This is copy of kDBTagProcessor::getUserSortIndex method.
+ * Can't call helper there, because it will slow down grid output
+ * when we have a lot of columns
+ */
+ function getUserSortIndex(&$list)
+ {
+ $list_sortings = $this->Application->getUnitOption($list->Prefix, 'ListSortings');
+ $sorting_prefix = getArrayValue($list_sortings, $list->Special) ? $list->Special : '';
+
+ $user_sorting_start = 0;
+ if ( $forced_sorting = getArrayValue($list_sortings, $sorting_prefix, 'ForcedSorting') ) {
+ $user_sorting_start = count($forced_sorting);
+ }
+ return $user_sorting_start;
+ }
+ }
\ No newline at end of file
Index: units/helpers/mod_rewrite_helper.php
===================================================================
--- units/helpers/mod_rewrite_helper.php (revision 13152)
+++ units/helpers/mod_rewrite_helper.php (working copy)
@@ -103,12 +103,10 @@
}
foreach ($vars as $name => $value) {
- $this->HTTPQuery->Set($name,$value);
+ $this->HTTPQuery->Set($name, $value);
}
-// if ($restored) {
- $this->InitAll();
-// }
+ $this->InitAll(); // also will use parsed language to load phrases from it
$this->HTTPQuery->finalizeParsing($passed);
}
@@ -162,10 +160,10 @@
if (($this->_modulePrefix === false) && in_array('parseCategory', $this->_partsFound)) {
// no item found, but category found -> module index page
- foreach ($this->Application->RewriteListeners as $prefix => $listener) {
+ /*foreach ($this->Application->RewriteListeners as $prefix => $listener) {
// no idea what module we are talking about, so pass info form all modules
$vars['pass'][] = $prefix;
- }
+ }*/
return $vars;
}
@@ -211,7 +209,7 @@
foreach ($this->Application->RewriteListeners as $prefix => $listener) {
// set default page
- $vars[$prefix . '_Page'] = 1; // will override page in session in case, when none is given in url
+ // $vars[$prefix . '_Page'] = 1; // will override page in session in case, when none is given in url
if ($page_number) {
// page given in url - use it
@@ -248,7 +246,7 @@
$physical_template = array_search($template_path, $this->Application->structureTemplateMapping);
- if ($physical_template !== false) {
+ if (($physical_template !== false) && (substr($physical_template, 0, 3) != 'id:')) {
// replace menu template name with it's actual template name on disk
list ($template_path) = explode(':', $physical_template, 2);
}
@@ -443,7 +441,6 @@
WHERE Enabled = 1
ORDER BY SortKey DESC';
$language_info = $this->Conn->GetRow($sql);
- $this->Application->Phrases = new PhrasesCache();
if ($language_info && $language_info['LanguageId'] && $language_info['SortKey']) {
// primary language will be selected in case, when $url_part doesn't match to other's language pack name
@@ -565,9 +562,9 @@
*/
function removePages()
{
- foreach ($this->Application->RewriteListeners as $prefix => $listener) {
+ /*foreach ($this->Application->RewriteListeners as $prefix => $listener) {
$this->Application->DeleteVar($prefix . '_Page');
- }
+ }*/
}
/**
@@ -681,6 +678,8 @@
*/
function _buildCategoryItemUrl($prefix_special, &$params, $keep_events)
{
+ static $default_per_page = Array ();
+
$ret = '';
list ($prefix) = explode('.', $prefix_special);
$processed_params = $this->getProcessedParams($prefix_special, $params, $keep_events);
@@ -689,6 +688,13 @@
return '';
}
+ if (!array_key_exists($prefix, $default_per_page)) {
+ $list_helper =& $this->Application->recallObject('ListHelper');
+ /* @var $list_helper ListHelper */
+
+ $default_per_page[$prefix] = $list_helper->getDefaultPerPage($prefix);
+ }
+
if ($processed_params[$prefix_special . '_id']) {
// this allows to fill 3 cache records with one query (see this method for details)
$category_id = array_key_exists('m_cat_id', $params) ? $params['m_cat_id'] : $this->Application->GetVar('m_cat_id');
@@ -720,9 +726,16 @@
// category item prefix and $params['pass_category'] will not be added automatically
$params['pass_category'] = true;
}
- else {
- $ret .= $processed_params[$prefix_special . '_Page'] . '/';
+ elseif ($processed_params[$prefix_special . '_Page'] > 1) {
+ // $ret .= $processed_params[$prefix_special . '_Page'] . '/';
+ $params['page'] = $processed_params[$prefix_special . '_Page'];
}
+
+ $per_page = $processed_params[$prefix_special . '_PerPage'];
+
+ if ($per_page && ($per_page != $default_per_page[$prefix])) {
+ $params['per_page'] = $processed_params[$prefix_special . '_PerPage'];
+ }
}
return mb_strtolower( rtrim($ret, '/') );
Index: units/images/images_config.php
===================================================================
--- units/images/images_config.php (revision 13152)
+++ units/images/images_config.php (working copy)
@@ -70,9 +70,10 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'RegularEvents' => Array (
Index: units/languages/languages_config.php
===================================================================
--- units/languages/languages_config.php (revision 13152)
+++ units/languages/languages_config.php (working copy)
@@ -47,10 +47,11 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'LanguageId',
Index: units/logs/change_logs/change_logs_config.php
===================================================================
--- units/logs/change_logs/change_logs_config.php (revision 13152)
+++ units/logs/change_logs/change_logs_config.php (working copy)
@@ -30,8 +30,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'ChangeLogId',
Index: units/logs/email_logs/email_logs_config.php
===================================================================
--- units/logs/email_logs/email_logs_config.php (revision 13152)
+++ units/logs/email_logs/email_logs_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'EmailLogId',
Index: units/logs/search_logs/search_logs_config.php
===================================================================
--- units/logs/search_logs/search_logs_config.php (revision 13152)
+++ units/logs/search_logs/search_logs_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'SearchLogId',
Index: units/logs/session_logs/session_logs_config.php
===================================================================
--- units/logs/session_logs/session_logs_config.php (revision 13152)
+++ units/logs/session_logs/session_logs_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'SessionLogId',
Index: units/mailing_lists/mailing_lists_config.php
===================================================================
--- units/mailing_lists/mailing_lists_config.php (revision 13152)
+++ units/mailing_lists/mailing_lists_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'RegularEvents' => Array (
Index: units/modules/modules_config.php
===================================================================
--- units/modules/modules_config.php (revision 13152)
+++ units/modules/modules_config.php (working copy)
@@ -22,10 +22,11 @@
'TagProcessorClass' => Array('class'=>'ModulesTagProcessor','file'=>'modules_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'Name',
Index: units/permissions/permissions_config.php
===================================================================
--- units/permissions/permissions_config.php (revision 13152)
+++ units/permissions/permissions_config.php (working copy)
@@ -65,9 +65,10 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'PermissionId',
Index: units/phrases/phrases_config.php
===================================================================
--- units/phrases/phrases_config.php (revision 13152)
+++ units/phrases/phrases_config.php (working copy)
@@ -26,10 +26,11 @@
'QueryString' => Array (
1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'label',
- 5 => 'mode', // labels can be edited directly
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'label', // labels can be edited directly
+ 6 => 'mode',
),
'IDField' => 'PhraseId',
Index: units/related_searches/related_searches_config.php
===================================================================
--- units/related_searches/related_searches_config.php (revision 13152)
+++ units/related_searches/related_searches_config.php (working copy)
@@ -33,9 +33,10 @@
'AutoLoad' => true,
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'RelatedSearchId',
'StatusField' => Array('Enabled'),
Index: units/relationship/relationship_config.php
===================================================================
--- units/relationship/relationship_config.php (revision 13152)
+++ units/relationship/relationship_config.php (working copy)
@@ -44,9 +44,10 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'RelationshipId',
'StatusField' => Array('Enabled','Type'),
Index: units/reviews/reviews_config.php
===================================================================
--- units/reviews/reviews_config.php (revision 13152)
+++ units/reviews/reviews_config.php (working copy)
@@ -78,8 +78,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'ParentPrefix' => 'p', // replace all usage of rev to "p-rev" and then remove this param from here and Prefix too
Index: units/selectors/selectors_config.php
===================================================================
--- units/selectors/selectors_config.php (revision 13152)
+++ units/selectors/selectors_config.php (working copy)
@@ -74,9 +74,10 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'SelectorId',
Index: units/skins/skins_config.php
===================================================================
--- units/skins/skins_config.php (revision 13152)
+++ units/skins/skins_config.php (working copy)
@@ -35,10 +35,11 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'SkinId',
'StatusField' => Array('IsPrimary'),
Index: units/spelling_dictionary/spelling_dictionary_config.php
===================================================================
--- units/spelling_dictionary/spelling_dictionary_config.php (revision 13152)
+++ units/spelling_dictionary/spelling_dictionary_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'SpellingDictionaryId',
Index: units/statistics/statistics_config.php
===================================================================
--- units/statistics/statistics_config.php (revision 13152)
+++ units/statistics/statistics_config.php (working copy)
@@ -24,10 +24,11 @@
'AutoLoad' => true,
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'StatItemId',
Index: units/stop_words/stop_words_config.php
===================================================================
--- units/stop_words/stop_words_config.php (revision 13152)
+++ units/stop_words/stop_words_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'StopWordId',
Index: units/structure/structure_config.php
===================================================================
--- units/structure/structure_config.php (revision 13152)
+++ units/structure/structure_config.php (working copy)
@@ -23,11 +23,12 @@
'AutoLoad' => true,
- 'QueryString' => Array(
+ 'QueryString' => Array(
1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'ConfigPriority' => 0,
'Hooks' => Array(
Index: units/stylesheets/stylesheets_config.php
===================================================================
--- units/stylesheets/stylesheets_config.php (revision 13152)
+++ units/stylesheets/stylesheets_config.php (working copy)
@@ -34,10 +34,11 @@
),
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'StylesheetId',
Index: units/theme_files/theme_files_config.php
===================================================================
--- units/theme_files/theme_files_config.php (revision 13152)
+++ units/theme_files/theme_files_config.php (working copy)
@@ -23,9 +23,10 @@
'AutoLoad' => true,
'QueryString' => Array(
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'FileId',
Index: units/themes/themes_config.php
===================================================================
--- units/themes/themes_config.php (revision 13152)
+++ units/themes/themes_config.php (working copy)
@@ -23,10 +23,11 @@
'AutoLoad' => true,
'Hooks' => Array(),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'ThemeId',
Index: units/thesaurus/thesaurus_config.php
===================================================================
--- units/thesaurus/thesaurus_config.php (revision 13152)
+++ units/thesaurus/thesaurus_config.php (working copy)
@@ -26,8 +26,9 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'IDField' => 'ThesaurusId',
Index: units/user_groups/user_groups_config.php
===================================================================
--- units/user_groups/user_groups_config.php (revision 13152)
+++ units/user_groups/user_groups_config.php (working copy)
@@ -72,9 +72,10 @@
'AutoLoad' => true,
'QueryString' => Array (
- 1 => 'id',
- 2 => 'page',
- 3 => 'event',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'GroupId',
Index: units/user_profile/user_profile_config.php
===================================================================
--- units/user_profile/user_profile_config.php (revision 13152)
+++ units/user_profile/user_profile_config.php (working copy)
@@ -24,8 +24,8 @@
'QueryString' => Array (
1 => 'id',
2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 3 => 'PerPage',
+ 4 => 'event',
),
'IDField' => 'VariableId',
Index: units/users/users_config.php
===================================================================
--- units/users/users_config.php (revision 13152)
+++ units/users/users_config.php (working copy)
@@ -96,10 +96,11 @@
),
'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'RegularEvents' => Array(
Index: units/visits/visits_config.php
===================================================================
--- units/visits/visits_config.php (revision 13152)
+++ units/visits/visits_config.php (working copy)
@@ -23,10 +23,11 @@
'AutoLoad' => true,
'QueryString' => Array (
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
),
'Hooks' => Array (
per_page_in_unit_configs_themes.patch [^] (5,751 bytes) 2010-02-24 05:02
[Show Content]
Index: advanced/in-commerce/designs/section.tpl
===================================================================
--- advanced/in-commerce/designs/section.tpl (revision 13152)
+++ advanced/in-commerce/designs/section.tpl (working copy)
@@ -61,7 +61,7 @@
<div class="movable-element">
<!-- Category Products List -->
<inp2:m_RenderElement design="content_box" block_no_data="no_products">
- <inp2:p_InitList list_name="products_in_category" />
+ <inp2:p_InitList list_name="products_in_category" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_Products"/> (<inp2:p_TotalRecords list_name="products_in_category"/>)
Index: advanced/in-commerce/elements/sorting.elm.tpl
===================================================================
--- advanced/in-commerce/elements/sorting.elm.tpl (revision 13152)
+++ advanced/in-commerce/elements/sorting.elm.tpl (working copy)
@@ -30,6 +30,8 @@
<option value="CreatedOn|asc" <inp2:p_SortingSelected sorting="CreatedOn|asc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_RecentToOld"/></option>
<option value="CreatedOn|desc" <inp2:p_SortingSelected sorting="CreatedOn|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_OldToRecent"/></option>
</select>
+
+ <inp2:m_GetUrlHiddenFileds/>
<input type="submit" class="button" name="<inp2:p_SubmitName event="OnSetSortingDirect"/>" value="<inp2:m_Phrase label="lu_btn_Sort" no_editing="1"/>" />
</form>
</td>
Index: advanced/in-link/designs/section.tpl
===================================================================
--- advanced/in-link/designs/section.tpl (revision 13152)
+++ advanced/in-link/designs/section.tpl (working copy)
@@ -54,7 +54,7 @@
<div class="movable-element">
<!--## links in category ##-->
<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_links">
- <inp2:l_InitList list_name="items_in_current_cat"/>
+ <inp2:l_InitList list_name="items_in_current_cat" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_Links"/> (<inp2:l_TotalRecords list_name="items_in_current_cat"/>)
Index: advanced/in-link/elements/sorting.elm.tpl
===================================================================
--- advanced/in-link/elements/sorting.elm.tpl (revision 13152)
+++ advanced/in-link/elements/sorting.elm.tpl (working copy)
@@ -33,6 +33,7 @@
<option value="Hits|desc" <inp2:l_SortingSelected sorting="Hits|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_HitsHL"/></option>
</select>
+ <inp2:m_GetUrlHiddenFileds/>
<input type="submit" class="button" name="<inp2:l_SubmitName event="OnSetSortingDirect"/>" value="<inp2:m_Phrase label="lu_btn_Sort" no_editing="1"/>" />
</form>
</td>
Index: advanced/in-news/designs/section.tpl
===================================================================
--- advanced/in-news/designs/section.tpl (revision 13152)
+++ advanced/in-news/designs/section.tpl (working copy)
@@ -75,7 +75,7 @@
<!-- articles in category -->
<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_articles">
<inp2:m_include template="in-news/elements/articles.elm"/>
- <inp2:n_InitList list_name="items_in_current_cat" />
+ <inp2:n_InitList list_name="items_in_current_cat" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_Articles"/> (<inp2:n_TotalRecords list_name="items_in_current_cat"/>)
Index: advanced/in-news/elements/sorting.elm.tpl
===================================================================
--- advanced/in-news/elements/sorting.elm.tpl (revision 13152)
+++ advanced/in-news/elements/sorting.elm.tpl (working copy)
@@ -32,6 +32,8 @@
<option value="Hits|asc" <inp2:n_SortingSelected sorting="Hits|asc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_HitsLH"/></option>
<option value="Hits|desc" <inp2:n_SortingSelected sorting="Hits|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_HitsHL"/></option>
</select>
+
+ <inp2:m_GetUrlHiddenFileds/>
<input type="submit" class="button" name="<inp2:n_SubmitName event="OnSetSortingDirect"/>" value="<inp2:m_Phrase label="lu_btn_Sort" no_editing="1"/>" />
</form>
</td>
Index: advanced/platform/elements/pagination.elm.tpl
===================================================================
--- advanced/platform/elements/pagination.elm.tpl (revision 13152)
+++ advanced/platform/elements/pagination.elm.tpl (working copy)
@@ -37,14 +37,16 @@
<td align="right">
<inp2:m_phrase name="lu_ItemsPerPage"/>:
- <form method="post" action="<inp2:m_FormAction />">
-
- <select class="input-select" name="<inp2:{$prefix}_VarName type="PerPage"/>">
+ <form method="post" action="<inp2:m_FormAction/>">
+ <select class="input-select" name="<inp2:{$prefix}_VarName type='PerPage'/>">
<option value="10" <inp2:{$prefix}_PerPageSelected per_page="10" selected='selected="selected"'/>>10</option>
<option value="20" <inp2:{$prefix}_PerPageSelected per_page="20" selected='selected="selected"'/>>20</option>
<option value="50" <inp2:{$prefix}_PerPageSelected per_page="50" selected='selected="selected"'/>>50</option>
</select>
- <input type="submit" class="button" name="<inp2:{$prefix}_SubmitName event="OnSetPerPage"/>" value="<inp2:m_Phrase label="lu_btn_Set" no_editing="1"/>" />
+
+ <inp2:m_GetUrlHiddenFileds/>
+
+ <input type="submit" class="button" name="<inp2:{$prefix}_SubmitName event='OnSetPerPage'/>" value="<inp2:m_Phrase label='lu_btn_Set' no_editing='1'/>" />
</form>
</td>
</tr>
per_page_in_unit_configs_themes-Advanced-Dmitry-20100425.patch [^] (16,207 bytes) 2010-04-25 19:03
[Show Content]
Index: themes/advanced/in-link/links/pop_links.tpl
===================================================================
--- themes/advanced/in-link/links/pop_links.tpl (revision 13402)
+++ themes/advanced/in-link/links/pop_links.tpl (working copy)
@@ -42,7 +42,7 @@
</div>
<div class="movable-element">
<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_links">
- <inp2:l_InitList list_name="pop_links" m_cat_id="0" m_cat_page="1" recursive="1" types="pop"/>
+ <inp2:l_InitList list_name="pop_links" m_cat_id="0" m_cat_page="1" recursive="1" types="pop" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_PopLinks"/> (<inp2:l_TotalRecords list_name="pop_links"/>)
Index: themes/advanced/in-link/links/pick_links.tpl
===================================================================
--- themes/advanced/in-link/links/pick_links.tpl (revision 13402)
+++ themes/advanced/in-link/links/pick_links.tpl (working copy)
@@ -42,7 +42,7 @@
</div>
<div class="movable-element">
<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_links">
- <inp2:l_InitList list_name="pick_links" m_cat_id="0" m_cat_page="1" recursive="1" types="pick"/>
+ <inp2:l_InitList list_name="pick_links" m_cat_id="0" m_cat_page="1" recursive="1" types="pick" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_PickLinks"/> (<inp2:l_TotalRecords list_name="pick_links"/>)
Index: themes/advanced/in-link/links/new_links.tpl
===================================================================
--- themes/advanced/in-link/links/new_links.tpl (revision 13402)
+++ themes/advanced/in-link/links/new_links.tpl (working copy)
@@ -42,7 +42,7 @@
</div>
<div class="movable-element">
<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_links">
- <inp2:l_InitList list_name="new_links" m_cat_id="0" m_cat_page="1" recursive="1" types="new"/>
+ <inp2:l_InitList list_name="new_links" m_cat_id="0" m_cat_page="1" recursive="1" types="new" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_NewLinks"/> (<inp2:l_TotalRecords list_name="new_links"/>)
Index: themes/advanced/in-link/links/search_results.tpl
===================================================================
--- themes/advanced/in-link/links/search_results.tpl (revision 13402)
+++ themes/advanced/in-link/links/search_results.tpl (working copy)
@@ -45,7 +45,7 @@
</div>
<div class="movable-element">
<inp2:m_RenderElement design="content_box">
- <inp2:l_InitList list_name="link_search_results" types="search" parent_cat_id="any" recursive="1"/>
+ <inp2:l_InitList list_name="link_search_results" types="search" parent_cat_id="any" recursive="1" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_Phrase label="lu_title_LinkSearchResults"/> (<inp2:l_TotalRecords list_name="link_search_results"/>)
Index: themes/advanced/in-link/links/hot_links.tpl
===================================================================
--- themes/advanced/in-link/links/hot_links.tpl (revision 13402)
+++ themes/advanced/in-link/links/hot_links.tpl (working copy)
@@ -43,7 +43,7 @@
<div class="movable-element">
<!-- HOT LINKS -->
<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_links">
- <inp2:l_InitList list_name="hot_links" m_cat_id="0" m_cat_page="1" recursive="1" types="hot"/>
+ <inp2:l_InitList list_name="hot_links" m_cat_id="0" m_cat_page="1" recursive="1" types="hot" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_HotLinks"/> (<inp2:l_TotalRecords list_name="hot_links"/>)
Index: themes/advanced/in-link/elements/content_boxes/my_favorites.elm.tpl
===================================================================
--- themes/advanced/in-link/elements/content_boxes/my_favorites.elm.tpl (revision 13402)
+++ themes/advanced/in-link/elements/content_boxes/my_favorites.elm.tpl (working copy)
@@ -1,6 +1,6 @@
<!-- favorite links -->
<inp2:m_RenderElement design="content_box" data_exists="1">
- <inp2:l_InitList list_name="favorite_links" types="favorites" parent_cat_id="0" recursive="1"/>
+ <inp2:l_InitList list_name="favorite_links" types="favorites" parent_cat_id="0" recursive="1" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_FavoriteLinks"/> (<inp2:l_TotalRecords list_name="favorite_links"/>)
Index: themes/advanced/in-news/elements/content_boxes/my_favorites.elm.tpl
===================================================================
--- themes/advanced/in-news/elements/content_boxes/my_favorites.elm.tpl (revision 13402)
+++ themes/advanced/in-news/elements/content_boxes/my_favorites.elm.tpl (working copy)
@@ -1,6 +1,6 @@
<!-- favorite articles -->
<inp2:m_RenderElement design="content_box" data_exists="1">
- <inp2:n_InitList list_name="favorite_articles" types="favorites" parent_cat_id="0" recursive="1"/>
+ <inp2:n_InitList list_name="favorite_articles" types="favorites" parent_cat_id="0" recursive="1" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_FavoriteArticles"/> (<inp2:n_TotalRecords list_name="favorite_articles"/>)
Index: themes/advanced/in-news/articles/pick_articles.tpl
===================================================================
--- themes/advanced/in-news/articles/pick_articles.tpl (revision 13402)
+++ themes/advanced/in-news/articles/pick_articles.tpl (working copy)
@@ -43,7 +43,7 @@
<div class="movable-element">
<!-- pick articles -->
<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_articles">
- <inp2:n_InitList list_name="pick_articles" m_cat_id="0" recursive="1" types="pick"/>
+ <inp2:n_InitList list_name="pick_articles" m_cat_id="0" recursive="1" types="pick" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_PickArticles"/> (<inp2:n_TotalRecords list_name="pick_articles"/>)
Index: themes/advanced/in-news/articles/pop_articles.tpl
===================================================================
--- themes/advanced/in-news/articles/pop_articles.tpl (revision 13402)
+++ themes/advanced/in-news/articles/pop_articles.tpl (working copy)
@@ -43,7 +43,7 @@
<div class="movable-element">
<!-- popular articles -->
<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_articles">
- <inp2:n_InitList list_name="pop_articles" m_cat_id="0" recursive="1" types="pop"/>
+ <inp2:n_InitList list_name="pop_articles" m_cat_id="0" recursive="1" types="pop" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_PopArticles"/> (<inp2:n_TotalRecords list_name="pop_articles"/>)
Index: themes/advanced/in-news/articles/search_results.tpl
===================================================================
--- themes/advanced/in-news/articles/search_results.tpl (revision 13402)
+++ themes/advanced/in-news/articles/search_results.tpl (working copy)
@@ -43,7 +43,7 @@
<div class="movable-element">
<inp2:m_RenderElement design="content_box">
- <inp2:n_InitList list_name="article_search_results" types="search" parent_cat_id="any" recursive="1"/>
+ <inp2:n_InitList list_name="article_search_results" types="search" parent_cat_id="any" recursive="1" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_Phrase label="lu_title_ArticleSearchResults"/> (<inp2:n_TotalRecords list_name="article_search_results"/>)
Index: themes/advanced/in-news/articles/new_articles.tpl
===================================================================
--- themes/advanced/in-news/articles/new_articles.tpl (revision 13402)
+++ themes/advanced/in-news/articles/new_articles.tpl (working copy)
@@ -43,7 +43,7 @@
<div class="movable-element">
<!-- new articles -->
<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_articles">
- <inp2:n_InitList list_name="new_articles" m_cat_id="0" recursive="1" types="new"/>
+ <inp2:n_InitList list_name="new_articles" m_cat_id="0" recursive="1" types="new" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_NewArticles"/> (<inp2:n_TotalRecords list_name="new_articles"/>)
Index: themes/advanced/in-news/articles/hot_articles.tpl
===================================================================
--- themes/advanced/in-news/articles/hot_articles.tpl (revision 13402)
+++ themes/advanced/in-news/articles/hot_articles.tpl (working copy)
@@ -43,7 +43,7 @@
<div class="movable-element">
<!-- hot articles -->
<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_articles">
- <inp2:n_InitList list_name="hot_articles" m_cat_id="0" recursive="1" types="hot"/>
+ <inp2:n_InitList list_name="hot_articles" m_cat_id="0" recursive="1" types="hot" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_HotArticles"/> (<inp2:n_TotalRecords list_name="hot_articles"/>)
Index: themes/advanced/in-bulletin/topics/search_results.tpl
===================================================================
--- themes/advanced/in-bulletin/topics/search_results.tpl (revision 13402)
+++ themes/advanced/in-bulletin/topics/search_results.tpl (working copy)
@@ -30,7 +30,7 @@
</div>
<div class="movable-element">
<inp2:m_RenderElement design="content_box">
- <inp2:bb_InitList list_name="topic_search_results" types="search" parent_cat_id="any" recursive="1"/>
+ <inp2:bb_InitList list_name="topic_search_results" types="search" parent_cat_id="any" recursive="1" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_Phrase label="lu_title_TopicSearchResults"/>
Index: themes/advanced/in-commerce/products/featured_products.tpl
===================================================================
--- themes/advanced/in-commerce/products/featured_products.tpl (revision 13402)
+++ themes/advanced/in-commerce/products/featured_products.tpl (working copy)
@@ -43,7 +43,7 @@
</div>
<div class="movable-element">
<inp2:m_RenderElement design="content_box" data_exists="1">
- <inp2:p_InitList list_name="featured_products" types="featured" recursive="1"/>
+ <inp2:p_InitList list_name="featured_products" types="featured" recursive="1" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_FeaturedProducts"/> (<inp2:p_TotalRecords list_name="featured_products"/>)
Index: themes/advanced/in-commerce/products/pick_products.tpl
===================================================================
--- themes/advanced/in-commerce/products/pick_products.tpl (revision 13402)
+++ themes/advanced/in-commerce/products/pick_products.tpl (working copy)
@@ -44,7 +44,7 @@
<div class="movable-element">
<!-- Editors Pick Products List -->
<inp2:m_RenderElement design="content_box" data_exists="1">
- <inp2:p_InitList list_name="pick_products" types="pick" recursive="true"/>
+ <inp2:p_InitList list_name="pick_products" types="pick" recursive="true" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_PickProducts"/> (<inp2:p_TotalRecords list_name="pick_products"/>)
Index: themes/advanced/in-commerce/products/top_seller_products.tpl
===================================================================
--- themes/advanced/in-commerce/products/top_seller_products.tpl (revision 13402)
+++ themes/advanced/in-commerce/products/top_seller_products.tpl (working copy)
@@ -40,7 +40,7 @@
</div>
<div class="movable-element">
<inp2:m_RenderElement design="content_box">
- <inp2:p_InitList list_name="top_seller_products" types="hot" recursive="1"/>
+ <inp2:p_InitList list_name="top_seller_products" types="hot" recursive="1" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_TopSellerProducts"/> (<inp2:p_TotalRecords list_name="top_seller_products"/>)
Index: themes/advanced/in-commerce/products/manufacturer_products.tpl
===================================================================
--- themes/advanced/in-commerce/products/manufacturer_products.tpl (revision 13402)
+++ themes/advanced/in-commerce/products/manufacturer_products.tpl (working copy)
@@ -43,7 +43,7 @@
</div>
<div class="movable-element">
<inp2:m_RenderElement design="content_box" data_exists="1">
- <inp2:p_InitList list_name="manufacturer_products" types="manufacturer" recursive="1" parent_cat_id="any" />
+ <inp2:p_InitList list_name="manufacturer_products" types="manufacturer" recursive="1" parent_cat_id="any" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_Phrase label="lu_title_ProductsByManufacturer"/> <inp2:manuf_Field name="Name" /> (<inp2:p_TotalRecords list_name="manufacturer_products"/>)
Index: themes/advanced/in-commerce/products/search_results.tpl
===================================================================
--- themes/advanced/in-commerce/products/search_results.tpl (revision 13402)
+++ themes/advanced/in-commerce/products/search_results.tpl (working copy)
@@ -43,7 +43,7 @@
</div>
<div class="movable-element">
<inp2:m_RenderElement design="content_box">
- <inp2:p_InitList list_name="product_search_results" types="search" parent_cat_id="any" recursive="1" except="in_cart"/>
+ <inp2:p_InitList list_name="product_search_results" main_list="1" types="search" parent_cat_id="any" recursive="1" except="in_cart"/>
<inp2:m_Capture to_var="header">
<inp2:m_Phrase label="lu_title_ProductSearchResults"/> (<inp2:p_TotalRecords list_name="product_search_results"/>)
Index: themes/advanced/in-commerce/products/recent_products.tpl
===================================================================
--- themes/advanced/in-commerce/products/recent_products.tpl (revision 13402)
+++ themes/advanced/in-commerce/products/recent_products.tpl (working copy)
@@ -37,7 +37,7 @@
</div>
<div class="movable-element">
<inp2:m_RenderElement design="content_box">
- <inp2:p_InitList list_name="recent_products" types="recent" parent_cat_id="any" recursive="1" except="in_cart"/>
+ <inp2:p_InitList list_name="recent_products" main_list="1" types="recent" parent_cat_id="any" recursive="1" except="in_cart"/>
<inp2:m_Capture to_var="header">
<inp2:m_Phrase label="lu_title_RecentlyViewedProducts"/> (<inp2:p_TotalRecords list_name="recent_products"/>)
Index: themes/advanced/in-commerce/products/new_products.tpl
===================================================================
--- themes/advanced/in-commerce/products/new_products.tpl (revision 13402)
+++ themes/advanced/in-commerce/products/new_products.tpl (working copy)
@@ -44,7 +44,7 @@
<div class="movable-element">
<!-- New Products List -->
<inp2:m_RenderElement design="content_box" data_exists="1">
- <inp2:p_InitList list_name="new_products" types="new" recursive="true"/>
+ <inp2:p_InitList list_name="new_products" types="new" recursive="true" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_NewProducts"/> (<inp2:p_TotalRecords list_name="new_products"/>)
Index: themes/advanced/in-commerce/elements/content_boxes/my_favorites.elm.tpl
===================================================================
--- themes/advanced/in-commerce/elements/content_boxes/my_favorites.elm.tpl (revision 13402)
+++ themes/advanced/in-commerce/elements/content_boxes/my_favorites.elm.tpl (working copy)
@@ -1,6 +1,6 @@
<!-- products in wishlist -->
<inp2:m_RenderElement design="content_box" data_exists="1">
- <inp2:p_InitList list_name="wishlist_products" types="wish_list" parent_cat_id="0" recursive="1"/>
+ <inp2:p_InitList list_name="wishlist_products" types="wish_list" parent_cat_id="0" recursive="1" main_list="1"/>
<inp2:m_Capture to_var="header">
<inp2:m_phrase name="lu_title_WishList"/> (<inp2:p_TotalRecords list_name="wishlist_products"/>)
|