Attached Files |
scope_kw_core.patch [^] (410,800 bytes) 2011-10-04 04:32
scope_kw_modules.patch [^] (120,716 bytes) 2011-10-04 04:32
[Show Content]
Index: custom/units/sections/articles/e_article_eh.php
===================================================================
--- custom/units/sections/articles/e_article_eh.php (revision 14590)
+++ custom/units/sections/articles/e_article_eh.php (working copy)
@@ -28,11 +28,13 @@
}
/**
- * Permission exceptions
+ * Checks user permission to execute given $event
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -66,11 +68,14 @@
}
/**
- * Sets custom query for the list
+ * Filters out archived articles
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
@@ -89,11 +94,13 @@
}
/**
- * Before new item created
+ * Create missing excerpt
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
@@ -101,11 +108,13 @@
}
/**
- * Before existing item updated
+ * Create missing excerpt
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
@@ -136,13 +145,14 @@
}
-
/**
- * After new item created
+ * Sets values for import process
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
@@ -174,11 +184,14 @@
}
/**
- * After item loaded
+ * Occurs after loading item, 'id' parameter
+ * allows to get id of item that was loaded
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/sections/categories/e_category_eh.php
===================================================================
--- custom/units/sections/categories/e_category_eh.php (revision 14590)
+++ custom/units/sections/categories/e_category_eh.php (working copy)
@@ -28,11 +28,13 @@
}
/**
- * Permission exceptions
+ * Checks user permission to execute given $event
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -66,11 +68,14 @@
}
/**
- * Sets custom query for the list
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
@@ -89,11 +94,13 @@
}
/**
- * Before new item created
+ * Sets correct status for new categories created on front-end
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
@@ -101,11 +108,13 @@
}
/**
- * Before existing item updated
+ * Sets correct status for new categories created on front-end
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
@@ -136,13 +145,14 @@
}
-
/**
- * After new item created
+ * Occurs after creating item
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
@@ -174,11 +184,13 @@
}
/**
- * After item loaded
+ * Removes this item and it's children (recursive) from structure dropdown
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/sections/links/e_link_eh.php
===================================================================
--- custom/units/sections/links/e_link_eh.php (revision 14590)
+++ custom/units/sections/links/e_link_eh.php (working copy)
@@ -28,11 +28,13 @@
}
/**
- * Permission exceptions
+ * Checks user permission to execute given $event
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -66,11 +68,14 @@
}
/**
- * Sets custom query for the list
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
@@ -89,11 +94,13 @@
}
/**
- * Before new item created
+ * Makes reciprocal check on link, when it is created
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
@@ -101,11 +108,13 @@
}
/**
- * Before existing item updated
+ * Makes reciprocal check on link, when it is updated
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
@@ -138,11 +147,13 @@
/**
- * After new item created
+ * Sets values for import process
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
@@ -174,11 +185,14 @@
}
/**
- * After item loaded
+ * Occurs after loading item, 'id' parameter
+ * allows to get id of item that was loaded
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/sections/products/e_product_eh.php
===================================================================
--- custom/units/sections/products/e_product_eh.php (revision 14590)
+++ custom/units/sections/products/e_product_eh.php (working copy)
@@ -28,11 +28,13 @@
}
/**
- * Permission exceptions
+ * Checks user permission to execute given $event
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -67,11 +69,14 @@
}
/**
- * Sets custom query for the list
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
@@ -90,11 +95,13 @@
}
/**
- * Before new item created
+ * Sets default processing data for subscriptions
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
@@ -102,11 +109,13 @@
}
/**
- * Before existing item updated
+ * Moves item to preferred category, updates item hits
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
@@ -137,13 +146,14 @@
}
-
/**
- * After new item created
+ * Set new price to ProductsPricing
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
@@ -175,11 +185,14 @@
}
/**
- * After item loaded
+ * Occurs after loading item, 'id' parameter
+ * allows to get id of item that was loaded
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/sections/reviews/e_review_eh.php
===================================================================
--- custom/units/sections/reviews/e_review_eh.php (revision 14590)
+++ custom/units/sections/reviews/e_review_eh.php (working copy)
@@ -26,13 +26,14 @@
// $this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
}
-
/**
- * Before new item created
+ * Prefills all fields on front-end
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
@@ -40,11 +41,13 @@
}
/**
- * Before existing item updated
+ * Sets correct rating value
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
@@ -77,11 +80,13 @@
/**
- * After new item created
+ * Updates item review counter
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
@@ -113,11 +118,14 @@
}
/**
- * After item loaded
+ * Occurs after loading item, 'id' parameter
+ * allows to get id of item that was loaded
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/sections/users/e_user_eh.php
===================================================================
--- custom/units/sections/users/e_user_eh.php (revision 14590)
+++ custom/units/sections/users/e_user_eh.php (working copy)
@@ -28,11 +28,13 @@
}
/**
- * Permission exceptions
+ * Checks user permission to execute given $event
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -66,11 +68,14 @@
}
/**
- * Sets custom query for the list
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
@@ -89,11 +94,13 @@
}
/**
- * Before new item created
+ * Set's new unique resource id to user
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
@@ -101,11 +108,13 @@
}
/**
- * Before existing item updated
+ * Checks state against country
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
@@ -138,11 +147,13 @@
/**
- * After new item created
+ * Redirects user after successful registration to confirmation template (on Front only)
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
@@ -174,11 +185,13 @@
}
/**
- * After item loaded
+ * Loads user images
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/widgets/widget_eh.php
===================================================================
--- custom/units/widgets/widget_eh.php (revision 14590)
+++ custom/units/widgets/widget_eh.php (working copy)
@@ -25,11 +25,13 @@
}
/**
- * Permission exceptions
+ * Checks user permission to execute given $event
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -55,11 +57,14 @@
}
/**
- * Set custom query for the list
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
@@ -73,22 +78,26 @@
}
/**
- * Before new item created
+ * Occurs before creating item
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
}
/**
- * Before existing item updated
+ * Occurs before updating item
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
@@ -120,11 +129,13 @@
/**
- * After new item created
+ * Occurs after creating item
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
@@ -156,11 +167,13 @@
}
/**
- * After item loaded
+ * Loads user images
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
Index: in-auction/units/category_listing/category_listing_eh.php
===================================================================
--- in-auction/units/category_listing/category_listing_eh.php (revision 14590)
+++ in-auction/units/category_listing/category_listing_eh.php (working copy)
@@ -26,11 +26,13 @@
}
/**
- * Changes permission section to one from REQUEST, not from config
+ * Checks user permission to execute given $event
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
// $sql = 'SELECT Prefix
// FROM '.TABLE_PREFIX.'ItemTypes
@@ -124,15 +126,31 @@
}
}
- function OnBeforeItemUpdate(&$event)
+ /**
+ * Occurs before updating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
+
$this->ValidateCategories($event);
}
- function OnBeforeItemCreate(&$event)
+ /**
+ * Occurs before creating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
+
$this->ValidateCategories($event);
}
Index: in-auction/units/error_log/error_log_eh.php
===================================================================
--- in-auction/units/error_log/error_log_eh.php (revision 14590)
+++ in-auction/units/error_log/error_log_eh.php (working copy)
@@ -26,13 +26,15 @@
$this->permMapping = array_merge($this->permMapping, $permissions);
}
-
/**
* Select products by clipboard instead of listings
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
Index: in-auction/units/listing/listing_eh.php
===================================================================
--- in-auction/units/listing/listing_eh.php (revision 14590)
+++ in-auction/units/listing/listing_eh.php (working copy)
@@ -87,8 +87,11 @@
* Select products by clipboard instead of listings
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
@@ -301,8 +304,11 @@
* Apply custom processing to item
*
* @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
*/
- function customProcessing(&$event, $type)
+ protected function customProcessing(&$event, $type)
{
if ($event->Name == 'OnMassDelete' && $type == 'before') {
Index: in-auction/units/product_listing/product_listing_eh.php
===================================================================
--- in-auction/units/product_listing/product_listing_eh.php (revision 14590)
+++ in-auction/units/product_listing/product_listing_eh.php (working copy)
@@ -26,13 +26,14 @@
$this->permMapping = array_merge($this->permMapping, $permissions);
}
-
/**
* Changes permission section to one from REQUEST, not from config
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
// $sql = 'SELECT Prefix
// FROM '.TABLE_PREFIX.'ItemTypes
@@ -150,16 +151,31 @@
}
}
-
- function OnBeforeItemUpdate(&$event)
+ /**
+ * Occurs before updating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
+
$this->ValidateCategories($event);
}
- function OnBeforeItemCreate(&$event)
+ /**
+ * Occurs before creating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
+
$this->ValidateCategories($event);
}
Index: in-auction/units/shipping/shipping_eh.php
===================================================================
--- in-auction/units/shipping/shipping_eh.php (revision 14590)
+++ in-auction/units/shipping/shipping_eh.php (working copy)
@@ -32,8 +32,15 @@
$this->permMapping = array_merge($this->permMapping, $permissions);
}
-
- function SetCustomQuery(&$event)
+ /**
+ * Apply any custom changes to list's sql query
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
+ */
+ protected function SetCustomQuery(&$event)
{
$object =& $event->getObject();
Index: in-bulletin/units/poll_comments/poll_comment_eh.php
===================================================================
--- in-bulletin/units/poll_comments/poll_comment_eh.php (revision 14590)
+++ in-bulletin/units/poll_comments/poll_comment_eh.php (working copy)
@@ -45,8 +45,11 @@
* Applies special filter, that allows to select all commented from current poll
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
if ($this->Application->isAdminUser) {
return ;
@@ -59,48 +62,41 @@
}
/**
- * Before New PollComment created
+ * Occurs before creating item
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
- if ($this->Application->isAdminUser) {
+ if ( $this->Application->isAdminUser ) {
return ;
}
$object =& $event->getObject();
/* @var $object kDBItem */
- // get Poll info
- $parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix');
- if($parent_prefix) {
- $main_object =& $this->Application->recallObject($parent_prefix.'.'.$special, null,Array('raise_warnings' => 0));
- /* @var $main_object kDBItem */
+ $parent_info = $object->getLinkedInfo($event->Special);
+ $poll_id = $parent_info['ParentId'];
- if (!$main_object->isLoaded()) {
- $main_object =& $this->Application->recallObject($parent_prefix);
- }
-
- $poll_id = $main_object->GetDBField($this->Application->getUnitOption($event->Prefix, 'ForeignKey'));
- }
-
- if ($poll_id) {
+ if ( $poll_id ) {
$spam_helper =& $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
$spam_helper->InitHelper($poll_id, 'PollComment', 0); // ResourceId used for SpamControl only
- if ($spam_helper->InSpamControl()) {
+ if ( $spam_helper->InSpamControl() ) {
$event->status = kEvent::erFAIL;
$object->SetError('CommentText', 'too_frequent', 'lu_error_AlreadyCommented');
return ;
}
+
+ $object->SetDBField('PollId', $poll_id); // PollId
}
$object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
$object->SetDBField('UserIP', $_SERVER['REMOTE_ADDR']);
- $object->SetDBField('PollId', $poll_id); // PollId
$object->SetDBField('Status', STATUS_ACTIVE);
parent::OnBeforeItemCreate($event);
@@ -127,17 +123,22 @@
}
/**
- * Updates item review counter
+ * Protects against spam
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
- if (!$this->Application->isAdminUser) {
+ parent::OnAfterItemCreate($event);
+
+ if ( !$this->Application->isAdminUser ) {
$spam_helper =& $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
$object =& $event->getObject();
+ /* @var $object kDBItem */
$comment_settings = 'poll_CommentDelay_Value:poll_CommentDelay_Interval';
$spam_helper->InitHelper($object->GetDBField('PollId'), 'PollComment', $comment_settings);
Index: in-bulletin/units/polls/poll_eh.php
===================================================================
--- in-bulletin/units/polls/poll_eh.php (revision 14590)
+++ in-bulletin/units/polls/poll_eh.php (working copy)
@@ -35,8 +35,11 @@
* Applies special filter, that allows to select all poll from given date range
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
if ($this->Application->isAdminUser) {
return ;
@@ -73,12 +76,16 @@
}
/**
- * Reset votes statistics for current poll
+ * Sets resource id
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
$object =& $event->getObject();
/* @var $object kDBItem */
Index: in-bulletin/units/posts/post_eh.php
===================================================================
--- in-bulletin/units/posts/post_eh.php (revision 14590)
+++ in-bulletin/units/posts/post_eh.php (working copy)
@@ -20,8 +20,10 @@
* Checks topic-post modify and delete permissions
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
$events = Array('OnUpdate', 'OnDelete');
if (in_array($event->Name, $events)) {
@@ -35,9 +37,13 @@
* Sets default values
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -56,8 +62,8 @@
$object->SetDBField('IPAddress', $_SERVER['REMOTE_ADDR']);
$sql = 'SELECT Login
- FROM '.TABLE_PREFIX.'PortalUser
- WHERE PortalUserId = '.$user_id;
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE PortalUserId = ' . $user_id;
$object->SetDBField('PosterAlias', $this->Conn->GetOne($sql));
// set post options
@@ -108,16 +114,20 @@
* Ensures, that only user with permission will update topic
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
$object =& $event->getObject();
/* @var $object kDBItem */
$perm_status = $this->checkPostPermission($event, 'TOPIC.REPLY.MODIFY|TOPIC.REPLY.OWNER.MODIFY');
- if (!$perm_status) {
+ if ( !$perm_status ) {
$event->status = kEvent::erFAIL;
- return ;
+ return;
}
$post_helper =& $this->Application->recallObject('PostHelper');
@@ -164,9 +174,13 @@
* Sets post options to virtual fields
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
+ parent::OnAfterItemLoad($event);
+
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -175,6 +189,7 @@
$options_map = $post_helper->getOptionsMap();
$post_options = $object->GetDBField('Options');
+
foreach ($options_map as $option_name => $field_name) {
$option_value = $post_helper->GetPostOption($option_name, $post_options);
$object->SetDBField($field_name, (int)$option_value);
@@ -185,9 +200,13 @@
* Updates cached post counter in topic
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
+ parent::OnAfterItemCreate($event);
+
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -206,17 +225,17 @@
$category_id = $this->Application->GetVar('m_cat_id');
$post_helper->PropagateCategoryField($category_id, 'Modified', $object->GetDBField('CreatedOn'));
- if (!$this->Application->isAdmin && $main_object->GetDBField('Posts')) {
+ if ( !$this->Application->isAdmin && $main_object->GetDBField('Posts') ) {
// don't send any email events when in admin OR new topic just added (0 posts)
$user_notified = false; // don't send POST.ADD event twice to same user (in case if owner adds new post)
- if ($main_object->GetDBField('NotifyOwnerOnChanges')) {
+ if ( $main_object->GetDBField('NotifyOwnerOnChanges') ) {
$user_notified = $main_object->GetDBField('OwnerId');
$this->Application->EmailEventUser('POST.ADD', $user_notified);
}
$post_owner_id = $object->GetDBField('CreatedById');
- if (($post_owner_id > 0) && ($user_notified != $post_owner_id)) {
+ if ( ($post_owner_id > 0) && ($user_notified != $post_owner_id) ) {
$this->Application->EmailEventUser('POST.ADD', $post_owner_id);
}
@@ -230,12 +249,14 @@
$posts_count = $post_helper->updatePostCount($topic_id, +1);
$main_object->SetDBField('Posts', $posts_count);
- // autolock topic after N number of posts (if option enabled)
+ // auto-lock topic after N number of posts (if option enabled)
$auto_lock = $this->Application->ConfigValue('AutoTopicLockPosts');
- if ((int)$auto_lock > 0) {
- if ($posts_count >= $auto_lock) {
+
+ if ( (int)$auto_lock > 0 ) {
+ if ( $posts_count >= $auto_lock ) {
// user has unlocked topic after $auto_lock and posts again -> ensure that topic will be locked again
- $this->Application->HandleEvent($parent_prefix.':OnTopicLockToggle');
+ $lock_event = new kEvent($parent_prefix . ':OnTopicLockToggle');
+ $this->Application->HandleEvent($lock_event);
}
}
}
Index: in-bulletin/units/private_message_body/private_message_body_eh.php
===================================================================
--- in-bulletin/units/private_message_body/private_message_body_eh.php (revision 14590)
+++ in-bulletin/units/private_message_body/private_message_body_eh.php (working copy)
@@ -20,9 +20,13 @@
* Sets default values
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
$object =& $event->getObject();
/* @var $object kDBItem */
Index: in-bulletin/units/private_messages/private_message_eh.php
===================================================================
--- in-bulletin/units/private_messages/private_message_eh.php (revision 14590)
+++ in-bulletin/units/private_messages/private_message_eh.php (working copy)
@@ -32,8 +32,11 @@
* Applies folder & message owner filter to message list
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
$folder_id = $this->Application->GetVar('folder_id');
if ($folder_id === false) {
@@ -58,13 +61,17 @@
* Puts message to Sent folder
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
$object =& $event->getObject();
/* @var $object kDBItem */
- if ($object->GetDBField('FolderId') != PM_FOLDER_SENT) {
+ if ( $object->GetDBField('FolderId') != PM_FOLDER_SENT ) {
// when creating "Inbox" message (from "Sent" message) don't reset folder & status
return ;
}
@@ -79,8 +86,10 @@
* Creates 1st post when topic is created
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
@@ -89,14 +98,14 @@
$this->Application->EmailEventUser('PM.ADD', $object->GetDBField('ToId'));
- if ($object->GetDBField('FolderId') != PM_FOLDER_SENT) {
+ if ( $object->GetDBField('FolderId') != PM_FOLDER_SENT ) {
// 1. create message in sender's "Sent" folder (this method only for this step)
// 2. create message body (shared)
// 3. create message copy in recipient's "Inbox" folder
return ;
}
- $message_body =& $this->Application->recallObject($event->Prefix.'-body', null, Array ('skip_autoload' => true));
+ $message_body =& $this->Application->recallObject($event->Prefix . '-body', null, Array ('skip_autoload' => true));
/* @var $message_body kDBItem */
// 1. create message body (for sender & recipient)
@@ -104,7 +113,7 @@
$message_body->SetDBFieldsFromHash($object->GetFieldValues(), $copy_fields);
$body_created = $message_body->Create();
- if ($body_created) {
+ if ( $body_created ) {
// 2. link body with message
$object->SetDBField('PMBodyId', $message_body->GetID());
$object->Update();
@@ -120,9 +129,13 @@
* Sets post options to virtual fields
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
+ parent::OnAfterItemLoad($event);
+
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -131,6 +144,7 @@
$options_map = $post_helper->getOptionsMap();
$post_options = $object->GetDBField('Options');
+
foreach ($options_map as $option_name => $field_name) {
$option_value = $post_helper->GetPostOption($option_name, $post_options);
$object->SetDBField($field_name, (int)$option_value);
Index: in-bulletin/units/topics/topics_event_handler.php
===================================================================
--- in-bulletin/units/topics/topics_event_handler.php (revision 14590)
+++ in-bulletin/units/topics/topics_event_handler.php (working copy)
@@ -16,13 +16,14 @@
class TopicsEventHandler extends kCatDBEventHandler {
-
/**
* Checks topic lock permission
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
if ($event->Name == 'OnTopicLockToggle') {
$object =& $event->getObject();
@@ -64,8 +65,10 @@
* Cache topic owner
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
@@ -76,8 +79,10 @@
* Cache topic owner
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
@@ -86,26 +91,28 @@
$object =& $event->getObject();
/* @var $object kCatDBItem */
- if (!$object->GetDBField('TodayDate')) {
+ if ( !$object->GetDBField('TodayDate') ) {
$object->SetDBField('TodayDate', adodb_date('Y-m-d'));
}
$post_helper =& $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
- $object->SetDBField('TopicText', $post_helper->CensorText( $object->GetDBField('TopicText') ));
+ $object->SetDBField('TopicText', $post_helper->CensorText($object->GetDBField('TopicText')));
}
/**
* Creates 1st post when topic is created
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
- if ($event->Special == '-item') {
+ if ( $event->Special == '-item' ) {
// don't create first post when cloning
return ;
}
@@ -113,7 +120,7 @@
$object =& $event->getObject();
/* @var $object kDBItem */
- $post =& $this->Application->recallObject($event->Prefix.'-post', null, Array ('skip_autoload' => true));
+ $post =& $this->Application->recallObject($event->Prefix . '-post', null, Array ('skip_autoload' => true));
/* @var $post kDBItem */
$post->SetDBField('Pending', $object->GetDBField('Status') == STATUS_ACTIVE ? 0 : 1);
@@ -157,18 +164,20 @@
}
/**
- * Makes first post body field non-requered when topic has posts already
+ * Makes first post body field non-required when topic has posts already
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
$object =& $event->getObject();
/* @var $object kCatDBItem */
- if ($object->GetDBField('Posts') > 0 || !$this->Application->isAdminUser) {
+ if ( $object->GetDBField('Posts') > 0 || !$this->Application->isAdminUser ) {
$object->setRequired('PostingText', false);
}
}
Index: in-commerce/units/addresses/addresses_event_handler.php
===================================================================
--- in-commerce/units/addresses/addresses_event_handler.php (revision 14590)
+++ in-commerce/units/addresses/addresses_event_handler.php (working copy)
@@ -40,11 +40,14 @@
}
/**
- * Enter description here...
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
if ($this->Application->isAdminUser) {
return ;
@@ -76,13 +79,17 @@
* Ensures, that user have only one "use as billing" / "use as shipping" address
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
$object =& $event->getObject();
/* @var $object kDBItem */
- if (!$object->isLoaded() || !$this->checkItemStatus($event)) {
+ if ( !$object->isLoaded() || !$this->checkItemStatus($event) ) {
// not trivially loaded object OR not current user address
$event->status = kEvent::erPERM_FAIL;
return ;
@@ -139,8 +146,10 @@
* Fills states for object country
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
@@ -284,10 +293,14 @@
* Disables Guest ability to create addresses
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
- if (!$this->Application->LoggedIn()) {
+ parent::OnBeforeItemCreate($event);
+
+ if ( !$this->Application->LoggedIn() ) {
$event->status = kEvent::erPERM_FAIL;
return ;
}
Index: in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php
===================================================================
--- in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php (revision 14590)
+++ in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php (working copy)
@@ -15,12 +15,21 @@
class AffiliatePaymentTypesEventHandler extends kDBEventHandler {
- function SetCustomQuery(&$event)
+ /**
+ * Lists only active affiliate payment types on Front-End
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
+ */
+ protected function SetCustomQuery(&$event)
{
- if($event->Special == 'active')
- {
+ if ( !$this->Application->isAdmin ) {
$object =& $event->getObject();
- $object->addFilter('active', '%1$s.Status = 1');
+ /* @var $object kDBList */
+
+ $object->addFilter('active', '%1$s.Status = ' . STATUS_ACTIVE);
}
}
@@ -38,51 +47,74 @@
/**
- * Enter description here...
+ * Ensures, that user have only one "use as billing" / "use as shipping" address
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
+ $this->itemChanged($event);
+ }
+
+ /**
+ * Occurs before creating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+ $this->itemChanged($event);
+ }
+
+ /**
+ * Occurs before item is changed
+ *
+ * @param kEvent $event
+ */
+ function itemChanged(&$event)
+ {
$object =& $event->getObject();
+ /* @var $object kDBItem */
- if ($object->GetDBField('IsPrimary') && $object->Validate()) {
- $table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
- $sql = 'UPDATE '.$table_name.' SET IsPrimary = 0';
+ if ( $object->GetDBField('IsPrimary') && $object->Validate() ) {
+ $sql = 'UPDATE ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
+ SET IsPrimary = 0';
$this->Conn->Query($sql);
- $status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
+ $status_field = array_shift( $this->Application->getUnitOption($event->Prefix, 'StatusField') );
$object->SetDBField($status_field, 1);
}
}
- function OnBeforeItemCreate(&$event)
+ /**
+ * Don't allow to delete primary affiliate payment type
+ *
+ * @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
+ */
+ protected function customProcessing(&$event, $type)
{
- $this->OnBeforeItemUpdate($event);
- }
+ if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
+ $ids = $event->getEventParam('ids');
- function OnMassDelete(&$event)
- {
- if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
- $event->status = kEvent::erFAIL;
- return;
- }
+ $sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . '
+ FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
+ WHERE IsPrimary = 1';
+ $primary_id = $this->Conn->GetOne($sql);
- $this->StoreSelectedIDs($event);
- $event->setEventParam('ids', $this->getSelectedIDs($event) );
- $ids = $event->getEventParam('ids');
+ $ids = array_diff($ids, Array ($primary_id));
- $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
-
- $sql = 'SELECT AffiliatePlanId FROM '.$this->Application->getUnitOption('ap', 'TableName').'
- WHERE IsPrimary = 1';
- $primary_id = $this->Conn->GetOne($sql);
- $ids = array_diff($ids, Array($primary_id));
-
- if($ids)
- {
- $temp->DeleteItems($event->Prefix, $event->Special, $ids);
+ $event->setEventParam('ids', $ids);
}
- $this->clearSelectedIDs($event);
}
}
\ No newline at end of file
Index: in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php
===================================================================
--- in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php (revision 14590)
+++ in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php (working copy)
@@ -16,27 +16,34 @@
class AffiliatePaymentsEventHandler extends kDBEventHandler {
/**
- * Enter description here...
+ * Apply some special processing to object being
+ * recalled before using it in other events that
+ * call prepareObject
*
- * @param kDBItem $object
+ * @param kDBItem|kDBList $object
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function prepareObject(&$object, &$event)
+ protected function prepareObject(&$object, &$event)
{
- if($event->Special == 'log') return false;
+ if ( $event->Special == 'log' ) {
+ return ;
+ }
$parent_info = $object->getLinkedInfo();
+
$parent_object =& $this->Application->recallObject($parent_info['ParentPrefix']);
+ /* @var $parent_object kDBItem */
+
$options = $object->getFieldOptions('PaymentTypeId');
- if($parent_object->isLoaded())
- {
+ if ( $parent_object->isLoaded() ) {
$options['default'] = $parent_object->GetDBField('PaymentTypeId');
$object->SetDBField('PaymentTypeId', $parent_object->GetDBField('PaymentTypeId'));
}
- if($this->Application->GetVar($event->getPrefixSpecial().'_event') != 'OnNew' && $this->Application->GetVar($event->getPrefixSpecial().'_event') != 'OnCreate')
- {
+ if ( $this->Application->GetVar($event->getPrefixSpecial() . '_event') != 'OnNew' && $this->Application->GetVar($event->getPrefixSpecial() . '_event') != 'OnCreate' ) {
$options['options'][0] = '';
}
@@ -59,38 +66,44 @@
}
/**
- * Set's day of payment for newly created payments
+ * Updates Affiliate Record On Successfully payment creation
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
- $object =& $event->getObject( Array('skip_autoload'=>true) );
- }
+ parent::OnAfterItemCreate($event);
- /**
- * Updates Affiliate Record On Successfuly payment creation
- *
- * @param kEvent $event
- */
- function OnAfterItemCreate(&$event)
- {
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
$parent_info = $object->getLinkedInfo();
- $sql = 'SELECT MAX(PaymentDate) FROM '.$object->TableName.'
- WHERE '.$parent_info['ParentTableKey'].' = '.$parent_info['ParentId'];
+
+ $sql = 'SELECT MAX(PaymentDate)
+ FROM ' . $object->TableName . '
+ WHERE ' . $parent_info['ParentTableKey'] . ' = ' . $parent_info['ParentId'];
$payment_date = $this->Conn->GetOne($sql);
- $amount_payed = $object->GetDBField('Amount');
+ $affiliate =& $this->Application->recallObject('affil');
+ /* @var $affiliate kDBItem */
- $affiliate =& $this->Application->recallObject('affil');
- $affiliate->SetDBField( 'AmountToPay', $affiliate->GetDBField('AmountToPay') - $amount_payed );
+ $affiliate->SetDBField('AmountToPay', $affiliate->GetDBField('AmountToPay') - $object->GetDBField('Amount'));
$affiliate->SetDBField('LastPaymentDate_date', $payment_date);
$affiliate->SetDBField('LastPaymentDate_time', $payment_date);
$affiliate->Update();
}
- function SetCustomQuery(&$event)
+ /**
+ * Apply any custom changes to list's sql query
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
+ */
+ protected function SetCustomQuery(&$event)
{
$object =& $event->getObject();
if($event->Special == 'log')
Index: in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php
===================================================================
--- in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php (revision 14590)
+++ in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php (working copy)
@@ -15,7 +15,15 @@
class AffiliatePlansEventHandler extends kDBEventHandler {
- function SetCustomQuery(&$event)
+ /**
+ * Apply any custom changes to list's sql query
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
+ */
+ protected function SetCustomQuery(&$event)
{
if($event->Special == 'active')
{
@@ -37,56 +45,80 @@
}
/**
- * Enter description here...
+ * Occurs before updating item
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
+ $this->itemChanged($event);
+ }
+
+ /**
+ * Occurs before creating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+ $this->itemChanged($event);
+ }
+
+ /**
+ * Occurs before item is changed
+ *
+ * @param kEvent $event
+ */
+ function itemChanged(&$event)
+ {
$object =& $event->getObject();
+ /* @var $object kDBItem */
$live_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
- $plans_count = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$live_table);
- if(!$plans_count) $object->SetDBField('IsPrimary', 1);
+ $plans_count = $this->Conn->GetOne('SELECT COUNT(*) FROM ' . $live_table);
+ if ( !$plans_count ) {
+ $object->SetDBField('IsPrimary', 1);
+ }
- if( $object->GetDBField('IsPrimary') && $object->Validate() )
- {
- $sql = 'UPDATE '.$this->Application->getUnitOption($event->Prefix, 'TableName').'
+ if ( $object->GetDBField('IsPrimary') && $object->Validate() ) {
+ $sql = 'UPDATE ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
SET IsPrimary = 0';
$this->Conn->Query($sql);
- $status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
+ $status_field = array_shift($this->Application->getUnitOption($event->Prefix, 'StatusField'));
$object->SetDBField($status_field, 1);
}
}
- function OnBeforeItemCreate(&$event)
+ /**
+ * Don't allow to delete primary affiliate plan
+ *
+ * @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
+ */
+ protected function customProcessing(&$event, $type)
{
- $this->OnBeforeItemUpdate($event);
- }
+ if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
+ $ids = $event->getEventParam('ids');
- function OnMassDelete(&$event)
- {
- if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
- $event->status = kEvent::erFAIL;
- return;
- }
+ $sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . '
+ FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
+ WHERE IsPrimary = 1';
+ $primary_id = $this->Conn->GetOne($sql);
- $ids = $this->StoreSelectedIDs($event);
- $event->setEventParam('ids', $ids );
- $ids = $event->getEventParam('ids');
+ $ids = array_diff($ids, Array ($primary_id));
- $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
-
- $sql = 'SELECT AffiliatePlanId FROM '.$this->Application->getUnitOption('ap', 'TableName').'
- WHERE IsPrimary = 1';
- $primary_id = $this->Conn->GetOne($sql);
- $ids = array_diff($ids, Array($primary_id));
-
- if($ids)
- {
- $temp->DeleteItems($event->Prefix, $event->Special, $ids);
+ $event->setEventParam('ids', $ids);
}
- $this->clearSelectedIDs($event);
}
}
\ No newline at end of file
Index: in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php
===================================================================
--- in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (revision 14590)
+++ in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (working copy)
@@ -78,14 +78,27 @@
$event->CallSubEvent('OnPreSaveBrackets');
}
- function OnBeforeItemUpdate(&$event)
+ /**
+ * Occurs before updating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
$object =& $event->getObject();
+ /* @var $object kDBItem */
+
$linked_info = $object->getLinkedInfo();
$object->SetDBField($linked_info['ParentTableKey'], $linked_info['ParentId']);
$brackets_helper =& $this->Application->recallObject('BracketsHelper');
- $brackets_helper->InitHelper('FromAmount', 'ToAmount', Array('Percent' => '') );
+ /* @var $brackets_helper kBracketsHelper */
+
+ $brackets_helper->InitHelper('FromAmount', 'ToAmount', Array ('Percent' => ''));
$brackets_helper->replaceInfinity($event);
}
Index: in-commerce/units/affiliates/affiliates_tag_processor.php
===================================================================
--- in-commerce/units/affiliates/affiliates_tag_processor.php (revision 14590)
+++ in-commerce/units/affiliates/affiliates_tag_processor.php (working copy)
@@ -61,25 +61,33 @@
}
/**
- * Returns true if user is affiliate
+ * [Aggregated Tag] Returns true if user is affiliate
*
* @param Array $params
* @return bool
+ * @access protected
*/
- function User_IsAffiliate($params)
+ protected function User_IsAffiliate($params)
{
- $object =& $this->Application->recallObject($this->Prefix.'.user', $this->Prefix, Array('skip_autoload'=>true) );
- $object->Load( $this->Application->RecallVar('user_id'), 'PortalUserId' );
-
+ $object =& $this->Application->recallObject($this->Prefix . '.user');
+ /* @var $object kDBItem */
+
return $object->isLoaded();
}
- function User_AffiliateIsNotActive($params)
+ /**
+ * [Aggregated Tag] Checks, that affiliate record for current user exists and is active
+ *
+ * @param $params
+ * @return bool
+ * @access protected
+ */
+ protected function User_AffiliateIsActive($params)
{
- $object =& $this->Application->recallObject($this->Prefix.'.user', $this->Prefix, Array('skip_autoload'=>true) );
- $object->Load( $this->Application->RecallVar('user_id'), 'PortalUserId' );
+ $object =& $this->Application->recallObject($this->Prefix . '.user');
+ /* @var $object kDBItem */
- return $object->isLoaded() && ($object->GetDBField('Status') != 1);
+ return $object->isLoaded() && ($object->GetDBField('Status') == STATUS_ACTIVE);
}
/**
@@ -115,14 +123,14 @@
function IsAffiliateOrRegisterAsAffiliateAllowed($params)
{
- $object =& $this->Application->recallObject($this->Prefix.'.user', $this->Prefix, Array('skip_autoload'=>true) );
- $object->Load( $this->Application->RecallVar('user_id'), 'PortalUserId' );
+ $object =& $this->Application->recallObject($this->Prefix . '.user');
+ /* @var $object kDBItem */
- return ($this->Application->ConfigValue('Comm_RegisterAsAffiliate') || $object->isLoaded()) ? 1 : 0;
+ return $this->Application->ConfigValue('Comm_RegisterAsAffiliate') || $object->isLoaded() ? 1 : 0;
}
/**
- * [AGGREGATED TAG] Checks if affilite registration is allowed
+ * [AGGREGATED TAG] Checks if affiliate registration is allowed
*
* @param Array $params
* @return int
@@ -135,10 +143,24 @@
function Main_RequireAffiliate($params)
{
$t = $params['registration_template'];
- if( !$this->User_IsAffiliate($params) )
- {
- $redirect_params = Array( 'next_template' => $this->Application->GetVar('t') );
+
+ if ( !$this->User_IsAffiliate($params) ) {
+ $redirect_params = Array ('next_template' => $this->Application->GetVar('t'));
$this->Application->Redirect($t, $redirect_params);
}
}
+
+ /**
+ * Calls OnNew event from template, when no other event submitted
+ *
+ * @param Array $params
+ */
+ function PresetFormFields($params)
+ {
+ $prefix = $this->getPrefixSpecial();
+
+ if ( !$this->Application->GetVar($prefix . '_event') && !$this->Application->GetVar('u.register_event') ) {
+ $this->Application->HandleEvent(new kEvent($prefix . ':OnNew'));
+ }
+ }
}
\ No newline at end of file
Index: in-commerce/units/brackets/brackets_event_handler.php
===================================================================
--- in-commerce/units/brackets/brackets_event_handler.php (revision 14590)
+++ in-commerce/units/brackets/brackets_event_handler.php (working copy)
@@ -30,25 +30,38 @@
$this->permMapping = array_merge($this->permMapping, $permissions);
}
- function prepareObject(&$object, &$event)
+ /**
+ * Apply some special processing to object being
+ * recalled before using it in other events that
+ * call prepareObject
+ *
+ * @param kDBItem|kDBList $object
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function prepareObject(&$object, &$event)
{
- if($this->Application->GetVar('s_id') === false)
- {
+ if ( $this->Application->GetVar('s_id') === false ) {
return;
}
$shipping_object =& $this->Application->recallObject('s');
+ /* @var $shipping_object kDBItem */
+
$lang_object =& $this->Application->recallObject('lang.current');
+ /* @var $lang_object LanguagesItem */
- if($lang_object->GetDBField('UnitSystem') == 2 && $shipping_object->GetDBField('Type') == 1)
- {
- $fields = Array('Start', 'End');
+ if ( $lang_object->GetDBField('UnitSystem') == 2 && $shipping_object->GetDBField('Type') == 1 ) {
+ $fields = Array ('Start', 'End');
+
$formatter =& $this->Application->recallObject('kUnitFormatter');
- foreach($fields as $field)
- {
+ /* @var $formatter kUnitFormatter */
+
+ foreach ($fields as $field) {
+ $object->SetFieldOption($field, 'formatter', 'kUnitFormatter');
$options = $object->GetFieldOptions($field);
- $options['formatter'] = 'kUnitFormatter';
- $object->SetFieldOptions($field, $options);
+
$formatter->prepareOptions($field, $options, $object);
}
}
@@ -156,17 +169,32 @@
$event->CallSubEvent('OnPreSaveBrackets');
}
- function OnBeforeItemUpdate(&$event)
+ /**
+ * Occurs before updating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
$shipping_object =& $this->Application->recallObject('s');
+ /* @var $shipping_object kDBItem */
+
$default_start = ($shipping_object->GetDBField('Type') == 1) ? 0 : 1;
$object =& $event->getObject();
+ /* @var $object kDBItem */
+
$linked_info = $object->getLinkedInfo();
$object->SetDBField($linked_info['ParentTableKey'], $linked_info['ParentId']);
$brackets_helper =& $this->Application->recallObject('BracketsHelper');
- $brackets_helper->InitHelper('Start', 'End', Array(), $default_start );
+ /* @var $brackets_helper kBracketsHelper */
+
+ $brackets_helper->InitHelper('Start', 'End', Array (), $default_start);
$brackets_helper->replaceInfinity($event);
}
Index: in-commerce/units/coupons/coupons_event_handler.php
===================================================================
--- in-commerce/units/coupons/coupons_event_handler.php (revision 14590)
+++ in-commerce/units/coupons/coupons_event_handler.php (working copy)
@@ -59,8 +59,15 @@
$object->SetDBField('DefaultExpiration_time', $default_expiration);
}
-
- function OnBeforeClone(&$event)
+ /**
+ * Occurs before an item has been cloned
+ * Id of newly created item is passed as event' 'id' param
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeClone(&$event)
{
parent::OnBeforeClone($event);
@@ -206,33 +213,69 @@
}
/**
- * Enter description here...
+ * Prepare temp tables for creating new item
+ * but does not create it. Actual create is
+ * done in OnPreSaveCreated
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnPreCreate(&$event){
-
+ protected function OnPreCreate(&$event)
+ {
parent::OnPreCreate($event);
- $object = &$event->getObject();
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
$exp_date = adodb_mktime();
-
$default_duration = $this->Application->ConfigValue('Comm_DefaultCouponDuration');
- if ($default_duration && $default_duration>0){
- $exp_date += (int)$default_duration*86400;
+ if ( $default_duration && $default_duration > 0 ) {
+ $exp_date += (int)$default_duration * 86400;
}
+
$object->SetDBField('Expiration_date', $exp_date);
}
- function OnBeforeItemUpdate(&$event)
+ /**
+ * Occurs before updating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemUpdate(&$event)
{
- $object =& $event->getObject();
- $object->SetDBField( 'Amount', abs($object->GetDBField('Amount')) );
+ parent::OnBeforeItemUpdate($event);
+
+ $this->itemChanged($event);
}
- function OnBeforeItemCreate(&$event)
+ /**
+ * Occurs before creating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemCreate(&$event)
{
- $this->OnBeforeItemUpdate($event);
+ parent::OnBeforeItemCreate($event);
+
+ $this->itemChanged($event);
}
+
+ /**
+ * Occurs before item is changed
+ *
+ * @param kEvent $event
+ */
+ function itemChanged(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $object->SetDBField('Amount', abs($object->GetDBField('Amount')));
+ }
}
\ No newline at end of file
Index: in-commerce/units/currencies/currencies_event_handler.php
===================================================================
--- in-commerce/units/currencies/currencies_event_handler.php (revision 14590)
+++ in-commerce/units/currencies/currencies_event_handler.php (working copy)
@@ -52,38 +52,47 @@
}
/**
- * Enter description here...
+ * Occurs before updating item
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
+ parent::OnBeforeItemUpdate($event);
+
$object =& $event->getObject();
- if($object->GetDBField('IsPrimary') && $object->Validate())
- {
- $sql = 'UPDATE '.$this->Application->getUnitOption($this->Prefix, 'TableName').'
+ /* @var $object kDBItem */
+
+ if ( $object->GetDBField('IsPrimary') && $object->Validate() ) {
+ $sql = 'UPDATE ' . $this->Application->getUnitOption($this->Prefix, 'TableName') . '
SET IsPrimary = 0
- WHERE CurrencyId <> '.$object->GetDBField('CurrencyId');
+ WHERE CurrencyId <> ' . $object->GetDBField('CurrencyId');
$this->Conn->Query($sql);
+
$object->SetDBField('Status', 1);
}
- $object->SetDBField('Modified_date', adodb_mktime() );
- $object->SetDBField('Modified_time', adodb_mktime() );
- if($object->GetDBField('Status') == 0)
- {
- $sql = 'DELETE FROM '.$this->Application->getUnitOption('ptc', 'TableName').
- ' WHERE CurrencyId='.$object->GetDBField('CurrencyId');
+ $object->SetDBField('Modified_date', adodb_mktime());
+ $object->SetDBField('Modified_time', adodb_mktime());
+
+ if ( $object->GetDBField('Status') == 0 ) {
+ $sql = 'DELETE FROM ' . $this->Application->getUnitOption('ptc', 'TableName') . '
+ WHERE CurrencyId = ' . $object->GetDBField('CurrencyId');
$this->Conn->Query($sql);
}
}
/**
- * Enter description here...
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
$object =& $event->getObject();
@@ -115,17 +124,20 @@
}
/**
- * Enter description here...
+ * Saves content of temp table into live and
+ * redirects to event' default redirect (normally grid template)
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnSave(&$event)
+ protected function OnSave(&$event)
{
- $this->Application->StoreVar( 'saved_curr_ids', $this->Application->RecallVar($event->Prefix.'_selected_ids') );
+ $this->Application->StoreVar('saved_curr_ids', $this->Application->RecallVar($event->Prefix . '_selected_ids'));
+
parent::OnSave($event);
}
-
/**
* Enter description here...
*
Index: in-commerce/units/destinations/dst_event_handler.php
===================================================================
--- in-commerce/units/destinations/dst_event_handler.php (revision 14590)
+++ in-commerce/units/destinations/dst_event_handler.php (working copy)
@@ -46,7 +46,15 @@
}
}
- function customProcessing(&$event, $type)
+ /**
+ * Apply custom processing to item
+ *
+ * @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
+ */
+ protected function customProcessing(&$event, $type)
{
if($type != 'before') return ;
Index: in-commerce/units/discounts/discounts_event_handler.php
===================================================================
--- in-commerce/units/discounts/discounts_event_handler.php (revision 14590)
+++ in-commerce/units/discounts/discounts_event_handler.php (working copy)
@@ -15,14 +15,44 @@
class DiscountsEventHandler extends kDBEventHandler {
- function OnBeforeItemUpdate(&$event)
+ /**
+ * Occurs before updating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemUpdate(&$event)
{
- $object =& $event->getObject();
- $object->SetDBField( 'Amount', abs($object->GetDBField('Amount')) );
+ parent::OnBeforeItemUpdate($event);
+
+ $this->itemChanged($event);
}
- function OnBeforeItemCreate(&$event)
+ /**
+ * Occurs before creating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemCreate(&$event)
{
- $this->OnBeforeItemUpdate($event);
+ parent::OnBeforeItemCreate($event);
+
+ $this->itemChanged($event);
}
+
+ /**
+ * Occurs before item changed
+ *
+ * @param kEvent $event
+ */
+ function itemChanged(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $object->SetDBField('Amount', abs($object->GetDBField('Amount')));
+ }
}
\ No newline at end of file
Index: in-commerce/units/files/files.php
===================================================================
--- in-commerce/units/files/files.php (revision 14590)
+++ in-commerce/units/files/files.php (working copy)
@@ -11,19 +11,27 @@
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
- defined('FULL_PATH') or die('restricted access!');
+defined('FULL_PATH') or die('restricted access!');
- class FilesItem extends kDBItem {
+class FilesItem extends kDBItem {
- public function Delete($id = null)
- {
- $this->Load($id);
- $upload_dir = $this->Fields['FilePath']['upload_dir'];
- $file_path = FULL_PATH.$upload_dir.$this->GetDBField('FilePath');
- if(file_exists($file_path))
- {
- unlink($file_path);
- }
- return parent::Delete($id);
+ /**
+ * Deletes the record from database
+ *
+ * @param int $id
+ * @return bool
+ * @access public
+ */
+ public function Delete($id = null)
+ {
+ $this->Load($id);
+ $upload_dir = $this->Fields['FilePath']['upload_dir'];
+ $file_path = FULL_PATH . $upload_dir . $this->GetDBField('FilePath');
+
+ if ( file_exists($file_path) ) {
+ unlink($file_path);
}
- }
\ No newline at end of file
+
+ return parent::Delete($id);
+ }
+}
\ No newline at end of file
Index: in-commerce/units/gateways/gw_tag_processor.php
===================================================================
--- in-commerce/units/gateways/gw_tag_processor.php (revision 14590)
+++ in-commerce/units/gateways/gw_tag_processor.php (working copy)
@@ -91,26 +91,31 @@
return $o;
}
- function PredefinedOptions($params)
+ /**
+ * Prints list a all possible field options
+ *
+ * @param Array $params
+ * @return string
+ * @access protected
+ */
+ protected function PredefinedOptions($params)
{
- $object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
- $value = $this->gwConfigValue($params);
-
- $options = explode(',', $object->GetDBField('ValueList') );
-
$block_params = $this->prepareTagParams($params);
-
$block_params['name'] = $this->SelectParam($params, 'render_as,block');
$block_params['pass_params'] = 'true';
$o = '';
- foreach ($options as $key_val)
- {
- list($key,$val) = explode('=', $key_val);
+ $value = $this->gwConfigValue($params);
+ $options = explode(',', $object->GetDBField('ValueList'));
+
+ foreach ($options as $key_val) {
+ list($key, $val) = explode('=', $key_val);
$block_params['key'] = $key;
$block_params['option'] = $val;
- $block_params['selected'] = ( $key == $value ? ' '.$params['selected'] : '');
+ $block_params['selected'] = ($key == $value ? ' ' . $params['selected'] : '');
$block_params['PrefixSpecial'] = $this->getPrefixSpecial();
$o .= $this->Application->ParseBlock($block_params, 1);
}
Index: in-commerce/units/manufacturers/manufacturers_event_handler.php
===================================================================
--- in-commerce/units/manufacturers/manufacturers_event_handler.php (revision 14590)
+++ in-commerce/units/manufacturers/manufacturers_event_handler.php (working copy)
@@ -30,11 +30,14 @@
}
/**
- * Enter description here...
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
if ($this->Application->isAdminUser) {
return ;
@@ -72,14 +75,14 @@
$object->addFilter('category_manufacturer_filter', $manufacturers ? '%1$s.ManufacturerId IN (' . implode(',', $manufacturers) . ')' : 'FALSE');
}
-
/**
- * Prefill states dropdown with correct values
+ * Pre-fills states dropdown with correct values
*
* @param kEvent $event
- * @access public
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
@@ -93,8 +96,10 @@
* Processes states
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
@@ -109,8 +114,10 @@
* Processes states
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
Index: in-commerce/units/order_items/order_items_event_handler.php
===================================================================
--- in-commerce/units/order_items/order_items_event_handler.php (revision 14590)
+++ in-commerce/units/order_items/order_items_event_handler.php (working copy)
@@ -178,18 +178,37 @@
$this->Conn->Query($sql);
}
- function OnAfterItemLoad(&$event)
+ /**
+ * Occurs after loading item, 'id' parameter
+ * allows to get id of item that was loaded
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnAfterItemLoad(&$event)
{
+ parent::OnAfterItemLoad($event);
+
$object =& $event->getObject();
- if( $item_info = $object->GetDBField('ItemData') )
- {
+ /* @var $object kDBItem */
+
+ if ( $item_info = $object->GetDBField('ItemData') ) {
$item_info = unserialize($item_info);
$object->SetDBField('DiscountType', getArrayValue($item_info, 'DiscountType'));
$object->SetDBField('DiscountId', getArrayValue($item_info, 'DiscountId'));
}
}
- function SetCustomQuery(&$event)
+ /**
+ * Apply any custom changes to list's sql query
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
+ */
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
Index: in-commerce/units/payment_type/payment_type_event_handler.php
===================================================================
--- in-commerce/units/payment_type/payment_type_event_handler.php (revision 14590)
+++ in-commerce/units/payment_type/payment_type_event_handler.php (working copy)
@@ -97,20 +97,22 @@
}
/**
- * Occurse before updating item
+ * Occurs before updating item
*
* @param kEvent $event
- * @access public
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
- $object = &$event->getObject();
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
- $status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
+ $status_field = array_shift( $this->Application->getUnitOption($event->Prefix, 'StatusField') );
- if($object->GetDBField('IsPrimary')==1 && $object->GetDBField($status_field)==0){
+ if ( $object->GetDBField('IsPrimary') == 1 && $object->GetDBField($status_field) == 0 ) {
$object->SetDBField($status_field, 1);
}
@@ -118,12 +120,13 @@
}
/**
- * Occurse before creating item
+ * Occurs before creating item
*
* @param kEvent $event
- * @access public
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
@@ -134,11 +137,13 @@
* Disable delete on primary payment type
*
* @param kEvent $event
+ * @param string $type
+ * @return void
* @access protected
*/
-
- function customProcessing(&$event, $when){
- if ($event->Name == 'OnMassDelete' && $when == 'before'){
+ protected function customProcessing(&$event, $type)
+ {
+ if ($event->Name == 'OnMassDelete' && $type == 'before'){
$object = &$event->getObject();
$ids = $event->getEventParam('ids');
@@ -157,9 +162,18 @@
}
}
- function OnSave(&$event)
+ /**
+ * Saves content of temp table into live and
+ * redirects to event' default redirect (normally grid template)
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnSave(&$event)
{
$this->Application->StoreVar('check_unused_currencies', 1);
+
parent::OnSave($event);
}
@@ -219,11 +233,14 @@
}
/**
- * Apply system filter to themes list
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
Index: in-commerce/units/pricing/pricing_event_handler.php
===================================================================
--- in-commerce/units/pricing/pricing_event_handler.php (revision 14590)
+++ in-commerce/units/pricing/pricing_event_handler.php (working copy)
@@ -227,7 +227,15 @@
}
}
- function customProcessing(&$event,$type)
+ /**
+ * Apply custom processing to item
+ *
+ * @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
+ */
+ protected function customProcessing(&$event,$type)
{
$bracket =& $event->getObject();
switch ($type)
@@ -372,19 +380,21 @@
}
/**
- * Resets primary mark for other pricings of given product, when current pricing is primary
+ * Resets primary mark for other prices of given product, when current pricing is primary
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
$object =& $event->getObject();
/* @var $object kDBItem */
- if ($object->GetDBField('IsPrimary') == 1) {
- // make all pricings non primary, when this one is
+ if ( $object->GetDBField('IsPrimary') == 1 ) {
+ // make all prices non primary, when this one is
$sql = 'UPDATE ' . $object->TableName . '
SET IsPrimary = 0
WHERE (ProductId = ' . $object->GetDBField('ProductId') . ') AND (' . $object->IDField . ' <> ' . $object->GetID() . ')';
@@ -393,35 +403,50 @@
}
/**
- * Enter description here...
+ * Occurs before creating item
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
$object =& $event->getObject();
+ /* @var $object kDBItem */
+
$table_info = $object->getLinkedInfo($event->Special);
- $table_info['ParentId'] = ($table_info['ParentId']?$table_info['ParentId']:0);
+ $table_info['ParentId'] = ($table_info['ParentId'] ? $table_info['ParentId'] : 0);
- if ( $object->GetDBField('IsPrimary') == 1 ){
- $this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 0 WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
+ if ( $object->GetDBField('IsPrimary') == 1 ) {
+ $sql = 'UPDATE ' . $object->TableName . '
+ SET IsPrimary = 0
+ WHERE ' . $table_info['ForeignKey'] . ' = ' . $table_info['ParentId'];
+ $this->Conn->Query($sql);
}
else {
- $prices_qty = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$object->TableName.' WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
+ $sql = 'SELECT COUNT(*)
+ FROM ' . $object->TableName . '
+ WHERE ' . $table_info['ForeignKey'] . ' = ' . $table_info['ParentId'];
+ $prices_qty = $this->Conn->GetOne($sql);
- if ($prices_qty == 0) {
+ if ( $prices_qty == 0 ) {
$object->SetDBField('IsPrimary', 1);
}
}
}
/**
- * Enter description here...
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
$object =& $event->getObject();
Index: in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (revision 14590)
+++ in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (working copy)
@@ -19,8 +19,11 @@
* Apply custom processing to item
*
* @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
*/
- function customProcessing(&$event, $type)
+ protected function customProcessing(&$event, $type)
{
if ($type == 'after') {
return true;
@@ -238,23 +241,31 @@
$actions->Set($event->getPrefixSpecial().'_GoId', '');
}
- function LoadItem(&$event)
+ /**
+ * Load item if id is available
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function LoadItem(&$event)
{
$object =& $event->getObject();
+ /* @var $object kDBItem */
+
$id = $this->getPassedID($event);
- if (!$id) {
+
+ if ( !$id ) {
$event->CallSubEvent('OnNew');
+
+ return ;
}
- else {
- if ($object->Load($id) )
- {
- $actions =& $this->Application->recallObject('kActions');
- $actions->Set($event->getPrefixSpecial().'_id', $object->GetId() );
- }
- else
- {
- //$object->setID($id);
- }
+
+ if ( $object->Load($id) ) {
+ $actions =& $this->Application->recallObject('kActions');
+ /* @var $actions Params */
+
+ $actions->Set($event->getPrefixSpecial() . '_id', $object->GetId());
}
}
@@ -277,8 +288,18 @@
return $special;
}
- function OnBeforeClone(&$event)
+ /**
+ * Occurs before an item has been cloned
+ * Id of newly created item is passed as event' 'id' param
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeClone(&$event)
{
+ parent::OnBeforeClone($event);
+
$event->Init($event->Prefix, '-item');
$object =& $event->getObject();
@@ -306,9 +327,13 @@
* Restore back values from live table to temp table before overwriting live with temp
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeDeleteFromLive(&$event)
+ protected function OnBeforeDeleteFromLive(&$event)
{
+ parent::OnBeforeDeleteFromLive($event);
+
// check if product inventory management is via options and then proceed
$id = $event->getEventParam('id');
@@ -317,24 +342,25 @@
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
$sql = 'SELECT p.InventoryStatus
- FROM '.$products_table.' p
- LEFT JOIN '.$table_name.' poc ON poc.ProductId = p.ProductId
- WHERE poc.'.$id_field.' = '.$id;
+ FROM ' . $products_table . ' p
+ LEFT JOIN ' . $table_name . ' poc ON poc.ProductId = p.ProductId
+ WHERE poc.' . $id_field . ' = ' . $id;
+ $inventory_status = $this->Conn->GetOne($sql);
- if ($this->Conn->GetOne($sql) == 2) {
- $live_object =& $this->Application->recallObject($event->Prefix.'.itemlive', null, Array('skip_autoload' => true));
+ if ( $inventory_status == ProductInventory::BY_OPTIONS ) {
+ $live_object =& $this->Application->recallObject($event->Prefix . '.itemlive', null, Array ('skip_autoload' => true));
/* @var $live_object kDBItem */
$live_object->SwitchToLive();
$live_object->Load($id);
- $temp_object =& $this->Application->recallObject($event->Prefix.'.itemtemp', null, Array('skip_autoload' => true));
+ $temp_object =& $this->Application->recallObject($event->Prefix . '.itemtemp', null, Array ('skip_autoload' => true));
/* @var $temp_object kDBItem */
$temp_object->SwitchToTemp();
$temp_object->Load($id);
- $temp_object->SetDBFieldsFromHash($live_object->GetFieldValues(), Array('QtyInStock','QtyReserved','QtyBackOrdered','QtyOnOrder'));
+ $temp_object->SetDBFieldsFromHash($live_object->GetFieldValues(), Array ('QtyInStock', 'QtyReserved', 'QtyBackOrdered', 'QtyOnOrder'));
$temp_object->Update();
}
}
Index: in-commerce/units/product_option_combinations/product_option_formatters.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_formatters.php (revision 14590)
+++ in-commerce/units/product_option_combinations/product_option_formatters.php (working copy)
@@ -15,6 +15,15 @@
class kCombinationFormatter extends kFormatter {
+ /**
+ * Formats value of a given field
+ *
+ * @param string $value
+ * @param string $field_name
+ * @param kDBItem|kDBList $object
+ * @param string $format
+ * @return string
+ */
function Format($value, $field_name, $object, $format=null)
{
$o = '';
@@ -45,18 +54,18 @@
* @param string $field_name
* @param kDBItem $object
* @return mixed
+ * @access public
*/
- function Parse($value, $field_name, &$object)
+ public function Parse($value, $field_name, &$object)
{
- if (!is_array($value)) {
+ if ( !is_array($value) ) {
$object->SetError($field_name, 'required');
return '';
}
else {
if ( $object->isRequired($field_name) ) {
- foreach ($value as $key=>$val)
- {
- if ($val == '') {
+ foreach ($value as $key => $val) {
+ if ( $val == '' ) {
$object->SetError($field_name, 'required');
}
}
@@ -69,11 +78,11 @@
class kCombPriceFormatter extends kFormatter {
/**
- * Enter description here...
+ * Formats value of a given field
*
- * @param mixed $value
+ * @param string $value
* @param string $field_name
- * @param kDBItem $object
+ * @param kDBItem|kDBList $object
* @param string $format
* @return string
*/
Index: in-commerce/units/product_options/product_options_event_handler.php
===================================================================
--- in-commerce/units/product_options/product_options_event_handler.php (revision 14590)
+++ in-commerce/units/product_options/product_options_event_handler.php (working copy)
@@ -15,7 +15,15 @@
class ProductOptionsEventHandler extends kDBEventHandler{
- function SetCustomQuery(&$event)
+ /**
+ * Apply any custom changes to list's sql query
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
+ */
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
Index: in-commerce/units/products/products_event_handler.php
===================================================================
--- in-commerce/units/products/products_event_handler.php (revision 14590)
+++ in-commerce/units/products/products_event_handler.php (working copy)
@@ -56,14 +56,17 @@
* Sets default processing data for subscriptions
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
$object =& $event->getObject();
+ /* @var $object kDBItem */
- $product_approve_events = Array(
+ $product_approve_events = Array (
2 => 'p:OnSubscriptionApprove',
4 => 'p:OnDownloadableApprove',
5 => 'p:OnPackageApprove'
@@ -71,11 +74,11 @@
$product_type = $object->GetDBField('Type');
- $type_found = in_array($product_type, array_keys($product_approve_events) );
+ $type_found = in_array($product_type, array_keys($product_approve_events));
- if ($type_found && !$object->GetDBField('ProcessingData') ) {
- $processing_data = Array('ApproveEvent' => $product_approve_events[$product_type] );
- $object->SetDBField( 'ProcessingData', serialize($processing_data) );
+ if ( $type_found && !$object->GetDBField('ProcessingData') ) {
+ $processing_data = Array ('ApproveEvent' => $product_approve_events[$product_type]);
+ $object->SetDBField('ProcessingData', serialize($processing_data));
}
}
@@ -285,22 +288,37 @@
}
}
- function OnBeforeDeleteFromLive(&$event)
+ /**
+ * Occurs before an item is deleted from live table when copying from temp
+ * (temp handler deleted all items from live and then copy over all items from temp)
+ * Id of item being deleted is passed as event' 'id' param
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeDeleteFromLive(&$event)
{
- $id = $event->getEventParam('id');
- $product =& $this->Application->recallObject($event->Prefix.'.itemlive', null, Array('skip_autoload' => true));
+ parent::OnBeforeDeleteFromLive($event);
+
+ $product =& $this->Application->recallObject($event->Prefix . '.itemlive', null, Array ('skip_autoload' => true));
/* @var $product kCatDBItem */
$product->SwitchToLive();
- if (!$product->Load($id)) return ; // this will make sure New product will not be overwritten with empty data
+ $id = $event->getEventParam('id');
- $temp =& $this->Application->recallObject($event->Prefix.'.itemtemp', null, Array('skip_autoload' => true));
+ if ( !$product->Load($id) ) {
+ // this will make sure New product will not be overwritten with empty data
+ return ;
+ }
+
+ $temp =& $this->Application->recallObject($event->Prefix . '.itemtemp', null, Array ('skip_autoload' => true));
/* @var $temp kCatDBItem */
$temp->SwitchToTemp();
$temp->Load($id);
- $temp->SetDBFieldsFromHash($product->GetFieldValues(), Array('QtyInStock','QtyReserved','QtyBackOrdered','QtyOnOrder'));
+ $temp->SetDBFieldsFromHash($product->GetFieldValues(), Array ('QtyInStock', 'QtyReserved', 'QtyBackOrdered', 'QtyOnOrder'));
$temp->Update();
}
@@ -311,23 +329,42 @@
$this->Application->RemoveVar('inventory_actions');
}
- function OnSave(&$event)
+ /**
+ * Saves content of temp table into live and
+ * redirects to event' default redirect (normally grid template)
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnSave(&$event)
{
- $res = parent::OnSave($event);
- if ($event->status == kEvent::erSUCCESS) {
+ parent::OnSave($event);
+
+ if ( $event->status == kEvent::erSUCCESS ) {
$this->RunScheduledInventoryActions($event);
}
- return $res;
}
- function OnPreCreate(&$event)
+ /**
+ * Prepare temp tables for creating new item
+ * but does not create it. Actual create is
+ * done in OnPreSaveCreated
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnPreCreate(&$event)
{
parent::onPreCreate($event);
- $object =& $event->GetObject();
- $object->SetDBField('Type', $this->Application->GetVar( $event->getPrefixSpecial(true).'_new_type' ));
+
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $object->SetDBField('Type', $this->Application->GetVar($event->getPrefixSpecial(true) . '_new_type'));
}
-
/**
* Enter description here...
*
@@ -865,11 +902,14 @@
}
/**
- * Checks, that all required product options are filled in before product is saved
+ * Saves edited item into temp table
+ * If there is no id, new item is created in temp table
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnPreSave(&$event)
+ protected function OnPreSave(&$event)
{
$this->CheckRequiredOptions($event);
@@ -880,8 +920,10 @@
* Set new price to ProductsPricing
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
@@ -996,7 +1038,15 @@
*
* @param kEvent $event
*/
- function OnAfterItemLoad(&$event)
+
+ /**
+ * Load price from temp table if product mode is temp table
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
@@ -1004,7 +1054,7 @@
/* @var $object ProductsItem */
$a_pricing = $object->getPrimaryPricing();
- if (!$a_pricing) {
+ if ( !$a_pricing ) {
// pricing doesn't exist for new products
$price = $cost = null;
}
Index: in-commerce/units/shipping/shipping_event_handler.php
===================================================================
--- in-commerce/units/shipping/shipping_event_handler.php (revision 14590)
+++ in-commerce/units/shipping/shipping_event_handler.php (working copy)
@@ -33,18 +33,21 @@
* Presets shipping cost object based on shipping fields
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
- if (!$this->Application->isAdminUser) {
- return ;
+ if ( !$this->Application->isAdminUser ) {
+ return;
}
$object =& $event->getObject();
+ /* @var $object kDBItem */
- $format = '%01.'.$object->GetDBField('PrecisionAfterSep').'f'; // %01.2f
+ $format = '%01.' . $object->GetDBField('PrecisionAfterSep') . 'f'; // %01.2f
$zero_if_empty = $object->GetDBField('ZeroIfEmpty');
$sc_object =& $this->Application->recallObject('sc', null, Array ('raise_warnings' => 0));
@@ -56,10 +59,10 @@
$flat_options['default'] = $zero_if_empty ? 0 : null;
$sc_object->SetFieldOptions('Flat', $flat_options);
- $perunit_options = $sc_object->GetFieldOptions('PerUnit');
- $perunit_options['format'] = $format;
- $perunit_options['default'] = $zero_if_empty ? 0 : null;
- $sc_object->SetFieldOptions('PerUnit', $perunit_options);
+ $per_unit_options = $sc_object->GetFieldOptions('PerUnit');
+ $per_unit_options['format'] = $format;
+ $per_unit_options['default'] = $zero_if_empty ? 0 : null;
+ $sc_object->SetFieldOptions('PerUnit', $per_unit_options);
}
/**
@@ -140,15 +143,32 @@
$event->status=kEvent::erSUCCESS;
}
- function OnSave(&$event)
+ /**
+ * Saves content of temp table into live and
+ * redirects to event' default redirect (normally grid template)
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnSave(&$event)
{
$this->OnAfterItemLoad($event);
parent::OnSave($event);
}
- function OnAfterItemCreate(&$event)
+ /**
+ * Occurs after creating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnAfterItemCreate(&$event)
{
+ parent::OnAfterItemCreate($event);
+
$event->CallSubEvent('OnAnyChange');
}
@@ -168,14 +188,22 @@
$this->Conn->Query($sql);
}
- function OnPreSaveCreated(&$event){
+ /**
+ * Creates a new item in temp table and
+ * stores item id in App vars and Session on success
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnPreSaveCreated(&$event)
+ {
parent::OnPreSaveCreated($event);
- $default_group = $this->Application->ConfigValue('User_LoggedInGroup');
+ $object =& $event->getObject( Array ('skip_autoload' => true) );
+ /* @var $object kDBItem */
- $object =& $event->getObject( Array('skip_autoload' => true) );
-
- $object->SetDBField('PortalGroups', ','.$default_group.',');
+ $object->SetDBField('PortalGroups', ',' . $this->Application->ConfigValue('User_LoggedInGroup') . ',');
}
function UpdateGroups(&$event){
@@ -196,8 +224,16 @@
}
}
- function customProcessing(&$event, $when){
+ /**
+ * Apply custom processing to item
+ *
+ * @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
+ */
+ protected function customProcessing(&$event, $type)
+ {
$this->UpdateGroups($event);
-
}
}
\ No newline at end of file
Index: in-commerce/units/shipping_costs/shipping_costs_event_handler.php
===================================================================
--- in-commerce/units/shipping_costs/shipping_costs_event_handler.php (revision 14590)
+++ in-commerce/units/shipping_costs/shipping_costs_event_handler.php (working copy)
@@ -169,7 +169,15 @@
$event->status = kEvent::erSUCCESS;
}
- function customProcessing(&$event, $type)
+ /**
+ * Apply custom processing to item
+ *
+ * @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
+ */
+ protected function customProcessing(&$event, $type)
{
if( $type == 'before' && $this->Application->GetVar('sc') )
{
Index: in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (revision 14590)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (working copy)
@@ -16,18 +16,20 @@
class ShippingQuoteEngineEventHandler extends kDBEventHandler {
/**
- * Enter description here...
+ * Occurs before updating item
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
$object =& $event->getObject();
/* @var $object kDBItem */
- $engine =& $this->Application->recallObject( $object->GetDBField('ClassName') );
+ $engine =& $this->Application->recallObject($object->GetDBField('ClassName'));
/* @var $engine ShippingQuoteEngine */
$engine_fields = $engine->GetEngineFields();
@@ -35,7 +37,7 @@
$properties = $properties ? unserialize($properties) : Array ();
// common fields for all shipping quote engines
- if ($object->GetDBField('AccountPassword') != '') {
+ if ( $object->GetDBField('AccountPassword') != '' ) {
// don't erase password by accident
$engine_fields[] = 'AccountPassword';
}
@@ -53,28 +55,28 @@
$from_country = $this->Application->ConfigValue('Comm_Shipping_Country');
$has_states = strlen($from_country) == 3 ? $cs_helper->CountryHasStates($from_country) : false;
- $valid_address = $from_country && ($has_states && $this->Application->ConfigValue('Comm_Shipping_State') || !$has_states) &&
- $this->Application->ConfigValue('Comm_Shipping_City') && $this->Application->ConfigValue('Comm_Shipping_ZIP');
+ $valid_address = $from_country && ($has_states && $this->Application->ConfigValue('Comm_Shipping_State') || !$has_states) && $this->Application->ConfigValue('Comm_Shipping_City') && $this->Application->ConfigValue('Comm_Shipping_ZIP');
- if (!function_exists('curl_init')) {
+ if ( !function_exists('curl_init') ) {
$object->SetError('Status', 'curl_not_present');
}
- elseif (($object->GetDBField('Status') == STATUS_ACTIVE) && !$valid_address) {
+ elseif ( ($object->GetDBField('Status') == STATUS_ACTIVE) && !$valid_address ) {
$object->SetError('Status', 'from_info_not_filled_in');
}
}
/**
- * Enter description here...
+ * Apply same processing to each item being selected in grid
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function iterateItems(&$event)
+ protected function iterateItems(&$event)
{
-// $event->setEventParam('SkipProcessing', 1);
parent::iterateItems($event);
- if($event->Name == 'OnMassApprove')
- {
+
+ if ( $event->Name == 'OnMassApprove' ) {
$event->status = kEvent::erSUCCESS;
$event->redirect = true;
}
@@ -84,8 +86,10 @@
* Sets virtual fields from serialized properties array
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemLoad(&$event)
+ protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
@@ -94,8 +98,8 @@
$properties = $object->GetDBField('Properties');
- if ($properties) {
- $object->SetDBFieldsFromHash( unserialize($properties) );
+ if ( $properties ) {
+ $object->SetDBFieldsFromHash(unserialize($properties));
}
}
@@ -103,8 +107,10 @@
* Deletes cached shipping quotes on any setting change
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemCreate(&$event)
+ protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
Index: in-commerce/units/taxes/taxes_event_handler.php
===================================================================
--- in-commerce/units/taxes/taxes_event_handler.php (revision 14590)
+++ in-commerce/units/taxes/taxes_event_handler.php (working copy)
@@ -41,39 +41,40 @@
$this->eventMethods = array_merge($this->eventMethods, $zones_events);
}
- function customProcessing(&$event, $type)
+ /**
+ * Apply custom processing to item
+ *
+ * @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
+ */
+ protected function customProcessing(&$event, $type)
{
- $zone_object =& $event->GetObject();
- switch($type)
- {
- case 'before':
+ $zone_object =& $event->getObject();
+ /* @var $zone_object kDBItem */
- break;
- case 'after':
- $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- $dst_object =& $this->Application->RecallObject('taxdst');
- if ($event->Name == 'OnUpdate')
- {
- $sql = 'DELETE FROM '.$dst_object->TableName.' WHERE TaxZoneId='.$zone_object->GetID();
- $this->Conn->Query($sql);
+ if ( $type == 'after' ) {
+ $dst_object =& $this->Application->recallObject('taxdst');
+ /* @var $dst_object kDBItem */
+
+ if ( $event->Name == 'OnUpdate' ) {
+ $sql = 'DELETE FROM ' . $dst_object->TableName . '
+ WHERE TaxZoneId = ' . $zone_object->GetID();
+ $this->Conn->Query($sql);
+ }
+ else {
+ $temp = $this->Application->GetVar('taxdst', Array ());
+
+ foreach ($temp as $key => $value) {
+ $temp[$key]['TaxZoneId'] = $zone_object->GetID();
}
- else
- {
- $temp = $this->Application->GetVar('taxdst');
- foreach ($temp as $key => $value)
- {
- $temp[$key]['TaxZoneId'] = $zone_object->GetID();
- }
- $this->Application->SetVar('taxdst', $temp);
- }
- $dst_event = new kEvent();
- $dst_event->Init('taxdst');
- $dst_event->Name = 'OnCreate';
- $this->Application->HandleEvent($dst_event);
- break;
+ $this->Application->SetVar('taxdst', $temp);
+ }
- default:
+ $dst_event = new kEvent('taxdst:OnCreate');
+ $this->Application->HandleEvent($dst_event);
}
}
@@ -222,22 +223,6 @@
$event->CallSubEvent("OnPreSave");
}
- function OnMassDelete(&$event)
- {
- $this->StoreSelectedIDs($event);
-
- $event->setEventParam('ids', $this->getSelectedIDs($event) );
- $this->customProcessing($event, 'before');
- $ids = $event->getEventParam('ids');
- $ids = implode(',', $ids);
-
- $dst =& $this->Application->recallObject('taxdst');
- $sql = 'DELETE FROM '.$dst->TableName.' WHERE TaxZoneId IN ('.$ids.')';
- $this->Conn->Query($sql);
-
- parent::OnMassDelete($event);
- }
-
function OnCountryChange(&$event)
{
$destinations = &$this->Application->recallObject('taxdst');
Index: in-commerce/units/taxesdestinations/taxes_dst_event_handler.php
===================================================================
--- in-commerce/units/taxesdestinations/taxes_dst_event_handler.php (revision 14590)
+++ in-commerce/units/taxesdestinations/taxes_dst_event_handler.php (working copy)
@@ -95,7 +95,15 @@
}
}
- function customProcessing(&$event, $type)
+ /**
+ * Apply custom processing to item
+ *
+ * @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
+ */
+ protected function customProcessing(&$event, $type)
{
switch($type)
{
Index: in-commerce/units/zones/zones_event_handler.php
===================================================================
--- in-commerce/units/zones/zones_event_handler.php (revision 14590)
+++ in-commerce/units/zones/zones_event_handler.php (working copy)
@@ -41,42 +41,46 @@
$this->eventMethods = array_merge($this->eventMethods, $zones_events);
}
- function customProcessing(&$event, $type)
+ /**
+ * Apply custom processing to item
+ *
+ * @param kEvent $event
+ * @param string $type
+ * @return void
+ * @access protected
+ */
+ protected function customProcessing(&$event, $type)
{
- $zone_object =& $event->GetObject();
- switch($type)
- {
+ $zone_object =& $event->getObject();
+ /* @var $zone_object kDBItem */
+
+ switch ( $type ) {
case 'before':
- if ($event->Name == 'OnCreate')
- {
+ if ( $event->Name == 'OnCreate' ) {
$zone_object->SetDBField('ShippingTypeID', $this->Application->GetVar('s_id'));
}
break;
+
case 'after':
- $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- $dst_object =& $this->Application->RecallObject('dst');
- if ($event->Name == 'OnUpdate')
- {
- $sql = 'DELETE FROM '.$dst_object->TableName.' WHERE ShippingZoneId='.$zone_object->GetID();
+ $dst_object =& $this->Application->recallObject('dst');
+ /* @var $dst_object kDBItem */
+
+ if ( $event->Name == 'OnUpdate' ) {
+ $sql = 'DELETE FROM ' . $dst_object->TableName . '
+ WHERE ShippingZoneId = ' . $zone_object->GetID();
$this->Conn->Query($sql);
}
- else
- {
- $temp = $this->Application->GetVar('dst');
- foreach ($temp as $key => $value)
- {
+ else {
+ $temp = $this->Application->GetVar('dst', Array ());
+ foreach ($temp as $key => $value) {
$temp[$key]['ShippingZoneId'] = $zone_object->GetID();
}
$this->Application->SetVar('dst', $temp);
}
- $dst_event = new kEvent();
- $dst_event->Init('dst');
- $dst_event->Name = 'OnCreate';
+ $dst_event = new kEvent('dst:OnCreate');
$this->Application->HandleEvent($dst_event);
break;
-
- default:
}
}
@@ -200,22 +204,6 @@
}
}
- function OnMassDelete(&$event)
- {
- $ids = $this->StoreSelectedIDs($event);
-
- $event->setEventParam('ids', $ids);
- $this->customProcessing($event, 'before');
- $ids = $event->getEventParam('ids');
- $ids = implode(',', $ids);
-
- $dst =& $this->Application->recallObject('dst');
- $sql = 'DELETE FROM '.$dst->TableName.' WHERE ShippingZoneId IN ('.$ids.')';
- $this->Conn->Query($sql);
-
- parent::OnMassDelete($event);
- }
-
function OnCountryChange(&$event)
{
$destinations = &$this->Application->recallObject('dst');
@@ -229,16 +217,29 @@
$event->redirect = false;
}
- function OnCancel(&$event){
+ /**
+ * Cancels kDBItem Editing/Creation
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ function OnCancel(&$event)
+ {
+ parent::OnCancel($event);
- parent::OnCancel($event);
$dst_object = &$this->Application->recallObject('dst');
- $delete_zones_sql = 'DELETE FROM '.$dst_object->TableName.' WHERE ShippingZoneId = 0';
+ /* @var $dst_object kDBItem */
+
+ $delete_zones_sql = ' DELETE FROM ' . $dst_object->TableName . '
+ WHERE ShippingZoneId = 0';
$this->Conn->Query($delete_zones_sql);
// if cancelling after create
- if ($this->Application->RecallVar('zone_mode'.$this->Application->GetVar('m_wid')) == 'create') {
+ if ( $this->Application->RecallVar('zone_mode' . $this->Application->GetVar('m_wid')) == 'create' ) {
$zone =& $event->getObject();
+ /* @var $zone kDBItem */
+
$zone->Delete();
}
}
Index: in-link/units/link_validation/link_validation_eh.php
===================================================================
--- in-link/units/link_validation/link_validation_eh.php (revision 14590)
+++ in-link/units/link_validation/link_validation_eh.php (working copy)
@@ -50,11 +50,13 @@
}
/**
- * Checks permissions of user
+ * Checks user permission to execute given $event
*
* @param kEvent $event
+ * @return bool
+ * @access public
*/
- function CheckPermission(&$event)
+ public function CheckPermission(&$event)
{
$check_events = Array ('OnApproveLinks', 'OnDeclineLinks', 'OnDeleteLinks');
if (in_array($event->Name, $check_events)) {
@@ -89,10 +91,12 @@
/**
* Adds calculates fields for category name
*
- * @param kDBItem $object
+ * @param kDBItem|kDBList $object
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function prepareObject(&$object, &$event)
+ protected function prepareObject(&$object, &$event)
{
parent::prepareObject($object, $event);
@@ -103,8 +107,11 @@
* Allows to show only invalid links
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
$object =& $event->getObject();
/* @var $object kDBList */
@@ -400,26 +407,29 @@
* Approves/declines selected links
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function iterateItems(&$event)
+ protected function iterateItems(&$event)
{
- if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+ if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return;
}
$ids = $this->_getSelectedIds($event);
- if (!$ids) {
- return ;
+ if ( !$ids ) {
+ return;
}
$object =& $this->Application->recallObject('l.-item', null, Array ('skip_autoload' => true));
/* @var $object kCatDBItem */
foreach ($ids as $id) {
+ $ret = true;
$object->Load($id);
- switch ($event->Name) {
+ switch ( $event->Name ) {
case 'OnApproveLinks':
$ret = $object->ApproveChanges();
break;
@@ -429,7 +439,7 @@
break;
}
- if (!$ret) {
+ if ( !$ret ) {
$event->status = kEvent::erFAIL;
$event->redirect = false;
break;
Index: in-link/units/links/links_event_handler.php
===================================================================
--- in-link/units/links/links_event_handler.php (revision 14590)
+++ in-link/units/links/links_event_handler.php (working copy)
@@ -34,11 +34,14 @@
}
/**
- * Enter description here...
+ * Apply any custom changes to list's sql query
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
@@ -331,8 +334,10 @@
* Makes reciprocal check on link, when it is created
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
@@ -343,8 +348,10 @@
* Makes reciprocal check on link, when it is updated
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
Index: in-link/units/listings/listings_event_handler.php
===================================================================
--- in-link/units/listings/listings_event_handler.php (revision 14590)
+++ in-link/units/listings/listings_event_handler.php (working copy)
@@ -69,45 +69,76 @@
return;
}
- function OnBeforeItemUpdate(&$event)
+ /**
+ * Occurs before updating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemUpdate(&$event)
{
$object =& $event->getObject();
- if ($object->IgnoreValidation) {
+ /* @var $object kDBItem */
+
+ if ( $object->IgnoreValidation ) {
$object->UpdateFormattersMasterFields();
}
}
- function OnBeforeItemCreate(&$event)
+ /**
+ * Occurs before creating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemCreate(&$event)
{
+ parent::OnBeforeItemCreate($event);
+
$object =& $event->getObject();
- if ($object->IgnoreValidation) {
+ /* @var $object kDBItem */
+
+ if ( $object->IgnoreValidation ) {
$object->UpdateFormattersMasterFields();
}
}
/**
- * Enter description here...
+ * Occurs before an item is deleted from live table when copying from temp
+ * (temp handler deleted all items from live and then copy over all items from temp)
+ * Id of item being deleted is passed as event' 'id' param
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeDeleteFromLive(&$event)
+ protected function OnBeforeDeleteFromLive(&$event)
{
+ parent::OnBeforeDeleteFromLive($event);
+
$object =& $event->getObject();
- $sql = 'SELECT * FROM '.$this->Application->getUnitOption($event->Prefix, 'TableName').'
- WHERE ListingId = '.$object->GetId();
+ /* @var $object kDBItem */
+
+ $sql = 'SELECT *
+ FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
+ WHERE ListingId = ' . $object->GetId();
$original_values = $this->Conn->GetRow($sql);
$type_modified = ($object->GetDBField('ListingTypeId') != $original_values['ListingTypeId']);
$link_modified = ($object->GetDBField('ItemResourceId') != $original_values['ItemResourceId']);
$status_modified = ($object->GetDBField('Status') != $original_values['Status']);
- if ($status_modified) {
+ if ( $status_modified ) {
$email_event = $object->GetDBField('Status') ? 'LINK.ENHANCE.APPROVE' : 'LINK.ENHANCE.DENY';
- $sql = 'SELECT CreatedById FROM '.$this->Application->getUnitOption('l', 'TableName').'
- WHERE ResourceId = '.$object->GetDBField('ItemResourceId');
+ $sql = 'SELECT CreatedById
+ FROM ' . $this->Application->getUnitOption('l', 'TableName') . '
+ WHERE ResourceId = ' . $object->GetDBField('ItemResourceId');
+ $user_id = $this->Conn->GetOne($sql);
- $email_event_user =& $this->Application->EmailEventUser($email_event, $this->Conn->GetOne($sql));
- $email_event_admin =& $this->Application->EmailEventAdmin($email_event);
+ $this->Application->EmailEventUser($email_event, $user_id);
+ $this->Application->EmailEventAdmin($email_event);
}
if ( $type_modified || $link_modified ) {
@@ -492,19 +523,23 @@
}
/**
- * Enter description here...
+ * Apply same processing to each item being selected in grid
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function iterateItems(&$event)
+ protected function iterateItems(&$event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object =& $event->getObject(Array ('skip_autoload' => true));
+ /* @var $object kDBItem */
+
$ids = $this->StoreSelectedIDs($event);
- if ($event->Name == 'OnMassApprove') {
+ if ( $event->Name == 'OnMassApprove' ) {
foreach ($ids as $id) {
$object->Load($id);
- if ($object->GetDBField('Status') != STATUS_ACTIVE) {
+ if ( $object->GetDBField('Status') != STATUS_ACTIVE ) {
$original_values = $object->GetFieldValues();
$object->SetDBField('Status', STATUS_ACTIVE);
$this->EnhanceLink($object, $original_values);
@@ -512,16 +547,16 @@
}
}
- if ($event->Name == 'OnMassDecline') {
+ if ( $event->Name == 'OnMassDecline' ) {
foreach ($ids as $id) {
$object->Load($id);
- if ($object->GetDBField('Status') == STATUS_ACTIVE) {
+ if ( $object->GetDBField('Status') == STATUS_ACTIVE ) {
$original_values = $object->GetFieldValues();
$this->ResetLink($original_values);
$sql = 'SELECT CreatedById
- FROM '.$this->Application->getUnitOption('l', 'TableName').'
- WHERE ResourceId = '.$object->GetDBField('ItemResourceId');
+ FROM ' . $this->Application->getUnitOption('l', 'TableName') . '
+ WHERE ResourceId = ' . $object->GetDBField('ItemResourceId');
$email_event_user =& $this->Application->EmailEventUser('LINK.ENHANCE.DENY', $this->Conn->GetOne($sql));
$email_event_admin =& $this->Application->EmailEventAdmin('LINK.ENHANCE.DENY');
}
@@ -531,30 +566,28 @@
parent::iterateItems($event);
// extend period for pending/renewal links (if owner has agreed)
- if ($event->Name == 'OnMassApprove') {
- $lst_object =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
+ if ( $event->Name == 'OnMassApprove' ) {
+ $lst_object =& $this->Application->recallObject('lst', null, Array ('skip_autoload' => true));
+ /* @var $lst_object kDBItem */
foreach ($ids as $id) {
$object->Load($id);
+
$sql = 'SELECT CreatedById
- FROM '.$this->Application->getUnitOption('l', 'TableName').'
- WHERE ResourceId = '.$object->GetDBField('ItemResourceId');
+ FROM ' . $this->Application->getUnitOption('l', 'TableName') . '
+ WHERE ResourceId = ' . $object->GetDBField('ItemResourceId');
$owner_id = $this->Conn->GetOne($sql);
- if ($object->GetDBField('PendingRenewal') == 1) {
+ if ( $object->GetDBField('PendingRenewal') == 1 ) {
$lst_object->Load( $object->GetDBField('ListingTypeId') );
- $dur_type_mapping = Array( 1 => 1,
- 2 => 60,
- 3 => 3600,
- 4 => 3600*24,
- 5 => 3600*24*7,
- 6 => 3600*24*365/12,
- 7 => 3600*24*365
- );
+ $dur_type_mapping = Array (
+ 1 => 1, 2 => 60, 3 => 3600, 4 => 3600 * 24, 5 => 3600 * 24 * 7,
+ 6 => 3600 * 24 * 365 / 12, 7 => 3600 * 24 * 365
+ );
$duration = $lst_object->GetDBField('Duration');
$duration_type = $lst_object->GetDBField('DurationType');
$expiration_interval = $duration * $dur_type_mapping[$duration_type];
- $renewal_begins = max( adodb_mktime(), $object->GetDBField('ExpiresOn') );
+ $renewal_begins = max(adodb_mktime(), $object->GetDBField('ExpiresOn'));
$expiration_date = $renewal_begins + $expiration_interval;
$object->SetDBField('ExpiresOn_date', $expiration_date);
@@ -563,21 +596,21 @@
$object->SetDBField('RenewalReminderSent', 0);
$object->SetDBField('PendingRenewal', 0);
- if ($object->Update()) {
+ if ( $object->Update() ) {
$event->status = kEvent::erSUCCESS;
- $event->setRedirectParams(Array('opener' => 's'), true);
- $email_event_user =& $this->Application->EmailEventUser('LINK.ENHANCE.RENEW', $owner_id);
- $email_event_admin =& $this->Application->EmailEventAdmin('LINK.ENHANCE.RENEW');
+ $event->setRedirectParams(Array ('opener' => 's'), true);
+ $this->Application->EmailEventUser('LINK.ENHANCE.RENEW', $owner_id);
+ $this->Application->EmailEventAdmin('LINK.ENHANCE.RENEW');
}
else {
- $event->status=kEvent::erFAIL;
- $event->redirect=false;
+ $event->status = kEvent::erFAIL;
+ $event->redirect = false;
break;
}
}
else {
- $email_event_user =& $this->Application->EmailEventUser('LINK.ENHANCE.APPROVE', $owner_id);
- $email_event_admin =& $this->Application->EmailEventAdmin('LINK.ENHANCE.APPROVE');
+ $this->Application->EmailEventUser('LINK.ENHANCE.APPROVE', $owner_id);
+ $this->Application->EmailEventAdmin('LINK.ENHANCE.APPROVE');
}
}
}
@@ -587,12 +620,14 @@
* Redirects to cancel template on front-end
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnCancel(&$event)
+ protected function OnCancel(&$event)
{
parent::OnCancel($event);
- if (!$this->Application->isAdmin) {
+ if ( !$this->Application->isAdmin ) {
$event->SetRedirectParam('opener', 's');
$event->redirect = $this->Application->GetVar('cancel_template');
}
@@ -732,21 +767,24 @@
* Removes enhancements on listing delete
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnMassDelete(&$event)
+ protected function OnMassDelete(&$event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object =& $event->getObject( Array ('skip_autoload' => true) );
+ /*@var $object kDBItem */
+
$ids = $this->StoreSelectedIDs($event);
- foreach($ids as $id)
- {
+ foreach ($ids as $id) {
$object->Load($id);
- if($object->GetDBField('Status') == 1)
- {
- $original_values = $object->GetFieldValues();
- $this->ResetLink($original_values);
+
+ if ( $object->GetDBField('Status') == STATUS_ACTIVE ) {
+ $this->ResetLink( $object->GetFieldValues() );
}
}
+
parent::OnMassDelete($event);
}
Index: in-news/units/articles/articles_event_handler.php
===================================================================
--- in-news/units/articles/articles_event_handler.php (revision 14590)
+++ in-news/units/articles/articles_event_handler.php (working copy)
@@ -20,8 +20,11 @@
* Filters out archived articles
*
* @param kEvent $event
+ * @return void
+ * @access protected
+ * @see kDBEventHandler::OnListBuild()
*/
- function SetCustomQuery(&$event)
+ protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
@@ -414,8 +417,10 @@
* Create missing excerpt
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemUpdate(&$event)
+ protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
@@ -427,8 +432,10 @@
* Create missing excerpt
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnBeforeItemCreate(&$event)
+ protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
@@ -496,20 +503,25 @@
* Sets default expiration based on module setting
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnPreCreate(&$event)
+ protected function OnPreCreate(&$event)
{
parent::OnPreCreate($event);
- if ($event->status == kEvent::erSUCCESS) {
- $object =& $event->getObject();
+ if ( $event->status != kEvent::erSUCCESS ) {
+ return ;
+ }
- $archive_days = $this->Application->ConfigValue('News_Archive');
- if ($archive_days) {
- $expire_date = adodb_mktime() + $archive_days * 3600 * 24;
- $object->SetDBField('EndOn_date', $expire_date);
- $object->SetDBField('EndOn_time', $expire_date);
- }
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $archive_days = $this->Application->ConfigValue('News_Archive');
+ if ( $archive_days ) {
+ $expire_date = adodb_mktime() + $archive_days * 3600 * 24;
+ $object->SetDBField('EndOn_date', $expire_date);
+ $object->SetDBField('EndOn_time', $expire_date);
}
}
removing_references_in_events_core.patch [^] (267,180 bytes) 2012-03-03 12:37
removing_references_in_events_modules.patch [^] (182,174 bytes) 2012-03-03 13:01
[Show Content]
Index: custom/units/helpers/helpers_config.php
===================================================================
--- custom/units/helpers/helpers_config.php (revision 15111)
+++ custom/units/helpers/helpers_config.php (working copy)
@@ -9,6 +9,6 @@
'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
- Array ('pseudo' => 'SampleHelper', 'class' => 'SampleHelper', 'file' => 'sample_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
+ Array ('pseudo' => 'SampleHelper', 'class' => 'SampleHelper', 'file' => 'sample_helper.php', 'build_event' => ''),
),
);
\ No newline at end of file
Index: custom/units/sections/articles/e_article_eh.php
===================================================================
--- custom/units/sections/articles/e_article_eh.php (revision 15111)
+++ custom/units/sections/articles/e_article_eh.php (working copy)
@@ -34,7 +34,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -54,7 +54,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -77,7 +77,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -102,7 +102,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -116,7 +116,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -131,7 +131,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -146,7 +146,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemLoad(kEvent &$event)
+ protected function OnBeforeItemLoad(kEvent $event)
{
parent::OnBeforeItemLoad($event);
@@ -160,7 +160,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -174,7 +174,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -189,7 +189,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -204,7 +204,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/sections/categories/e_category_eh.php
===================================================================
--- custom/units/sections/categories/e_category_eh.php (revision 15111)
+++ custom/units/sections/categories/e_category_eh.php (working copy)
@@ -34,7 +34,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -54,7 +54,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -77,7 +77,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -102,7 +102,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -116,7 +116,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -131,7 +131,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -146,7 +146,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemLoad(kEvent &$event)
+ protected function OnBeforeItemLoad(kEvent $event)
{
parent::OnBeforeItemLoad($event);
@@ -160,7 +160,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -174,7 +174,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -189,7 +189,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -203,7 +203,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/sections/custom_eh.php
===================================================================
--- custom/units/sections/custom_eh.php (revision 15111)
+++ custom/units/sections/custom_eh.php (working copy)
@@ -13,7 +13,7 @@
*
* @param kEvent $event
*/
- function OnOverrideClonedSubItems(&$event)
+ function OnOverrideClonedSubItems($event)
{
# register EReviewEventHandler class as extented from cloned ReviewEventHandler for article reviews ("n" prefix)
// $this->Application->registerClass('EReviewEventHandler', dirname(__FILE__) . '/reviews/e_review_eh.php', 'n-rev_EventHandler');
@@ -24,7 +24,7 @@
*
* @param kEvent $event
*/
- function OnModifyCategoriesConfig(&$event)
+ function OnModifyCategoriesConfig($event)
{
# get Fields configuration from /core/units/categories/categories_config.php
$fields = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Fields');
Index: custom/units/sections/links/e_link_eh.php
===================================================================
--- custom/units/sections/links/e_link_eh.php (revision 15111)
+++ custom/units/sections/links/e_link_eh.php (working copy)
@@ -34,7 +34,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -54,7 +54,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -77,7 +77,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -102,7 +102,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -116,7 +116,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -131,7 +131,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -146,7 +146,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemLoad(kEvent &$event)
+ protected function OnBeforeItemLoad(kEvent $event)
{
parent::OnBeforeItemLoad($event);
@@ -161,7 +161,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -175,7 +175,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -190,7 +190,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -205,7 +205,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/sections/products/e_product_eh.php
===================================================================
--- custom/units/sections/products/e_product_eh.php (revision 15111)
+++ custom/units/sections/products/e_product_eh.php (working copy)
@@ -34,7 +34,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -54,7 +54,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -78,7 +78,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -103,7 +103,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -117,7 +117,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -132,7 +132,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -147,7 +147,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemLoad(kEvent &$event)
+ protected function OnBeforeItemLoad(kEvent $event)
{
parent::OnBeforeItemLoad($event);
@@ -161,7 +161,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -175,7 +175,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -190,7 +190,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -205,7 +205,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/sections/reviews/e_review_eh.php
===================================================================
--- custom/units/sections/reviews/e_review_eh.php (revision 15111)
+++ custom/units/sections/reviews/e_review_eh.php (working copy)
@@ -15,7 +15,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -35,7 +35,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -49,7 +49,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -64,7 +64,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -79,7 +79,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemLoad(kEvent &$event)
+ protected function OnBeforeItemLoad(kEvent $event)
{
parent::OnBeforeItemLoad($event);
@@ -94,7 +94,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -108,7 +108,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -123,7 +123,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -138,7 +138,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/sections/users/e_user_eh.php
===================================================================
--- custom/units/sections/users/e_user_eh.php (revision 15111)
+++ custom/units/sections/users/e_user_eh.php (working copy)
@@ -34,7 +34,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -54,7 +54,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -77,7 +77,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -102,7 +102,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -116,7 +116,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -131,7 +131,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -146,7 +146,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemLoad(kEvent &$event)
+ protected function OnBeforeItemLoad(kEvent $event)
{
parent::OnBeforeItemLoad($event);
@@ -161,7 +161,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -175,7 +175,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -190,7 +190,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -204,7 +204,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
Index: custom/units/widgets/widget_eh.php
===================================================================
--- custom/units/widgets/widget_eh.php (revision 15111)
+++ custom/units/widgets/widget_eh.php (working copy)
@@ -34,7 +34,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
$skip_permissions_check_events = Array (
'OnAnotherCustomEvent',
@@ -52,7 +52,7 @@
*
* @param kEvent $event
*/
- function OnCustomEvent(&$event)
+ function OnCustomEvent($event)
{
$object =& $event->getObject();
/* @var $object kDBList */
@@ -67,7 +67,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -87,7 +87,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -100,7 +100,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -114,7 +114,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -129,7 +129,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemLoad(kEvent &$event)
+ protected function OnBeforeItemLoad(kEvent $event)
{
parent::OnBeforeItemLoad($event);
@@ -144,7 +144,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -158,7 +158,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -173,7 +173,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -187,7 +187,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
Index: in-auction/cron.php
===================================================================
--- in-auction/cron.php (revision 15111)
+++ in-auction/cron.php (working copy)
@@ -26,7 +26,7 @@
$application->StoreVar('user_id', USER_ROOT);
- $application->HandleEvent($event, 'l-ebay:OnListItems');
+ $application->HandleEvent(new kEvent('l-ebay:OnListItems'));
$application->Done();
Index: in-auction/hitcounter.php
===================================================================
--- in-auction/hitcounter.php (revision 15111)
+++ in-auction/hitcounter.php (working copy)
@@ -26,7 +26,7 @@
$application->StoreVar('user_id', USER_ROOT);
- $application->HandleEvent($event, 'l-ebay:OnHitAuction');
+ $application->HandleEvent(new kEvent('l-ebay:OnHitAuction'));
$filename = MODULES_PATH . '/in-auction/admin_templates/img/s.gif';
header('Content-type: image/gif');
header('Content-length: '.filesize($filename));
Index: in-auction/new_token_accept.php
===================================================================
--- in-auction/new_token_accept.php (revision 15111)
+++ in-auction/new_token_accept.php (working copy)
@@ -31,7 +31,7 @@
$process_event = $application->GetVar('process_event');
if ($process_event)
{
- $application->HandleEvent($event, 'ebay-sections:OnNewTokenAccept');
+ $application->HandleEvent(new kEvent('ebay-sections:OnNewTokenAccept'));
echo 'Success! New Token is Got!';
} else {
echo '<HTML>
@@ -45,7 +45,7 @@
';
}
} else {
- $application->HandleEvent($event, 'ebay-sections:OnNewTokenAccept');
+ $application->HandleEvent(new kEvent('ebay-sections:OnNewTokenAccept'));
}
$application->Done();
Index: in-auction/new_token_reject.php
===================================================================
--- in-auction/new_token_reject.php (revision 15111)
+++ in-auction/new_token_reject.php (working copy)
@@ -26,7 +26,7 @@
$application->StoreVar('user_id', USER_ROOT);
- $application->HandleEvent($event, 'ebay-sections:OnNewTokenReject');
+ $application->HandleEvent(new kEvent('ebay-sections:OnNewTokenReject'));
echo 'Failure! New Token is not Generated!';
Index: in-auction/notify.php
===================================================================
--- in-auction/notify.php (revision 15111)
+++ in-auction/notify.php (working copy)
@@ -26,7 +26,7 @@
$application->StoreVar('user_id', USER_ROOT);
- $application->HandleEvent($event, 'l-ebay:OnStoreToLog');
+ $application->HandleEvent(new kEvent('l-ebay:OnStoreToLog'));
$application->Done();
Index: in-auction/units/category_listing/category_listing_eh.php
===================================================================
--- in-auction/units/category_listing/category_listing_eh.php (revision 15111)
+++ in-auction/units/category_listing/category_listing_eh.php (working copy)
@@ -41,7 +41,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
// $sql = 'SELECT Prefix
// FROM '.TABLE_PREFIX.'ItemTypes
@@ -60,7 +60,7 @@
*
* @param kEvent $event
*/
- function OnModifyCategoriesConfig(&$event)
+ function OnModifyCategoriesConfig($event)
{
$title_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TitlePresets');
@@ -84,7 +84,7 @@
// *
// * @param kEvent $event
// */
-// function OnAfterConfigRead(&$event)
+// function OnAfterConfigRead($event)
// {
//
// parent::OnAfterConfigRead($event);
@@ -93,7 +93,7 @@
// }
- function OnCategoriesPreSave(&$event)
+ function OnCategoriesPreSave($event)
{
$object =& $event->getObject();
@@ -142,7 +142,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -156,14 +156,14 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$this->ValidateCategories($event);
}
- function ValidateCategories(&$event)
+ function ValidateCategories($event)
{
$this->ValidateCategoryField($event, 'AuctionPrimaryCategoryId');
$this->ValidateCategoryField($event, 'AuctionSecondaryCategoryId');
@@ -171,7 +171,7 @@
$this->ValidateCategoryField($event, 'StoreSecondaryCategoryId', 1);
}
- function ValidateCategoryField(&$event, $field, $is_store = 0)
+ function ValidateCategoryField($event, $field, $is_store = 0)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -212,7 +212,7 @@
* @return int
* @access public
*/
- public function getPassedID(kEvent &$event)
+ public function getPassedID(kEvent $event)
{
$category_id = $this->Application->GetVar('c_id');
@@ -232,7 +232,7 @@
*
* @param kEvent $event
*/
- function OnAfterCategorySave(&$event)
+ function OnAfterCategorySave($event)
{
if ($event->MasterEvent->status != kEvent::erSUCCESS)
@@ -341,7 +341,7 @@
*
* @param kEvent $event
*/
- function OnAfterProductValidate(&$event)
+ function OnAfterProductValidate($event)
{
$Product =& $event->MasterEvent->getObject();
Index: in-auction/units/error_log/error_log_eh.php
===================================================================
--- in-auction/units/error_log/error_log_eh.php (revision 15111)
+++ in-auction/units/error_log/error_log_eh.php (working copy)
@@ -42,7 +42,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -65,7 +65,7 @@
* @return void
* @access protected
*/
- protected function OnDeleteAll(kEvent &$event)
+ protected function OnDeleteAll(kEvent $event)
{
if ( !$this->Application->isAdminUser || $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
@@ -100,7 +100,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
Index: in-auction/units/helpers/helpers_config.php
===================================================================
--- in-auction/units/helpers/helpers_config.php (revision 15111)
+++ in-auction/units/helpers/helpers_config.php (working copy)
@@ -18,8 +18,8 @@
'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
- Array('pseudo' => 'eBayHelper', 'class' => 'eBayHelper', 'file' => 'ebay_helper.php', 'build_event' => '', 'require_classes' => Array('kHelper')),
- Array('pseudo' => 'CatSelectHelper', 'class' => 'CatSelectHelper', 'file' => 'catselect_helper.php', 'build_event' => '', 'require_classes' => Array('kHelper')),
- Array('pseudo' => 'XMLHelper', 'class' => 'XMLHelper', 'file' => 'xml_helper.php', 'build_event' => '', 'require_classes' => Array('kHelper')),
+ Array('pseudo' => 'eBayHelper', 'class' => 'eBayHelper', 'file' => 'ebay_helper.php', 'build_event' => ''),
+ Array('pseudo' => 'CatSelectHelper', 'class' => 'CatSelectHelper', 'file' => 'catselect_helper.php', 'build_event' => ''),
+ Array('pseudo' => 'XMLHelper', 'class' => 'XMLHelper', 'file' => 'xml_helper.php', 'build_event' => ''),
),
);
\ No newline at end of file
Index: in-auction/units/listing/listing_eh.php
===================================================================
--- in-auction/units/listing/listing_eh.php (revision 15111)
+++ in-auction/units/listing/listing_eh.php (working copy)
@@ -50,7 +50,7 @@
*
* @param kEvent $event
*/
- function OnNewListingWindow(&$event)
+ function OnNewListingWindow($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -100,7 +100,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -164,7 +164,7 @@
* @return void
* @access protected
*/
- protected function OnDeleteAll(kEvent &$event)
+ protected function OnDeleteAll(kEvent $event)
{
if ( !$this->Application->isAdminUser || $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
@@ -201,7 +201,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -225,7 +225,7 @@
*
* @param kEvent $event
*/
- function OnProcessAddListing(&$event)
+ function OnProcessAddListing($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -293,7 +293,7 @@
* @param int $product_id
* @return Array
*/
- function getProductFields(&$event, $product_id)
+ function getProductFields($event, $product_id)
{
static $items_info = null;
@@ -318,7 +318,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
$a_ids = $event->getEventParam('ids');
@@ -410,7 +410,7 @@
* @param kEvent $event
*/
- function OnListItems(&$event)
+ function OnListItems($event)
{
// get queued items data
if (!$this->Application->isAdmin) {
@@ -1065,7 +1065,7 @@
* @param kEvent $event
*/
- function OnStoreToLog(&$event)
+ function OnStoreToLog($event)
{
$eBayHelper =& $this->Application->recallObject('eBayHelper');
@@ -1082,7 +1082,7 @@
* @param kEvent $event
*/
- function OnArchive(&$event)
+ function OnArchive($event)
{
if (!$this->Application->isAdminUser || $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
@@ -1110,7 +1110,7 @@
* @param kEvent $event
*/
- function OnEndItem(&$event)
+ function OnEndItem($event)
{
if (!$this->Application->isAdminUser || $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
@@ -1148,7 +1148,7 @@
* @param kEvent $event
*/
- function OnArchiveAll(&$event)
+ function OnArchiveAll($event)
{
if (!$this->Application->isAdminUser || $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
@@ -1183,7 +1183,7 @@
*
* @param kEvent $event
*/
- function OnHitAuction(&$event)
+ function OnHitAuction($event)
{
if ($this->Application->ConfigValue('eBay_UseEbayCounters') == 1)
@@ -1210,7 +1210,7 @@
*
* @param kEvent $event
*/
- function OnChangeStatistics(&$event)
+ function OnChangeStatistics($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -1297,7 +1297,7 @@
* @param kEvent $event
*/
- function OnPrintChart(&$event)
+ function OnPrintChart($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -1350,7 +1350,7 @@
}
- function OnExportReport(&$event)
+ function OnExportReport($event)
{
$a_report = unserialize($this->Application->RecallVar('report_data'));
Index: in-auction/units/product_listing/product_listing_eh.php
===================================================================
--- in-auction/units/product_listing/product_listing_eh.php (revision 15111)
+++ in-auction/units/product_listing/product_listing_eh.php (working copy)
@@ -42,7 +42,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
/*$sql = 'SELECT Prefix
FROM ' . TABLE_PREFIX . 'ItemTypes
@@ -63,7 +63,7 @@
*
* @param kEvent $event
*/
- function OnModifyProductsConfig(&$event)
+ function OnModifyProductsConfig($event)
{
$title_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TitlePresets');
@@ -89,7 +89,7 @@
* @param kEvent $event
* @access protected
*/
- protected function OnItemBuild(kEvent &$event)
+ protected function OnItemBuild(kEvent $event)
{
parent::OnItemBuild($event);
@@ -108,7 +108,7 @@
}
}
- function OnProductsPreSave(&$event)
+ function OnProductsPreSave($event)
{
$object =& $event->getObject();
@@ -166,7 +166,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -180,14 +180,14 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$this->ValidateCategories($event);
}
- function ValidateCategories(&$event)
+ function ValidateCategories($event)
{
$this->ValidateCategoryField($event, 'AuctionPrimaryCategoryId');
$this->ValidateCategoryField($event, 'AuctionSecondaryCategoryId');
@@ -195,7 +195,7 @@
$this->ValidateCategoryField($event, 'StoreSecondaryCategoryId', 1);
}
- function ValidateCategoryField(&$event, $field, $is_store = 0)
+ function ValidateCategoryField($event, $field, $is_store = 0)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -236,7 +236,7 @@
* @return int
* @access public
*/
- public function getPassedID(kEvent &$event)
+ public function getPassedID(kEvent $event)
{
$product_id = $this->Application->GetVar('p_id');
@@ -258,7 +258,7 @@
*/
/*
- function OnAfterCopyImagesToLive(&$event)
+ function OnAfterCopyImagesToLive($event)
{
$id = $event->MasterEvent->getEventParam('id');
$temp_id = $event->MasterEvent->getEventParam('temp_id');
@@ -356,7 +356,7 @@
*
* @param kEvent $event
*/
- function OnGenerateTemplate(&$event)
+ function OnGenerateTemplate($event)
{
if (!$this->Application->isAdminUser) {
return;
Index: in-auction/units/schedule/schedule_eh.php
===================================================================
--- in-auction/units/schedule/schedule_eh.php (revision 15111)
+++ in-auction/units/schedule/schedule_eh.php (working copy)
@@ -40,7 +40,7 @@
*
* @param kEvent $event
*/
- function OnMassDisable(&$event)
+ function OnMassDisable($event)
{
$this->SetMassStatus($event, 0);
}
@@ -50,7 +50,7 @@
*
* @param kEvent $event
*/
- function OnMassEnable(&$event)
+ function OnMassEnable($event)
{
$this->SetMassStatus($event, 1);
}
@@ -61,7 +61,7 @@
* @param kEvent $event
* @param int $status
*/
- function SetMassStatus(&$event, $status)
+ function SetMassStatus($event, $status)
{
if (!$this->Application->isAdminUser) {
return;
Index: in-auction/units/sections/ebay_eh.php
===================================================================
--- in-auction/units/sections/ebay_eh.php (revision 15111)
+++ in-auction/units/sections/ebay_eh.php (working copy)
@@ -45,7 +45,7 @@
*
* @param kEvent $event
*/
- function OnAfterProductConfigRead(&$event)
+ function OnAfterProductConfigRead($event)
{
$a_fields = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Fields');
@@ -135,7 +135,7 @@
*
* @param kEvent $event
*/
- function OnAfterCategoryConfigRead(&$event)
+ function OnAfterCategoryConfigRead($event)
{
$edit_tab_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'EditTabPresets');
$edit_tab_presets['Default']['ebay'] = Array (
@@ -149,7 +149,7 @@
*
* @param kEvent $event
*/
- function OnAfterImageAdded(&$event)
+ function OnAfterImageAdded($event)
{
$image =& $event->MasterEvent->getObject();
@@ -219,7 +219,7 @@
*
* @param kEvent $event
*/
- function OnAfterSaveProduct(&$event)
+ function OnAfterSaveProduct($event)
{
$temp_handler =& $this->Application->recallObject($event->MasterEvent->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
@@ -258,7 +258,7 @@
*
* @param kEvent $event
*/
- function OnBeforeProductItemCreate(&$event)
+ function OnBeforeProductItemCreate($event)
{
$object =& $event->MasterEvent->getObject();
$product_type = $object->GetDBField('Type');
@@ -311,7 +311,7 @@
* @param kEvent $event
*/
- function OnApproveEbayProduct(&$event)
+ function OnApproveEbayProduct($event)
{
// the call of this event is based on Products->ProcessingData
// field value
@@ -442,7 +442,7 @@
*
* @param kEvent $event
*/
- function OnRefreshStore(&$event)
+ function OnRefreshStore($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -491,7 +491,7 @@
*
* @param kEvent $event
*/
- function OnTestAddUser(&$event)
+ function OnTestAddUser($event)
{
// $this->AddEbayUser('alex-intechnic','110024859878');
@@ -1016,7 +1016,7 @@
* @param kEvent $event
*/
- function OnRefreshCategories(&$event)
+ function OnRefreshCategories($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -1391,7 +1391,7 @@
* @param kEvent $event
*/
- function OnRefreshAttributes(&$event)
+ function OnRefreshAttributes($event)
{
ini_set('memory_limit', '200M');
@@ -1590,7 +1590,7 @@
* @param kEvent $event
*/
- function OnAddListingLog(&$event)
+ function OnAddListingLog($event)
{
// read new listing log
@@ -2154,7 +2154,7 @@
* and redirect to MyOrders section ?
* @param kEvent $event
*/
- function OnOrderLogin(&$event)
+ function OnOrderLogin($event)
{
$key = $this->Application->GetVar('key');
if ($key == '')
@@ -2209,7 +2209,7 @@
*
* @param kEvent $event
*/
- function OnBeforeRemoveFromCart(&$event)
+ function OnBeforeRemoveFromCart($event)
{
$ord_item_id = $this->Application->GetVar('orditems_id');
@@ -2229,7 +2229,7 @@
*
* @param kEvent $event
*/
- function OnBeforeRecalculateItems(&$event)
+ function OnBeforeRecalculateItems($event)
{
if ($this->Application->isAdminUser) {
return;
@@ -2418,7 +2418,7 @@
*
* @param kEvent $event
*/
- function OnBeforeCompleteOrder(&$event)
+ function OnBeforeCompleteOrder($event)
{
$order =& $event->MasterEvent->getObject();
/* @var $order OrdersItem */
@@ -2539,7 +2539,7 @@
}
- function OnModifyUsersConfig(&$event)
+ function OnModifyUsersConfig($event)
{
$fields = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Fields');
$fields['EbayLogin'] = Array ('type' => 'string', 'max_len' => 255, 'default' => NULL);
@@ -2595,7 +2595,7 @@
* @param kEvent $event
*/
- function OnGetSellerList(&$event)
+ function OnGetSellerList($event)
{
$a_times = $this->GetRequestInterval('get_list_time', 'eBay_GetSellerListIntervalHours');
if (!$a_times) {
@@ -2743,7 +2743,7 @@
* @param kEvent $event
*/
- function OnSubscribeListingNotifications(&$event)
+ function OnSubscribeListingNotifications($event)
{
if (!$this->IsNotifiableServer())
{
@@ -2812,7 +2812,7 @@
* @param kEvent $event
*/
- function OnGetSellerTransactions(&$event)
+ function OnGetSellerTransactions($event)
{
$a_times = $this->GetRequestInterval('get_transactions_time', 'eBay_GetSellerTransactionsIntervalHours');
if (!$a_times) {
@@ -2940,7 +2940,7 @@
* @param kEvent $event
*/
- function OnAutoDispute(&$event)
+ function OnAutoDispute($event)
{
$dispute_days = $this->Application->ConfigValue('eBay_AutoDisputeDays');
@@ -3091,7 +3091,7 @@
* @param kEvent $event
*/
- function OnProcessSchedule(&$event)
+ function OnProcessSchedule($event)
{
// Get Schedules to run
// return;
@@ -3267,7 +3267,7 @@
*
* @param kEvent $event
*/
- function OnConfigUpdate(&$event)
+ function OnConfigUpdate($event)
{
// save changes in ebay shipping options, made on config template
// $object =& $event->getObject();
@@ -3335,7 +3335,7 @@
*
* @param kEvent $event
*/
- function OnDeleteOldHits(&$event)
+ function OnDeleteOldHits($event)
{
return;
$delay = $this->Application->ConfigValue('eBay_ListingHitsDelayMinutes');
@@ -3354,7 +3354,7 @@
/**
* Redirect to error page
*/
- function OnNewTokenReject(&$event)
+ function OnNewTokenReject($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -3364,7 +3364,7 @@
/**
* Write new token to DB
*/
- function OnNewTokenAccept(&$event)
+ function OnNewTokenAccept($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -3409,7 +3409,7 @@
* @param kEvent $event
* @return void
*/
- function OnAuthorizeForToken(&$event)
+ function OnAuthorizeForToken($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -3472,7 +3472,7 @@
*
* @param kEvent $event
*/
- function OnReviseCheckoutStatuses(&$event)
+ function OnReviseCheckoutStatuses($event)
{
// Get all ebay items where order is approved, and CheckoutStatus is 0
@@ -3532,7 +3532,7 @@
*
* @param kEvent $event
*/
- function OnReceiveFeedbacks(&$event)
+ function OnReceiveFeedbacks($event)
{
$eBayHelper =& $this->Application->recallObject('eBayHelper');
@@ -3650,7 +3650,7 @@
*
* @param kEvent $event
*/
- function OnSendFeedbacks(&$event)
+ function OnSendFeedbacks($event)
{
if ($this->Application->ConfigValue('eBay_EnableFeedback') != 1)
@@ -3760,7 +3760,7 @@
*
* @param kEvent $event
*/
- function OnSendFeedbackNotifications(&$event)
+ function OnSendFeedbackNotifications($event)
{
if (!$this->Application->ConfigValue('eBay_SendFeedbackNotification'))
{
@@ -3850,7 +3850,7 @@
*
* @param kEvent $event
*/
- function OnDeleteToken(&$event)
+ function OnDeleteToken($event)
{
if (!DEBUG_MODE || !$this->Application->isAdminUser) {
return;
@@ -3866,7 +3866,7 @@
*
* @param kEvent $event
*/
- function OnSetAPIKeys(&$event)
+ function OnSetAPIKeys($event)
{
if (!DEBUG_MODE || !$this->Application->isAdminUser) {
return;
Index: in-auction/units/shipping/shipping_eh.php
===================================================================
--- in-auction/units/shipping/shipping_eh.php (revision 15111)
+++ in-auction/units/shipping/shipping_eh.php (working copy)
@@ -44,7 +44,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -67,7 +67,7 @@
*
* @param kEvent $event
*/
- function OnConfigUpdate(&$event)
+ function OnConfigUpdate($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -92,7 +92,7 @@
*
* @param kEvent $event
*/
- function OnAfterParentLoad(&$event)
+ function OnAfterParentLoad($event)
{
if (!$this->IsOnEbayTab())
{
@@ -154,7 +154,7 @@
*
* @param kEvent $event
*/
- function OnParentPreSave(&$event)
+ function OnParentPreSave($event)
{
if (!$this->Application->isAdminUser) {
return;
@@ -186,7 +186,7 @@
* @return bool
* @access protected
*/
- protected function UseTempTables(kEvent &$event)
+ protected function UseTempTables(kEvent $event)
{
if ( $this->IsOnEbayTab() ) {
return true;
Index: in-bulletin/units/emoticons/emoticon_eh.php
===================================================================
--- in-bulletin/units/emoticons/emoticon_eh.php (revision 15111)
+++ in-bulletin/units/emoticons/emoticon_eh.php (working copy)
@@ -23,7 +23,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
Index: in-bulletin/units/helpers/helpers_config.php
===================================================================
--- in-bulletin/units/helpers/helpers_config.php (revision 15111)
+++ in-bulletin/units/helpers/helpers_config.php (working copy)
@@ -19,6 +19,6 @@
'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
- Array('pseudo' => 'PostHelper', 'class' => 'PostHelper','file' => 'post_helper.php', 'build_event' => '', 'require_classes' => Array('kHelper')),
+ Array('pseudo' => 'PostHelper', 'class' => 'PostHelper','file' => 'post_helper.php', 'build_event' => ''),
),
);
\ No newline at end of file
Index: in-bulletin/units/poll_comments/poll_comment_eh.php
===================================================================
--- in-bulletin/units/poll_comments/poll_comment_eh.php (revision 15111)
+++ in-bulletin/units/poll_comments/poll_comment_eh.php (working copy)
@@ -42,7 +42,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -63,7 +63,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -84,7 +84,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
if ( !$this->Application->isAdmin ) {
$object =& $event->getObject();
@@ -123,7 +123,7 @@
* @return void
* @access protected
*/
- protected function OnCreate(kEvent &$event)
+ protected function OnCreate(kEvent $event)
{
parent::OnCreate($event);
@@ -141,7 +141,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
Index: in-bulletin/units/polls/poll_eh.php
===================================================================
--- in-bulletin/units/polls/poll_eh.php (revision 15111)
+++ in-bulletin/units/polls/poll_eh.php (working copy)
@@ -44,7 +44,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -64,7 +64,7 @@
*
* @param kEvent $event
*/
- function OnResetVotes(&$event)
+ function OnResetVotes($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -89,7 +89,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -104,7 +104,7 @@
*
* @param kEvent $event
*/
- function OnMakeVote(&$event)
+ function OnMakeVote($event)
{
$object =& $event->getObject($this->Application->GetVar('poll_id'));
/* @var $object kDBItem */
@@ -157,7 +157,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
Index: in-bulletin/units/posts/post_eh.php
===================================================================
--- in-bulletin/units/posts/post_eh.php (revision 15111)
+++ in-bulletin/units/posts/post_eh.php (working copy)
@@ -23,7 +23,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
$events = Array ('OnUpdate', 'OnDelete');
@@ -41,7 +41,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -89,7 +89,7 @@
* @param kEvent $event
* @param string $permissions
*/
- function checkPostPermission(&$event, $permissions)
+ function checkPostPermission($event, $permissions)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -118,7 +118,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -150,7 +150,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -164,7 +164,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -183,7 +183,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
@@ -209,7 +209,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -261,8 +261,7 @@
if ( (int)$auto_lock > 0 ) {
if ( $posts_count >= $auto_lock ) {
// user has unlocked topic after $auto_lock and posts again -> ensure that topic will be locked again
- $lock_event = new kEvent($parent_prefix . ':OnTopicLockToggle');
- $this->Application->HandleEvent($lock_event);
+ $this->Application->HandleEvent(new kEvent($parent_prefix . ':OnTopicLockToggle'));
}
}
}
@@ -273,7 +272,7 @@
* @param kEvent $event
* @param kCatDBItem $main_object
*/
- function updateTopicInfo(&$event, &$main_object)
+ function updateTopicInfo($event, &$main_object)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -296,7 +295,7 @@
* @return void
* @access protected
*/
- protected function OnCreate(kEvent &$event)
+ protected function OnCreate(kEvent $event)
{
parent::OnCreate($event);
@@ -313,7 +312,7 @@
* @return void
* @access protected
*/
- protected function OnUpdate(kEvent &$event)
+ protected function OnUpdate(kEvent $event)
{
parent::OnUpdate($event);
@@ -331,7 +330,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -386,7 +385,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -404,7 +403,7 @@
* @return void
* @access protected
*/
- protected function OnDelete(kEvent &$event)
+ protected function OnDelete(kEvent $event)
{
parent::OnDelete($event);
@@ -421,7 +420,7 @@
* @return void
* @access protected
*/
- protected function OnNew(kEvent &$event)
+ protected function OnNew(kEvent $event)
{
parent::OnNew($event);
Index: in-bulletin/units/private_message_body/private_message_body_eh.php
===================================================================
--- in-bulletin/units/private_message_body/private_message_body_eh.php (revision 15111)
+++ in-bulletin/units/private_message_body/private_message_body_eh.php (working copy)
@@ -23,7 +23,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -50,7 +50,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
Index: in-bulletin/units/private_messages/private_message_eh.php
===================================================================
--- in-bulletin/units/private_messages/private_message_eh.php (revision 15111)
+++ in-bulletin/units/private_messages/private_message_eh.php (working copy)
@@ -44,7 +44,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -77,7 +77,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -102,7 +102,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -145,7 +145,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
@@ -171,7 +171,7 @@
* @return void
* @access protected
*/
- protected function OnCreate(kEvent &$event)
+ protected function OnCreate(kEvent $event)
{
parent::OnCreate($event);
@@ -188,7 +188,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -210,7 +210,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -233,7 +233,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -251,7 +251,7 @@
* @return bool
* @access protected
*/
- protected function checkItemStatus(kEvent &$event)
+ protected function checkItemStatus(kEvent $event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -271,7 +271,7 @@
* @return void
* @access protected
*/
- protected function OnNew(kEvent &$event)
+ protected function OnNew(kEvent $event)
{
parent::OnNew($event);
Index: in-bulletin/units/topics/topics_config.php
===================================================================
--- in-bulletin/units/topics/topics_config.php (revision 15111)
+++ in-bulletin/units/topics/topics_config.php (working copy)
@@ -18,8 +18,8 @@
'Prefix' => 'bb',
'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'TopicsEventHandler', 'file' => 'topics_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'),
+ 'EventHandlerClass' => Array ('class' => 'TopicsEventHandler', 'file' => 'topics_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
Index: in-bulletin/units/topics/topics_event_handler.php
===================================================================
--- in-bulletin/units/topics/topics_event_handler.php (revision 15111)
+++ in-bulletin/units/topics/topics_event_handler.php (working copy)
@@ -23,7 +23,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
if ( $event->Name == 'OnTopicLockToggle' ) {
$object =& $event->getObject();
@@ -52,7 +52,7 @@
*
* @param kEvent $event
*/
- function OnToggleLock(&$event)
+ function OnToggleLock($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -69,7 +69,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -83,7 +83,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -109,7 +109,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -144,7 +144,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -175,7 +175,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
@@ -192,7 +192,7 @@
*
* @param kEvent $event
*/
- function OnTopicLockToggle(&$event)
+ function OnTopicLockToggle($event)
{
$object =& $event->getObject();
/* @var $object kCatDBItem */
@@ -209,7 +209,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -231,7 +231,7 @@
* @return void
* @access protected
*/
- protected function OnCloneSubItem(kEvent &$event)
+ protected function OnCloneSubItem(kEvent $event)
{
parent::OnCloneSubItem($event);
Index: in-commerce/gw_notify.php
===================================================================
--- in-commerce/gw_notify.php (revision 15111)
+++ in-commerce/gw_notify.php (working copy)
@@ -54,8 +54,7 @@
if($transaction_status == 1)
{
- $dummy_var = '10';
- $application->HandleEvent($dummy_var, 'ord:OnCompleteOrder');
+ $application->HandleEvent(new kEvent('ord:OnCompleteOrder'));
}
else {
$application->StoreVar('gw_error', $gateway_object->getErrorMsg());
Index: in-commerce/units/addresses/addresses_event_handler.php
===================================================================
--- in-commerce/units/addresses/addresses_event_handler.php (revision 15111)
+++ in-commerce/units/addresses/addresses_event_handler.php (working copy)
@@ -43,7 +43,7 @@
* @return string
* @access protected
*/
- protected function getMainSpecial(kEvent &$event)
+ protected function getMainSpecial(kEvent $event)
{
return '';
}
@@ -56,7 +56,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -95,7 +95,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -125,7 +125,7 @@
* @return void
* @access protected
*/
- protected function OnUpdate(kEvent &$event)
+ protected function OnUpdate(kEvent $event)
{
parent::OnUpdate($event);
@@ -139,7 +139,7 @@
* @return void
* @access protected
*/
- protected function OnCreate(kEvent &$event)
+ protected function OnCreate(kEvent $event)
{
parent::OnCreate($event);
@@ -153,7 +153,7 @@
* @return void
* @access protected
*/
- protected function setNextTemplate(kEvent &$event)
+ protected function setNextTemplate(kEvent $event)
{
if ( $this->Application->isAdminUser ) {
return;
@@ -174,7 +174,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
@@ -191,7 +191,7 @@
* @return bool
* @access protected
*/
- protected function OnUpdateProfileAddress(kEvent &$event)
+ protected function OnUpdateProfileAddress(kEvent $event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -266,7 +266,7 @@
* @return bool
* @access protected
*/
- protected function OnUpdateUserProfile(kEvent &$event)
+ protected function OnUpdateUserProfile(kEvent $event)
{
$user =& $event->MasterEvent->getObject();
/* @var $user UsersItem */
@@ -328,7 +328,7 @@
* @return bool
* @access protected
*/
- protected function checkItemStatus(kEvent &$event)
+ protected function checkItemStatus(kEvent $event)
{
if ( $this->Application->isAdminUser ) {
return true;
@@ -357,7 +357,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -391,7 +391,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -412,7 +412,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -429,7 +429,7 @@
*
* @param kEvent $event
*/
- function OnModifyUsersConfig(&$event)
+ function OnModifyUsersConfig($event)
{
$title_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TitlePresets');
Index: in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php
===================================================================
--- in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php (revision 15111)
+++ in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php (working copy)
@@ -23,7 +23,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -40,7 +40,7 @@
*
* @param kEvent $event
*/
- function OnSetPrimary(&$event)
+ function OnSetPrimary($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -57,7 +57,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -71,7 +71,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -83,7 +83,7 @@
*
* @param kEvent $event
*/
- function itemChanged(&$event)
+ function itemChanged($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -106,7 +106,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
$ids = $event->getEventParam('ids');
Index: in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php
===================================================================
--- in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php (revision 15111)
+++ in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php (working copy)
@@ -25,7 +25,7 @@
* @return void
* @access protected
*/
- protected function prepareObject(&$object, kEvent &$event)
+ protected function prepareObject(&$object, kEvent $event)
{
if ( $event->Special == 'log' ) {
return ;
@@ -57,7 +57,7 @@
* @return void
* @access protected
*/
- protected function OnNew(kEvent &$event)
+ protected function OnNew(kEvent $event)
{
parent::OnNew($event);
@@ -78,7 +78,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -109,7 +109,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
Index: in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php
===================================================================
--- in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php (revision 15111)
+++ in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php (working copy)
@@ -23,7 +23,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -40,7 +40,7 @@
*
* @param kEvent $event
*/
- function OnSetPrimary(&$event)
+ function OnSetPrimary($event)
{
$object =& $event->getObject();
$object->SetDBField('IsPrimary', 1);
@@ -54,7 +54,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -68,7 +68,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -80,7 +80,7 @@
*
* @param kEvent $event
*/
- function itemChanged(&$event)
+ function itemChanged($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -109,7 +109,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
$ids = $event->getEventParam('ids');
Index: in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php
===================================================================
--- in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (revision 15111)
+++ in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (working copy)
@@ -40,7 +40,7 @@
*
* @param kEvent $event
*/
- function OnMoreBrackets(&$event)
+ function OnMoreBrackets($event)
{
$event->redirect = false;
@@ -54,7 +54,7 @@
*
* @param kEvent $event
*/
- function OnArrange(&$event)
+ function OnArrange($event)
{
$event->redirect = false;
$brackets_helper =& $this->Application->recallObject('BracketsHelper');
@@ -69,7 +69,7 @@
*
* @param kEvent $event
*/
- function OnInfinity(&$event)
+ function OnInfinity($event)
{
$event->redirect = false;
$brackets_helper =& $this->Application->recallObject('BracketsHelper');
@@ -90,7 +90,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -112,7 +112,7 @@
*
* @param kEvent $event
*/
- function OnPreSaveBrackets(&$event)
+ function OnPreSaveBrackets($event)
{
$brackets_helper =& $this->Application->recallObject('BracketsHelper');
/* @var $brackets_helper kBracketsHelper */
Index: in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php
===================================================================
--- in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (revision 15111)
+++ in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (working copy)
@@ -21,7 +21,7 @@
*
* @param kEvent $event
*/
- function OnProcessSelected(&$event)
+ function OnProcessSelected($event)
{
// uses another handler event, because does the same stuff but on different table
$di_handler =& $this->Application->recallObject('di_EventHandler');
@@ -35,7 +35,7 @@
* @todo get parent item id through $object->getLinkedInfo()['ParentId']
* @access public
*/
- function OnEntireOrder(&$event)
+ function OnEntireOrder($event)
{
$object =& $event->GetObject();
$sql = 'DELETE FROM '.$object->TableName.' WHERE AffiliatePlanId='.$this->Application->GetVar('ap_id');
@@ -62,7 +62,7 @@
*
* @param kEvent $event
*/
- function OnDeleteDiscountedItem(&$event)
+ function OnDeleteDiscountedItem($event)
{
$main_object =& $event->MasterEvent->getObject();
$resource_id = $main_object->GetDBField('ResourceId');
@@ -79,7 +79,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
Index: in-commerce/units/affiliates/affiliates_event_handler.php
===================================================================
--- in-commerce/units/affiliates/affiliates_event_handler.php (revision 15111)
+++ in-commerce/units/affiliates/affiliates_event_handler.php (working copy)
@@ -40,7 +40,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
if ( $event->Name == 'OnBecomeAffiliate' || $event->Name == 'OnChangePaymentType' ) {
return $this->Application->LoggedIn() && $this->Application->ConfigValue('Comm_RegisterAsAffiliate');
@@ -56,7 +56,7 @@
* @return int
* @access public
*/
- public function getPassedID(kEvent &$event)
+ public function getPassedID(kEvent $event)
{
if ( $event->Special == 'user' ) {
$event->setEventParam('raise_warnings', 0);
@@ -80,7 +80,7 @@
* @param kEvent $event
* @return string
*/
- function generateAffiliateCode(&$event)
+ function generateAffiliateCode($event)
{
// accepts 1 - 36
$number_length = 11;
@@ -117,7 +117,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -142,7 +142,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -164,8 +164,12 @@
* @param kEvent $event
* @return bool
*/
- function OnStoreAffiliate(&$event)
+ function OnStoreAffiliate($event)
{
+ if ( defined('IS_INSTALL') && IS_INSTALL ) {
+ return;
+ }
+
$object =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -219,7 +223,7 @@
* @param kEvent $event
* @author Alex
*/
- function OnOrderApprove(&$event)
+ function OnOrderApprove($event)
{
$order =& $this->Application->recallObject($event->getEventParam('Order_PrefixSpecial'));
/* @var $order OrdersItem */
@@ -299,7 +303,7 @@
* @return void
* @access protected
*/
- protected function OnValidateAffiliate(&$event)
+ protected function OnValidateAffiliate($event)
{
if ( $this->Application->GetVar('RegisterAsAffiliate') != 'on' || $event->MasterEvent->status != kEvent::erSUCCESS ) {
return;
@@ -327,7 +331,7 @@
*
* @param kEvent $event
*/
- function OnRegisterAffiliate(&$event)
+ function OnRegisterAffiliate($event)
{
if ( $this->Application->GetVar('RegisterAsAffiliate') != 'on' || $event->MasterEvent->status != kEvent::erSUCCESS ) {
return;
@@ -367,7 +371,7 @@
*
* @param kEvent $event
*/
- function OnBecomeAffiliate(&$event)
+ function OnBecomeAffiliate($event)
{
$object =& $event->getObject( Array('form_name' => 'registration', 'skip_autoload' => true) );
/* @var $object UsersItem */
@@ -392,7 +396,7 @@
* @return void
* @access protected
*/
- protected function OnChangePaymentType(&$event)
+ protected function OnChangePaymentType($event)
{
$event->CallSubEvent('OnUpdate');
@@ -420,7 +424,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeDeleteFromLive(kEvent &$event)
+ protected function OnBeforeDeleteFromLive(kEvent $event)
{
parent::OnBeforeDeleteFromLive($event);
@@ -474,7 +478,7 @@
* @param kEvent $event
* @author Alex
*/
- function OnResetStatistics(&$event)
+ function OnResetStatistics($event)
{
if ( defined('IS_INSTALL') && IS_INSTALL ) {
return;
@@ -574,7 +578,7 @@
* @return void
* @access protected
*/
- protected function iterateItems(kEvent &$event)
+ protected function iterateItems(kEvent $event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
@@ -641,7 +645,7 @@
* @return bool
* @access protected
*/
- protected function checkItemStatus(kEvent &$event)
+ protected function checkItemStatus(kEvent $event)
{
if ( $this->Application->isAdminUser ) {
return true;
Index: in-commerce/units/brackets/brackets_event_handler.php
===================================================================
--- in-commerce/units/brackets/brackets_event_handler.php (revision 15111)
+++ in-commerce/units/brackets/brackets_event_handler.php (working copy)
@@ -45,7 +45,7 @@
* @return void
* @access protected
*/
- protected function prepareObject(&$object, kEvent &$event)
+ protected function prepareObject(&$object, kEvent $event)
{
if ( $this->Application->GetVar('s_id') === false ) {
return;
@@ -72,7 +72,7 @@
}
}
- function prepareBrackets(&$event)
+ function prepareBrackets($event)
{
$lang_object =& $this->Application->recallObject('lang.current');
/* @var $lang_object LanguagesItem */
@@ -113,7 +113,7 @@
*
* @param kEvent $event
*/
- function OnMoreBrackets(&$event)
+ function OnMoreBrackets($event)
{
$brackets_helper =& $this->getHelper($event);
@@ -125,7 +125,7 @@
*
* @param kEvent $event
*/
- function OnArrange(&$event)
+ function OnArrange($event)
{
$brackets_helper =& $this->getHelper($event);
@@ -138,7 +138,7 @@
*
* @param kEvent $event
*/
- function OnInfinity(&$event)
+ function OnInfinity($event)
{
$brackets_helper =& $this->getHelper($event);
@@ -156,7 +156,7 @@
* @param bool $event_readonly
* @return kBracketsHelper
*/
- protected function &getHelper(&$event, $event_readonly = false)
+ protected function &getHelper($event, $event_readonly = false)
{
$shipping_object =& $this->Application->recallObject('s');
/* @var $shipping_object kDBItem */
@@ -183,7 +183,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -202,7 +202,7 @@
*
* @param kEvent $event
*/
- function OnPreSaveBrackets(&$event)
+ function OnPreSaveBrackets($event)
{
$lang_object =& $this->Application->recallObject('lang.current');
/* @var $lang_object LanguagesItem */
Index: in-commerce/units/coupon_items/coupon_items_event_handler.php
===================================================================
--- in-commerce/units/coupon_items/coupon_items_event_handler.php (revision 15111)
+++ in-commerce/units/coupon_items/coupon_items_event_handler.php (working copy)
@@ -38,7 +38,7 @@
*
* @param kEvent $event
*/
- function OnProcessSelected(&$event)
+ function OnProcessSelected($event)
{
// uses another handler event, because does the same stuff but on different table
$di_handler =& $this->Application->recallObject('di_EventHandler');
@@ -52,7 +52,7 @@
* @todo get parent item id through $object->getLinkedInfo()['ParentId']
* @access public
*/
- function OnEntireOrder(&$event)
+ function OnEntireOrder($event)
{
$object =& $event->GetObject();
$sql = 'DELETE FROM '.$object->TableName.' WHERE CouponId='.$this->Application->GetVar('coup_id');
@@ -79,7 +79,7 @@
*
* @param kEvent $event
*/
- function OnDeleteCouponItem(&$event)
+ function OnDeleteCouponItem($event)
{
$main_object =& $event->MasterEvent->getObject();
$resource_id = $main_object->GetDBField('ResourceId');
@@ -96,7 +96,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
Index: in-commerce/units/coupons/coupons_event_handler.php
===================================================================
--- in-commerce/units/coupons/coupons_event_handler.php (revision 15111)
+++ in-commerce/units/coupons/coupons_event_handler.php (working copy)
@@ -40,7 +40,7 @@
*
* @param kEvent $event
*/
- function OnPrepareClone(&$event)
+ function OnPrepareClone($event)
{
$this->StoreSelectedIDs($event);
@@ -71,7 +71,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeClone(kEvent &$event)
+ protected function OnBeforeClone(kEvent $event)
{
parent::OnBeforeClone($event);
@@ -89,7 +89,7 @@
$object->SetDBField('Expiration_time', $expiration);
}
- function OnApplyClone(&$event)
+ function OnApplyClone($event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
@@ -174,7 +174,7 @@
* @return void
* @access protected
*/
- protected function OnPreCreate(kEvent &$event)
+ protected function OnPreCreate(kEvent $event)
{
parent::OnPreCreate($event);
@@ -198,7 +198,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -212,7 +212,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -224,7 +224,7 @@
*
* @param kEvent $event
*/
- function itemChanged(&$event)
+ function itemChanged($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
Index: in-commerce/units/currencies/currencies_event_handler.php
===================================================================
--- in-commerce/units/currencies/currencies_event_handler.php (revision 15111)
+++ in-commerce/units/currencies/currencies_event_handler.php (working copy)
@@ -51,7 +51,7 @@
* @return int
* @access public
*/
- public function getPassedID(kEvent &$event)
+ public function getPassedID(kEvent $event)
{
if ( $event->Special == 'current' ) {
return Array ('ISO' => $this->Application->RecallVar('curr_iso'));
@@ -65,7 +65,7 @@
*
* @param kEvent $event
*/
- function OnSetPrimary(&$event)
+ function OnSetPrimary($event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
@@ -86,7 +86,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -120,7 +120,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -161,7 +161,7 @@
* @return void
* @access protected
*/
- protected function OnSave(kEvent &$event)
+ protected function OnSave(kEvent $event)
{
$this->Application->StoreVar('saved_curr_ids', $this->Application->RecallVar($event->Prefix . '_selected_ids'));
@@ -173,7 +173,7 @@
*
* @param kEvent $event
*/
- function OnDisableUnused(&$event)
+ function OnDisableUnused($event)
{
$unused_ids = $this->Application->GetVar('unused_ids');
@@ -190,7 +190,7 @@
*
* @param kEvent $event
*/
- function OnUpdateRate(&$event)
+ function OnUpdateRate($event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
@@ -230,7 +230,7 @@
*
* @param kEvent $event
*/
- function OnUpdateRates(&$event)
+ function OnUpdateRates($event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
@@ -275,7 +275,7 @@
* @return void
* @access protected
*/
- protected function OnChangeCurrency(&$event)
+ protected function OnChangeCurrency($event)
{
$currency_iso = $this->Application->GetVar('curr_iso');
$available_currencies = $this->Application->siteDomainField('Currencies');
@@ -305,7 +305,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
Index: in-commerce/units/destinations/dst_event_handler.php
===================================================================
--- in-commerce/units/destinations/dst_event_handler.php (revision 15111)
+++ in-commerce/units/destinations/dst_event_handler.php (working copy)
@@ -22,7 +22,7 @@
* @return void
* @access protected
*/
- protected function OnCreate(kEvent &$event)
+ protected function OnCreate(kEvent $event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -59,7 +59,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
if ( $type != 'before' ) {
return;
@@ -87,9 +87,10 @@
*
* @param kEvent $event
*/
- function OnZoneUpdate(&$event) {
+ function OnZoneUpdate($event) {
- $object = &$event->getObject();
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
$zone_object = &$this->Application->recallObject('z');
$zone_id = (int)$zone_object->GetID();
Index: in-commerce/units/discount_items/discount_items_event_handler.php
===================================================================
--- in-commerce/units/discount_items/discount_items_event_handler.php (revision 15111)
+++ in-commerce/units/discount_items/discount_items_event_handler.php (working copy)
@@ -38,7 +38,7 @@
*
* @param kEvent $event
*/
- function OnProcessSelected(&$event)
+ function OnProcessSelected($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$selected_ids = $this->Application->GetVar('selected_ids');
@@ -102,7 +102,7 @@
* @todo get parent item id through $object->getLinkedInfo()['ParentId']
* @access public
*/
- function OnEntireOrder(&$event)
+ function OnEntireOrder($event)
{
$object =& $event->GetObject();
$sql = 'DELETE FROM '.$object->TableName.' WHERE DiscountId='.$this->Application->GetVar('d_id');
@@ -129,7 +129,7 @@
*
* @param kEvent $event
*/
- function OnDeleteDiscountedItem(&$event)
+ function OnDeleteDiscountedItem($event)
{
$main_object =& $event->MasterEvent->getObject();
$resource_id = $main_object->GetDBField('ResourceId');
@@ -146,7 +146,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
Index: in-commerce/units/discounts/discounts_event_handler.php
===================================================================
--- in-commerce/units/discounts/discounts_event_handler.php (revision 15111)
+++ in-commerce/units/discounts/discounts_event_handler.php (working copy)
@@ -22,7 +22,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -36,7 +36,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -48,7 +48,7 @@
*
* @param kEvent $event
*/
- function itemChanged(&$event)
+ function itemChanged($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
Index: in-commerce/units/downloads/downloads_config.php
===================================================================
--- in-commerce/units/downloads/downloads_config.php (revision 15111)
+++ in-commerce/units/downloads/downloads_config.php (working copy)
@@ -21,7 +21,7 @@
'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
'RegisterClasses' => Array(
- Array('pseudo'=>'DownloadHelper','class'=>'DownloadHelper','file'=>'download_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+ Array('pseudo' => 'DownloadHelper', 'class' => 'DownloadHelper', 'file' => 'download_helper.php', 'build_event' => ''),
),
'AutoLoad' => true,
Index: in-commerce/units/files/files_event_handler.php
===================================================================
--- in-commerce/units/files/files_event_handler.php (revision 15111)
+++ in-commerce/units/files/files_event_handler.php (working copy)
@@ -22,7 +22,7 @@
* @return string
* @access protected
*/
- protected function getMainSpecial(kEvent &$event)
+ protected function getMainSpecial(kEvent $event)
{
if ( $event->Special == 'downl' ) {
return '';
@@ -39,7 +39,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -60,7 +60,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -74,7 +74,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -103,7 +103,7 @@
*
* @param kEvent $event
*/
- function itemChanged(&$event)
+ function itemChanged($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -129,7 +129,7 @@
*
* @param kEvent $event
*/
- function OnSetPrimary(&$event)
+ function OnSetPrimary($event)
{
$ids = $this->StoreSelectedIDs($event);
$id = array_shift($ids);
@@ -151,7 +151,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
$ids = $event->getEventParam('ids');
Index: in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php
===================================================================
--- in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php (working copy)
@@ -43,9 +43,8 @@
$order->SetDBField('TransactionStatus', $transaction_status);
if ($transaction_status == 1) {
- $dummy_var = '10';
$application->SetVar('ord_id', $order->GetID()); // used in OrdersEventHandler::UpdateOrderItem
- $application->HandleEvent($dummy_var, 'ord:OnCompleteOrder');
+ $application->HandleEvent(new kEvent('ord:OnCompleteOrder'));
}
$application->Done();
\ No newline at end of file
Index: in-commerce/units/gateways/gw_classes/paypal.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paypal.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/paypal.php (working copy)
@@ -195,7 +195,7 @@
break;
case 'subscr_payment':
$field_values = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'OrderItems WHERE OrderItemId = '.$_POST['item_number']);
- $this->Application->HandleEvent($an_event, 'p:OnSubscriptionApprove', array('field_values' => $field_values));
+ $this->Application->HandleEvent(new kEvent('p:OnSubscriptionApprove', array('field_values' => $field_values)));
$success = 0; //this will eliminate OnCompleteOrder in gw_notify!
$org_order = $this->Application->recallObject('ord.-original', 'ord', Array('skip_autoload' => true));
Index: in-commerce/units/gateways/gw_event_handler.php
===================================================================
--- in-commerce/units/gateways/gw_event_handler.php (revision 15111)
+++ in-commerce/units/gateways/gw_event_handler.php (working copy)
@@ -15,7 +15,7 @@
class GatewayEventHandler extends kDBEventHandler {
- function OnSaveValues(&$event)
+ function OnSaveValues($event)
{
// if there is no id - it means we need to create an item
$item_id = $this->getPassedID($event);
@@ -56,7 +56,7 @@
}
}
- protected function OnCheckGateways(&$event)
+ protected function OnCheckGateways($event)
{
if ( !$this->Application->isAdminUser ) {
return;
Index: in-commerce/units/gift_certificates/gift_certificates_eh.php
===================================================================
--- in-commerce/units/gift_certificates/gift_certificates_eh.php (revision 15111)
+++ in-commerce/units/gift_certificates/gift_certificates_eh.php (working copy)
@@ -42,7 +42,7 @@
* @return void
* @access protected
*/
- protected function OnPreCreate(kEvent &$event)
+ protected function OnPreCreate(kEvent $event)
{
parent::OnPreCreate($event);
@@ -65,7 +65,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -79,7 +79,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -96,7 +96,7 @@
*
* @param kEvent $event
*/
- function itemChanged(&$event)
+ function itemChanged($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -143,7 +143,7 @@
* @return void
* @access protected
*/
- protected function OnSave(kEvent &$event)
+ protected function OnSave(kEvent $event)
{
parent::OnSave($event);
@@ -168,7 +168,7 @@
*
* @param kEvent $event
*/
- function OnEmailGiftCertificate(&$event)
+ function OnEmailGiftCertificate($event)
{
$ids = $this->StoreSelectedIDs($event);
if (!$ids) {
Index: in-commerce/units/helpers/helpers_config.php
===================================================================
--- in-commerce/units/helpers/helpers_config.php (revision 15111)
+++ in-commerce/units/helpers/helpers_config.php (working copy)
@@ -9,10 +9,10 @@
'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
- Array ('pseudo' => 'OrderHelper', 'class' => 'OrderHelper', 'file' => 'order_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
+ Array ('pseudo' => 'OrderHelper', 'class' => 'OrderHelper', 'file' => 'order_helper.php', 'build_event' => ''),
Array ('pseudo' => 'CurrencyRates', 'class' => 'CurrencyRates', 'file' => 'currency_rates.php', 'build_event' => ''),
- Array ('pseudo' => 'BankLVCurrencyRates', 'class' => 'BankLVCurrencyRates', 'file' => 'bank_lv_currency_rates.php', 'require_classes' => 'CurrencyRates', 'build_event' => ''),
- Array ('pseudo' => 'ECBCurrencyRates', 'class' => 'ECBCurrencyRates', 'file' => 'ecb_currency_rates.php', 'require_classes' => 'CurrencyRates', 'build_event' => ''),
- Array ('pseudo' => 'FRNYCurrencyRates', 'class' => 'FRNYCurrencyRates', 'file' => 'frny_currency_rates.php', 'require_classes' => 'CurrencyRates', 'build_event' => ''),
+ Array ('pseudo' => 'BankLVCurrencyRates', 'class' => 'BankLVCurrencyRates', 'file' => 'bank_lv_currency_rates.php', 'build_event' => ''),
+ Array ('pseudo' => 'ECBCurrencyRates', 'class' => 'ECBCurrencyRates', 'file' => 'ecb_currency_rates.php', 'build_event' => ''),
+ Array ('pseudo' => 'FRNYCurrencyRates', 'class' => 'FRNYCurrencyRates', 'file' => 'frny_currency_rates.php', 'build_event' => ''),
),
);
Index: in-commerce/units/manufacturers/manufacturers_event_handler.php
===================================================================
--- in-commerce/units/manufacturers/manufacturers_event_handler.php (revision 15111)
+++ in-commerce/units/manufacturers/manufacturers_event_handler.php (working copy)
@@ -41,7 +41,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -89,7 +89,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
@@ -106,7 +106,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -124,7 +124,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
Index: in-commerce/units/order_items/order_items_event_handler.php
===================================================================
--- in-commerce/units/order_items/order_items_event_handler.php (revision 15111)
+++ in-commerce/units/order_items/order_items_event_handler.php (working copy)
@@ -39,7 +39,7 @@
*
* @param kEvent $event
*/
- function OnProcessSelected(&$event)
+ function OnProcessSelected($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
@@ -93,7 +93,7 @@
* @return void
* @access protected
*/
- protected function OnUpdate(kEvent &$event)
+ protected function OnUpdate(kEvent $event)
{
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -160,7 +160,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -257,7 +257,7 @@
*
* @param kEvent $event
*/
- function OnSaveItems(&$event)
+ function OnSaveItems($event)
{
$event->CallSubEvent('OnUpdate');
@@ -274,7 +274,7 @@
* @return void
* @access protected
*/
- protected function OnAfterClone(kEvent &$event)
+ protected function OnAfterClone(kEvent $event)
{
parent::OnAfterClone($event);
@@ -296,7 +296,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
@@ -320,7 +320,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -345,7 +345,7 @@
* @return bool
* @access protected
*/
- protected function checkItemStatus(kEvent &$event)
+ protected function checkItemStatus(kEvent $event)
{
if ( $this->Application->isAdmin ) {
return true;
Index: in-commerce/units/orders/order_validator.php
===================================================================
--- in-commerce/units/orders/order_validator.php (revision 15111)
+++ in-commerce/units/orders/order_validator.php (working copy)
@@ -15,9 +15,9 @@
class OrderValidator extends kValidator {
- public function __construct($application = null)
+ public function __construct()
{
- parent::__construct($application);
+ parent::__construct();
$this->ErrorMsgs['credit_card_validation_error'] = '!lu_cc_validation_error!';
$this->ErrorMsgs['credit_card_expired'] = '!lu_cc_expired!';
Index: in-commerce/units/orders/orders_config.php
===================================================================
--- in-commerce/units/orders/orders_config.php (revision 15111)
+++ in-commerce/units/orders/orders_config.php (working copy)
@@ -26,7 +26,7 @@
'RegisterClasses' => Array (
Array ('pseudo' => 'OrderCalculator', 'class' => 'OrderCalculator', 'file' => 'order_calculator.php', 'build_event' => ''),
Array ('pseudo' => 'OrderManager', 'class' => 'OrderManager', 'file' => 'order_manager.php', 'build_event' => ''),
- Array ('pseudo' => 'OrderValidator', 'class' => 'OrderValidator', 'file' => 'order_validator.php', 'build_event' => '', 'require_classes' => 'kValidator'),
+ Array ('pseudo' => 'OrderValidator', 'class' => 'OrderValidator', 'file' => 'order_validator.php', 'build_event' => ''),
),
'Hooks' => Array (
Index: in-commerce/units/orders/orders_event_handler.php
===================================================================
--- in-commerce/units/orders/orders_event_handler.php (revision 15111)
+++ in-commerce/units/orders/orders_event_handler.php (working copy)
@@ -23,7 +23,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
if ( !$this->Application->isAdminUser ) {
if ( $event->Name == 'OnCreate' ) {
@@ -176,7 +176,7 @@
/* ======================== FRONT ONLY ======================== */
- function OnQuietPreSave(&$event)
+ function OnQuietPreSave($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -191,7 +191,7 @@
*
* @param kEvent $event
*/
- function OnSelectAddress(&$event)
+ function OnSelectAddress($event)
{
if ($this->Application->isAdminUser) {
return ;
@@ -252,7 +252,7 @@
*
* @param kEvent $event
*/
- function OnUserCreate(&$event)
+ function OnUserCreate($event)
{
if( !($event->MasterEvent->status == kEvent::erSUCCESS) ) return false;
@@ -271,7 +271,7 @@
* @return void
* @access protected
*/
- protected function OnUserLogin(&$event)
+ protected function OnUserLogin($event)
{
if ( ($event->MasterEvent->status != kEvent::erSUCCESS) || kUtil::constOn('IS_INSTALL') ) {
// login failed OR login during installation
@@ -301,7 +301,7 @@
* @param kEvent $event
* @return void
*/
- function updateUserID($order_id, &$event)
+ function updateUserID($order_id, $event)
{
$user =& $this->Application->recallObject('u.current');
/* @var $user UsersItem */
@@ -380,7 +380,7 @@
return $email_params;
}
- function PrepareCoupons(&$event, &$order)
+ function PrepareCoupons($event, &$order)
{
$order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
/* @var $order_items kDBList */
@@ -432,7 +432,7 @@
* @param kEvent $event
* @return bool
*/
- function OnCompleteOrder(&$event)
+ function OnCompleteOrder($event)
{
$this->LockTables($event);
if ( !$this->CheckQuantites($event) ) {
@@ -526,7 +526,7 @@
*
* @param kEvent $event
*/
- function setBillingAddress(&$event)
+ function setBillingAddress($event)
{
$object =& $event->getObject();
/* @var $object OrdersItem */
@@ -557,7 +557,7 @@
*
* @param kEvent $event
*/
- function OnProceedToPreview(&$event)
+ function OnProceedToPreview($event)
{
$this->setBillingAddress($event);
@@ -566,13 +566,13 @@
}
- function OnViewCart(&$event)
+ function OnViewCart($event)
{
$this->StoreContinueShoppingLink();
$event->redirect = $this->Application->GetVar('viewcart_template');
}
- function OnContinueShopping(&$event)
+ function OnContinueShopping($event)
{
$order_helper =& $this->Application->recallObject('OrderHelper');
/* @var $order_helper OrderHelper */
@@ -587,7 +587,7 @@
*
* @param kEvent $event
*/
- function OnCheckout(&$event)
+ function OnCheckout($event)
{
$this->OnUpdateCart($event);
if ( !$event->getEventParam('RecalculateChangedCart') ) {
@@ -633,7 +633,7 @@
* @return void
* @access protected
*/
- protected function OnRestoreOrder(kEvent &$event)
+ protected function OnRestoreOrder(kEvent $event)
{
if ( $this->Application->isAdmin || $this->Application->RecallVar('ord_id') ) {
// admin OR there is an active order -> don't restore from cookie
@@ -663,7 +663,7 @@
*
* @param kEvent $event
*/
- function OnProceedToBilling(&$event)
+ function OnProceedToBilling($event)
{
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ( $items_info ) {
@@ -695,7 +695,7 @@
* @param kEvent $event
* @return void
*/
- protected function OnCancelRecurring(&$event)
+ protected function OnCancelRecurring($event)
{
$order =& $event->getObject();
/* @var $order OrdersItem */
@@ -715,7 +715,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -737,7 +737,7 @@
* @return void
* @access protected
*/
- protected function OnUpdate(kEvent &$event)
+ protected function OnUpdate(kEvent $event)
{
$this->setBillingAddress($event);
@@ -767,7 +767,7 @@
*
* @param kEvent $event
*/
- function createMissingAddresses(&$event)
+ function createMissingAddresses($event)
{
if ( !$this->Application->LoggedIn() ) {
return ;
@@ -822,9 +822,9 @@
* @return void
* @access protected
*/
- protected function OnUpdateCart(&$event)
+ protected function OnUpdateCart($event)
{
- $this->Application->HandleEvent($items_event, 'orditems:OnUpdate');
+ $this->Application->HandleEvent(new kEvent('orditems:OnUpdate'));
$event->CallSubEvent('OnRecalculateItems');
}
@@ -834,7 +834,7 @@
*
* @param kEvent $event
*/
- function OnUpdateCartJSON(&$event)
+ function OnUpdateCartJSON($event)
{
if ( $this->Application->GetVar('ajax') != 'yes' ) {
return;
@@ -865,7 +865,7 @@
}
// 3. update product quantities and recalculate all discounts
- $this->Application->HandleEvent($items_event, 'orditems:OnUpdate');
+ $this->Application->HandleEvent(new kEvent('orditems:OnUpdate'));
$event->CallSubEvent('OnRecalculateItems');
// 4. remove "orditems" object of kDBItem class, since getOrderInfo uses kDBList object under same prefix
@@ -885,7 +885,7 @@
*
* @param kEvent $event
*/
- function OnAddToCart(&$event)
+ function OnAddToCart($event)
{
$this->StoreContinueShoppingLink();
@@ -1000,7 +1000,7 @@
* @return string
* @todo Needed? Should be refactored (by Alex)
*/
- function TablePrefix(kEvent &$event)
+ function TablePrefix(kEvent $event)
{
return $this->UseTempTables($event) ? $this->Application->GetTempTablePrefix('prefix:' . $event->Prefix) . TABLE_PREFIX : TABLE_PREFIX;
}
@@ -1015,7 +1015,7 @@
* @param int $selection_mode
* @return bool
*/
- function CheckOptions(&$event, &$options, $product_id, $qty, $selection_mode)
+ function CheckOptions($event, &$options, $product_id, $qty, $selection_mode)
{
// 1. check for required options
$selection_filter = $selection_mode == 1 ? ' AND OptionType IN (1,3,6) ' : '';
@@ -1099,7 +1099,7 @@
*
* @param kEvent $event
*/
- function OnUpdateItemOptions(&$event)
+ function OnUpdateItemOptions($event)
{
$opt_data = $this->Application->GetVar('options');
$options = getArrayValue($opt_data, $this->Application->GetVar('p_id'));
@@ -1167,7 +1167,7 @@
*
* @param kEvent $event
*/
- function OnApplyCoupon(&$event)
+ function OnApplyCoupon($event)
{
$code = $this->Application->GetVar('coupon_code');
@@ -1238,7 +1238,7 @@
* @param kEvent $event
* @deprecated
*/
- function OnRemoveCoupon(&$event)
+ function OnRemoveCoupon($event)
{
$object =& $event->getObject();
/* @var $object OrdersItem */
@@ -1277,7 +1277,7 @@
*
* @param kEvent $event
*/
- function OnAddVirtualProductToCart(&$event)
+ function OnAddVirtualProductToCart($event)
{
$l_info = $this->Application->GetVar('l');
if($l_info)
@@ -1315,7 +1315,7 @@
$event->SetRedirectParam('m_cat_id', 0); // not to pass link id
}
- function OnRemoveFromCart(&$event)
+ function OnRemoveFromCart($event)
{
$ord_item_id = $this->Application->GetVar('orditems_id');
$ord_id = $this->getPassedID($event);
@@ -1323,7 +1323,7 @@
$this->OnRecalculateItems($event);
}
- function OnCleanupCart(&$event)
+ function OnCleanupCart($event)
{
$object =& $event->getObject();
@@ -1344,7 +1344,7 @@
* @return int
* @access public
*/
- public function getPassedID(kEvent &$event)
+ public function getPassedID(kEvent $event)
{
$event->setEventParam('raise_warnings', 0);
$passed = parent::getPassedID($event);
@@ -1392,7 +1392,7 @@
* @return void
* @access protected
*/
- protected function LoadItem(kEvent &$event)
+ protected function LoadItem(kEvent $event)
{
$id = $this->getPassedID($event);
@@ -1415,7 +1415,7 @@
*
* @param kEvent $event
*/
- function _createNewCart(&$event)
+ function _createNewCart($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
@@ -1509,7 +1509,7 @@
*
* @param kEvent $event
*/
- function SetStepRequiredFields(&$event)
+ function SetStepRequiredFields($event)
{
$order =& $event->getObject();
/* @var $order OrdersItem */
@@ -1566,7 +1566,7 @@
*
* @param kEvent $event
*/
- function CheckUser(&$event)
+ function CheckUser($event)
{
if ($this->Application->isAdminUser || defined('GW_NOTIFY')) {
// don't check for user in order while processing payment
@@ -1600,7 +1600,7 @@
* @return void
* @access protected
*/
- protected function OnPreCreate(kEvent &$event)
+ protected function OnPreCreate(kEvent $event)
{
parent::OnPreCreate($event);
@@ -1622,7 +1622,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeClone(kEvent &$event)
+ protected function OnBeforeClone(kEvent $event)
{
parent::OnBeforeClone($event);
@@ -1643,7 +1643,7 @@
$object->SetDBField('GWResult2', '');
}
- function OnReserveItems(&$event)
+ function OnReserveItems($event)
{
$order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
/* @var $order_items kDBList */
@@ -1711,7 +1711,7 @@
return true;
}
- function OnOrderPrint(&$event)
+ function OnOrderPrint($event)
{
$event->SetRedirectParam('opener', 's');
}
@@ -1722,7 +1722,7 @@
* @param kEvent $event
* @access public
*/
- function OnResetAddress(&$event)
+ function OnResetAddress($event)
{
$to_tab = $this->Application->GetVar('to_tab');
$from_tab = substr($event->Name, strlen('OnResetTo'));
@@ -1747,7 +1747,7 @@
* @todo Is this called ? (by Alex)
* @param kEvent $event
*/
- function OnProcessSelected(&$event)
+ function OnProcessSelected($event)
{
$selected_ids = $this->Application->GetVar('selected_ids');
$product_ids = $selected_ids['p'];
@@ -1764,7 +1764,7 @@
$event->SetRedirectParam('opener', 'u');
}
- function OnMassPlaceOrder(&$event)
+ function OnMassPlaceOrder($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$ids = $this->StoreSelectedIDs($event);
@@ -1985,7 +1985,7 @@
*
* @param kEvent $event
*/
- function MassInventoryAction(&$event)
+ function MassInventoryAction($event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
@@ -2006,7 +2006,7 @@
}
}
- function InventoryAction(&$event)
+ function InventoryAction($event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
@@ -2240,7 +2240,7 @@
*
* @param kEvent $event
*/
- function setNextOrderNumber(&$event)
+ function setNextOrderNumber($event)
{
$object =& $event->getObject();
/* @var $object OrdersItem */
@@ -2294,7 +2294,7 @@
* @return void
* @access protected
*/
- protected function OnAfterClone(kEvent &$event)
+ protected function OnAfterClone(kEvent $event)
{
parent::OnAfterClone($event);
@@ -2319,7 +2319,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
@@ -2367,7 +2367,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -2385,7 +2385,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -2469,7 +2469,7 @@
* @return void
* @access protected
*/
- protected function createAccountFromOrder(&$event)
+ protected function createAccountFromOrder($event)
{
$order =& $event->getObject();
/* @var $order OrdersItem */
@@ -2484,8 +2484,7 @@
if ( $order->GetDBField('PortalUserId') == USER_GUEST ) {
// will also auto-login user when created
$this->Application->SetVar('u_register', Array (USER_GUEST => $user_fields));
- $user_event = new kEvent('u.register:OnCreate');
- $this->Application->HandleEvent($user_event);
+ $this->Application->HandleEvent(new kEvent('u.register:OnCreate'));
}
else {
$user =& $this->Application->recallObject('u.current');
@@ -2506,7 +2505,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -2558,7 +2557,7 @@
return $type2special[$type];
}
- function LockTables(&$event)
+ function LockTables($event)
{
$read = Array();
$write_lock = '';
@@ -2582,7 +2581,7 @@
* @param kEvent $event
* @return bool
*/
- function CheckQuantites(&$event)
+ function CheckQuantites($event)
{
if ( $this->OnRecalculateItems($event) ) { // if something has changed in the order
if ( $this->Application->isAdminUser ) {
@@ -2600,7 +2599,7 @@
return true;
}
- function DoPlaceOrder(&$event)
+ function DoPlaceOrder($event)
{
$order =& $event->getObject();
@@ -2616,7 +2615,7 @@
return true;
}
- function &queryOrderItems(&$event, $table_prefix)
+ function &queryOrderItems($event, $table_prefix)
{
$order =& $event->getObject();
$ord_id = $order->GetId();
@@ -2643,7 +2642,7 @@
return $items;
}
- function ReserveItems(&$event)
+ function ReserveItems($event)
{
$table_prefix = $this->TablePrefix($event);
$items =& $this->queryOrderItems($event, $table_prefix);
@@ -2693,7 +2692,7 @@
}
}
- function FreeItems(&$event)
+ function FreeItems($event)
{
$table_prefix = $this->TablePrefix($event);
$items =& $this->queryOrderItems($event, $table_prefix);
@@ -2745,7 +2744,7 @@
* @param kEvent $event
* @param OrdersItem $object
*/
- function SplitOrder(&$event, &$object)
+ function SplitOrder($event, &$object)
{
$affiliate_event = new kEvent('affil:OnOrderApprove');
$affiliate_event->setEventParam('Order_PrefixSpecial', $object->getPrefixSpecial() );
@@ -3004,7 +3003,7 @@
* @param kEvent $event
* @param int $item_id
*/
- function AddItemToOrder(&$event, $item_id, $qty = null, $package_num = null)
+ function AddItemToOrder($event, $item_id, $qty = null, $package_num = null)
{
if (!isset($qty)) {
$qty = 1;
@@ -3048,7 +3047,7 @@
$manager->setOrder($order);
$manager->addProduct($product, $event->getEventParam('ItemData'), $qty, $package_num);
- $this->Application->HandleEvent($ord_event, 'ord:OnRecalculateItems');
+ $this->Application->HandleEvent(new kEvent('ord:OnRecalculateItems'));
}
/**
@@ -3056,7 +3055,7 @@
*
* @param kEvent $event
*/
- function UpdateShippingTotal(&$event)
+ function UpdateShippingTotal($event)
{
if ( $this->Application->GetVar('ebay_notification') == 1 ) {
// TODO: get rid of this "if"
@@ -3092,7 +3091,7 @@
* @param kEvent $event
* @return bool Returns true if items splitting/grouping were changed
*/
- function OnRecalculateItems(&$event)
+ function OnRecalculateItems($event)
{
if (is_object($event->MasterEvent) && ($event->MasterEvent->status != kEvent::erSUCCESS)) {
// e.g. master order update failed, don't recalculate order products
@@ -3192,7 +3191,7 @@
return $price_id;
}
- function UpdateShippingOption(&$event)
+ function UpdateShippingOption($event)
{
$object =& $event->getObject();
$shipping_option = $object->GetDBField('ShippingOption');
@@ -3223,7 +3222,7 @@
* @param kEvent $event
* @return bool
*/
- function UpdateShippingTypes(&$event)
+ function UpdateShippingTypes($event)
{
$object =& $event->getObject();
/* @var $object OrdersItem */
@@ -3305,7 +3304,7 @@
return true;
}*/
- function RecalculateTax(&$event)
+ function RecalculateTax($event)
{
$object =& $event->getObject();
/* @var $object OrdersItem */
@@ -3317,7 +3316,7 @@
$object->RecalculateTax();
}
- function RecalculateProcessingFee(&$event)
+ function RecalculateProcessingFee($event)
{
$object =& $event->getObject();
@@ -3331,7 +3330,7 @@
$this->UpdateTotals($event);
}
- function UpdateTotals(&$event)
+ function UpdateTotals($event)
{
$object =& $event->getObject();
/* @var $object OrdersItem */
@@ -3339,7 +3338,7 @@
$object->UpdateTotals();
}
- /*function CalculateDiscount(&$event)
+ /*function CalculateDiscount($event)
{
$object =& $event->getObject();
@@ -3388,7 +3387,7 @@
*
* @param kEvent $event
*/
- function OnGoToOrder(&$event)
+ function OnGoToOrder($event)
{
$id = array_shift( $this->StoreSelectedIDs($event) );
@@ -3424,7 +3423,7 @@
*
* @param kEvent $event
*/
- function OnResetToPending(&$event)
+ function OnResetToPending($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
@@ -3453,7 +3452,7 @@
*
* @param kEvent $event
*/
- function OnLoadSelected(&$event)
+ function OnLoadSelected($event)
{
$event->setPseudoClass('_List');
$object =& $event->getObject( Array('selected_only' => true) );
@@ -3483,7 +3482,7 @@
*
* @param kEvent $event
*/
- function OnCheckRecurringOrders(&$event)
+ function OnCheckRecurringOrders($event)
{
$skip_clause = Array();
$ord_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
@@ -3552,7 +3551,7 @@
}
- function OnGeneratePDF(&$event)
+ function OnGeneratePDF($event)
{
$this->OnLoadSelected($event);
@@ -3635,7 +3634,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -3700,7 +3699,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeExportBegin(kEvent &$event)
+ protected function OnBeforeExportBegin(kEvent $event)
{
parent::OnBeforeExportBegin($event);
@@ -3734,7 +3733,7 @@
* @return Array
* @access protected
*/
- public function getCustomExportColumns(kEvent &$event)
+ public function getCustomExportColumns(kEvent $event)
{
$columns = parent::getCustomExportColumns($event);
@@ -3758,7 +3757,7 @@
* @return void
* @access protected
*/
- protected function OnSave(kEvent &$event)
+ protected function OnSave(kEvent $event)
{
parent::OnSave($event);
@@ -3784,7 +3783,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeCopyToLive(kEvent &$event)
+ protected function OnBeforeCopyToLive(kEvent $event)
{
parent::OnBeforeCopyToLive($event);
@@ -3802,7 +3801,7 @@
* @return bool
* @access protected
*/
- protected function checkItemStatus(kEvent &$event)
+ protected function checkItemStatus(kEvent $event)
{
if ( $this->Application->isAdminUser ) {
return true;
@@ -3824,7 +3823,7 @@
*
* @param kEvent $event
*/
- function OnApplyGiftCertificate(&$event)
+ function OnApplyGiftCertificate($event)
{
$code = $this->Application->GetVar('giftcert_code');
@@ -3871,7 +3870,7 @@
* @param kEvent $event
* @deprecated
*/
- function OnRemoveGiftCertificate(&$event)
+ function OnRemoveGiftCertificate($event)
{
$object =& $event->getObject();
/* @var $object OrdersItem */
@@ -3887,7 +3886,7 @@
$object->RemoveGiftCertificate();
}
- function RecalculateGift(&$event)
+ function RecalculateGift($event)
{
$object =& $event->getObject();
/* @var $object OrdersItem */
@@ -3915,7 +3914,7 @@
*
* @param kEvent $event
*/
- function OnDownloadLabel(&$event)
+ function OnDownloadLabel($event)
{
$event->status = kEvent::erSTOP;
ini_set('memory_limit', '300M');
@@ -3943,7 +3942,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemValidate(kEvent &$event)
+ protected function OnBeforeItemValidate(kEvent $event)
{
parent::OnBeforeItemValidate($event);
@@ -3975,7 +3974,7 @@
*
* @param kEvent $event
*/
- function OnUpdateAjax(&$event)
+ function OnUpdateAjax($event)
{
$ajax_form_helper =& $this->Application->recallObject('AjaxFormHelper');
/* @var $ajax_form_helper AjaxFormHelper */
Index: in-commerce/units/orders/orders_item.php
===================================================================
--- in-commerce/units/orders/orders_item.php (revision 15111)
+++ in-commerce/units/orders/orders_item.php (working copy)
@@ -279,7 +279,7 @@
}
// ===== Gift Certificates Related =====
- function RecalculateGift(&$event)
+ function RecalculateGift($event)
{
$gc_id = $this->GetDBField('GiftCertificateId');
if ($gc_id < 1) {
Index: in-commerce/units/payment_type/payment_type_event_handler.php
===================================================================
--- in-commerce/units/payment_type/payment_type_event_handler.php (revision 15111)
+++ in-commerce/units/payment_type/payment_type_event_handler.php (working copy)
@@ -59,7 +59,7 @@
*
* @param kEvent $event
*/
- function OnSetPrimary(&$event)
+ function OnSetPrimary($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$this->StoreSelectedIDs($event);
@@ -75,7 +75,7 @@
$event->SetRedirectParam('opener', 's');
}
- function OnMassDecline(&$event)
+ function OnMassDecline($event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -113,7 +113,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -136,7 +136,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -151,7 +151,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
$object =& $event->getObject();
@@ -183,7 +183,7 @@
* @return void
* @access protected
*/
- protected function OnSave(kEvent &$event)
+ protected function OnSave(kEvent $event)
{
$this->Application->StoreVar('check_unused_currencies', 1);
@@ -197,7 +197,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -213,7 +213,7 @@
*
* @param kEvent $event
*/
- function convertGroups(&$event)
+ function convertGroups($event)
{
$object =& $event->getObject();
@@ -236,7 +236,7 @@
* @return int
* @access public
*/
- public function getPassedID(kEvent &$event)
+ public function getPassedID(kEvent $event)
{
if ( $event->Special == 'auto-ord' ) {
$main_object =& $this->Application->recallObject('ord');
@@ -263,7 +263,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
Index: in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php
===================================================================
--- in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php (revision 15111)
+++ in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php (working copy)
@@ -22,7 +22,7 @@
* @return void
* @access protected
*/
- protected function OnCreate(kEvent &$event)
+ protected function OnCreate(kEvent $event)
{
$currency_id_list = $this->Application->GetVar('currency_list');
Index: in-commerce/units/pricing/pricing_event_handler.php
===================================================================
--- in-commerce/units/pricing/pricing_event_handler.php (revision 15111)
+++ in-commerce/units/pricing/pricing_event_handler.php (working copy)
@@ -60,7 +60,7 @@
$this->eventMethods = array_merge($this->eventMethods, $brackets_events);
}
- function PricingBracketsAction(&$event)
+ function PricingBracketsAction($event)
{
$event->redirect=false;
$temp = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -184,7 +184,7 @@
$this->Application->SetVar($event->getPrefixSpecial(true), $temp); // store pr_tang var
}
- function OnPreSaveBrackets(&$event)
+ function OnPreSaveBrackets($event)
{
if( $this->Application->GetVar('pr_tang') ) {
@@ -250,7 +250,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
$bracket =& $event->getObject();
/* @var $bracket kDBItem */
@@ -266,7 +266,7 @@
}
}
- function OnArrangeBrackets(&$event, &$temp, &$bracket)
+ function OnArrangeBrackets($event, &$temp, &$bracket)
{
$temp_orig = $temp;
reset($temp);
@@ -375,7 +375,7 @@
*
* @param kEvent $event
*/
- function OnSetPrimary(&$event)
+ function OnSetPrimary($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$this->StoreSelectedIDs($event);
@@ -398,7 +398,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -421,7 +421,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -458,7 +458,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
$object =& $event->getObject();
/* @var $object kDBList */
Index: in-commerce/units/product_option_combinations/product_option_combinations_config.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_combinations_config.php (revision 15111)
+++ in-commerce/units/product_option_combinations/product_option_combinations_config.php (working copy)
@@ -20,8 +20,8 @@
'EventHandlerClass' => Array ('class' => 'ProductOptionCombinationsEventHandler', 'file' => 'product_option_combinations_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'ProductOptionCombinationsTagProcessor', 'file' => 'product_option_combinations_tag_processor.php', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
- Array ('pseudo' => 'kCombinationFormatter', 'class' => 'kCombinationFormatter', 'file' => 'product_option_formatters.php', 'build_event' => '', 'require_classes' => 'kFormatter'),
- Array ('pseudo' => 'kCombPriceFormatter', 'class' => 'kCombPriceFormatter', 'file' => 'product_option_formatters.php', 'build_event' => '', 'require_classes' => 'kFormatter'),
+ Array ('pseudo' => 'kCombinationFormatter', 'class' => 'kCombinationFormatter', 'file' => 'product_option_formatters.php', 'build_event' => ''),
+ Array ('pseudo' => 'kCombPriceFormatter', 'class' => 'kCombPriceFormatter', 'file' => 'product_option_formatters.php', 'build_event' => ''),
),
'AutoLoad' => true,
'Hooks' => Array (
Index: in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (revision 15111)
+++ in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (working copy)
@@ -23,7 +23,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
if ( $type == 'after' ) {
return;
@@ -61,7 +61,7 @@
*
* @param kEvent $event
*/
- function GetOptionValues(&$event, $option_id)
+ function GetOptionValues($event, $option_id)
{
$object =& $event->getObject();
if ($object->IsTempTable()) {
@@ -74,7 +74,7 @@
return explode(',', $this->Conn->GetOne($query));
}
- function CreateCombinations(&$event, $fields, $current_option=null)
+ function CreateCombinations($event, $fields, $current_option=null)
{
$recursed = false;
$combination = $fields['Combination'];
@@ -117,7 +117,7 @@
}
}
- function UpdateCombinations(&$event, $fields, $current_option=null)
+ function UpdateCombinations($event, $fields, $current_option=null)
{
$recursed = false;
$combination = $fields['Combination'];
@@ -164,7 +164,7 @@
* @return void
* @access protected
*/
- protected function OnCreate(kEvent &$event)
+ protected function OnCreate(kEvent $event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -196,7 +196,7 @@
* @return void
* @access protected
*/
- protected function OnUpdate(kEvent &$event)
+ protected function OnUpdate(kEvent $event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
@@ -241,7 +241,7 @@
* @param kEvent $event
* @access protected
*/
- protected function OnItemBuild(kEvent &$event)
+ protected function OnItemBuild(kEvent $event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -274,7 +274,7 @@
* @return void
* @access protected
*/
- protected function LoadItem(kEvent &$event)
+ protected function LoadItem(kEvent $event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -302,7 +302,7 @@
* @return string
* @access protected
*/
- protected function getMainSpecial(kEvent &$event)
+ protected function getMainSpecial(kEvent $event)
{
$special = $event->getEventParam('main_special');
@@ -325,7 +325,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeClone(kEvent &$event)
+ protected function OnBeforeClone(kEvent $event)
{
parent::OnBeforeClone($event);
@@ -363,7 +363,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeDeleteFromLive(kEvent &$event)
+ protected function OnBeforeDeleteFromLive(kEvent $event)
{
parent::OnBeforeDeleteFromLive($event);
@@ -405,7 +405,7 @@
* @return void
* @access protected
*/
- protected function OnSearch(kEvent &$event)
+ protected function OnSearch(kEvent $event)
{
parent::OnSearch($event);
@@ -419,7 +419,7 @@
* @return void
* @access protected
*/
- protected function OnSearchReset(kEvent &$event)
+ protected function OnSearchReset(kEvent $event)
{
parent::OnSearchReset($event);
@@ -431,7 +431,7 @@
*
* @param kEvent $event
*/
- function _saveProduct(&$event)
+ function _saveProduct($event)
{
$product_id = $this->Application->GetVar('p_id');
Index: in-commerce/units/product_options/product_options_event_handler.php
===================================================================
--- in-commerce/units/product_options/product_options_event_handler.php (revision 15111)
+++ in-commerce/units/product_options/product_options_event_handler.php (working copy)
@@ -23,7 +23,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -46,7 +46,7 @@
* @return void
* @access protected
*/
- protected function OnAfterCopyToLive(kEvent &$event)
+ protected function OnAfterCopyToLive(kEvent $event)
{
parent::OnAfterCopyToLive($event);
@@ -90,7 +90,7 @@
* @return void
* @access protected
*/
- protected function OnAfterClone(kEvent &$event)
+ protected function OnAfterClone(kEvent $event)
{
parent::OnAfterClone($event);
Index: in-commerce/units/products/products_config.php
===================================================================
--- in-commerce/units/products/products_config.php (revision 15111)
+++ in-commerce/units/products/products_config.php (working copy)
@@ -15,10 +15,10 @@
$config = Array (
'Prefix' => 'p',
- 'ItemClass' => Array ('class' => 'ProductsItem', 'file' => 'products_item.php', 'require_classes' => Array ('kCatDBItem'), 'build_event' => 'OnItemBuild'),
+ 'ItemClass' => Array ('class' => 'ProductsItem', 'file' => 'products_item.php', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'ProductsEventHandler', 'file' => 'products_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'ProductsTagProcessor', 'file' => 'products_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ProductsEventHandler', 'file' => 'products_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ProductsTagProcessor', 'file' => 'products_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
Index: in-commerce/units/products/products_event_handler.php
===================================================================
--- in-commerce/units/products/products_event_handler.php (revision 15111)
+++ in-commerce/units/products/products_event_handler.php (working copy)
@@ -76,7 +76,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -105,7 +105,7 @@
* @param kEvent $event
* @access private
*/
- function InventoryAction(&$event)
+ function InventoryAction($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -224,7 +224,7 @@
$this->modifyInventory($action, $product, $qty, $combination_id);
}
- function RunScheduledInventoryActions(&$event)
+ function RunScheduledInventoryActions($event)
{
$inv_actions = $this->Application->GetVar('inventory_actions');
if (!$inv_actions) {
@@ -315,7 +315,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeDeleteFromLive(kEvent &$event)
+ protected function OnBeforeDeleteFromLive(kEvent $event)
{
parent::OnBeforeDeleteFromLive($event);
@@ -348,7 +348,7 @@
* @return void
* @access protected
*/
- protected function clearSelectedIDs(kEvent &$event)
+ protected function clearSelectedIDs(kEvent $event)
{
parent::clearSelectedIDs($event);
@@ -364,7 +364,7 @@
* @return void
* @access protected
*/
- protected function OnSave(kEvent &$event)
+ protected function OnSave(kEvent $event)
{
parent::OnSave($event);
@@ -382,7 +382,7 @@
* @return void
* @access protected
*/
- protected function OnPreCreate(kEvent &$event)
+ protected function OnPreCreate(kEvent $event)
{
parent::onPreCreate($event);
@@ -401,7 +401,7 @@
* @return void
* @access protected
*/
- protected function OnPreSaveAndGo(kEvent &$event)
+ protected function OnPreSaveAndGo(kEvent $event)
{
$event->CallSubEvent('OnPreSave');
$this->LoadItem($event);
@@ -494,7 +494,7 @@
* @param kEvent $event
* @return Array
*/
- function getTypeClauses(&$event)
+ function getTypeClauses($event)
{
$types = $event->getEventParam('types');
$types = $types ? explode(',', $types) : Array ();
@@ -668,7 +668,7 @@
return $type_clauses;
}
- function OnClearRecent(&$event)
+ function OnClearRecent($event)
{
$this->Application->RemoveVar('recent_products');
}
@@ -678,7 +678,7 @@
*
* @param kEvent $event
*/
- function OnRateProduct(&$event)
+ function OnRateProduct($event)
{
$event->SetRedirectParam('pass', 'all,p');
$event->redirect = $this->Application->GetVar('success_template');
@@ -739,7 +739,7 @@
*
* @param kEvent $event
*/
- function OnCancelAction(&$event)
+ function OnCancelAction($event)
{
$event->SetRedirectParam('pass', 'all,p');
$event->redirect = $this->Application->GetVar('cancel_template');
@@ -750,7 +750,7 @@
*
* @param kEvent $event
*/
- function OnRecommendProduct(&$event)
+ function OnRecommendProduct($event)
{
// used for error reporting only -> rewrite code + theme (by Alex)
$object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too
@@ -797,7 +797,7 @@
*
* @param kEvent $event
*/
- function OnSaveVirtualProduct(&$event)
+ function OnSaveVirtualProduct($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$listing_type =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
@@ -861,7 +861,7 @@
*
* @param kEvent $event
*/
- function OnDeleteListingType(&$event)
+ function OnDeleteListingType($event)
{
$listing_type =& $event->MasterEvent->getObject();
/* @var $listing_type kDBItem */
@@ -879,7 +879,7 @@
*
* @param kEvent $event
*/
- function OnSubscriptionApprove(&$event)
+ function OnSubscriptionApprove($event)
{
$field_values = $event->getEventParam('field_values');
$item_data = unserialize($field_values['ItemData']);
@@ -932,7 +932,7 @@
$sub_order->SetDBField('NextCharge_time', $expire);
}
- function OnDownloadableApprove(&$event)
+ function OnDownloadableApprove($event)
{
$field_values = $event->getEventParam('field_values');
$product_id = $field_values['ProductId'];
@@ -943,7 +943,7 @@
$this->Conn->Query($sql);
}
- function OnPackageApprove(&$event){
+ function OnPackageApprove($event){
$field_values = $event->getEventParam('field_values');
$item_data = unserialize($field_values['ItemData']);
$package_content_ids = $item_data['PackageContent'];
@@ -986,7 +986,7 @@
* @return void
* @access protected
*/
- protected function OnPreSave(kEvent &$event)
+ protected function OnPreSave(kEvent $event)
{
$this->CheckRequiredOptions($event);
@@ -1000,7 +1000,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -1014,7 +1014,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -1026,7 +1026,7 @@
*
* @param kEvent $event
*/
- function _updateProductPrice(&$event)
+ function _updateProductPrice($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -1042,7 +1042,7 @@
}
}
- function CheckRequiredOptions(&$event)
+ function CheckRequiredOptions($event)
{
$object =& $event->getObject();
if ($object->GetDBField('ProductId') == '') return ; // if product does not have ID - it's not yet created
@@ -1103,7 +1103,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
@@ -1130,7 +1130,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
@@ -1160,7 +1160,7 @@
*
* @param kEvent $event
*/
- function OnProcessSelected(&$event)
+ function OnProcessSelected($event)
{
$dst_field = $this->Application->RecallVar('dst_field');
@@ -1185,7 +1185,7 @@
*
* @param kEvent $event
*/
- function OnAddToPackage(&$event)
+ function OnAddToPackage($event)
{
$selected_ids = $this->Application->GetVar('selected_ids');
@@ -1217,7 +1217,7 @@
}
- function ProcessPackageItems(&$event)
+ function ProcessPackageItems($event)
{
//$this->Application->SetVar('p_mode', 't');
@@ -1271,7 +1271,7 @@
* @param kEvent $event
*/
- function OnSaveItems(&$event)
+ function OnSaveItems($event)
{
//$event->CallSubEvent('OnUpdate');
$event->redirect = false;
@@ -1283,7 +1283,7 @@
*
* @param kEvent $event
*/
- function OnRemovePackageItem(&$event) {
+ function OnRemovePackageItem($event) {
$this->Application->SetVar('p_mode', 't');
@@ -1318,7 +1318,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemDelete(kEvent &$event)
+ protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
@@ -1342,7 +1342,7 @@
* @return Array
* @access protected
*/
- public function getCustomExportColumns(kEvent &$event)
+ public function getCustomExportColumns(kEvent $event)
{
$columns = parent::getCustomExportColumns($event);
@@ -1359,7 +1359,7 @@
*
* @param kEvent $event
*/
- function setCustomExportColumns(&$event)
+ function setCustomExportColumns($event)
{
parent::setCustomExportColumns($event);
@@ -1369,7 +1369,7 @@
$this->setPrimaryPrice($object->GetID(), (double)$object->GetDBField('Price'), Array ('Cost' => (double)$object->GetDBField('Cost')));
}
- function OnPreSaveAndOpenPopup(&$event)
+ function OnPreSaveAndOpenPopup($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -1395,7 +1395,7 @@
* @return int
* @access public
*/
- public function getPassedID(kEvent &$event)
+ public function getPassedID(kEvent $event)
{
if ( $this->Application->isAdminUser ) {
$event->setEventParam('raise_warnings', 0);
@@ -1427,7 +1427,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -1464,7 +1464,7 @@
* @return void
* @access protected
*/
- protected function OnEdit(kEvent &$event)
+ protected function OnEdit(kEvent $event)
{
$this->Application->RemoveVar('inventory_actions');
@@ -1476,7 +1476,7 @@
*
* @param kEvent $event
*/
- function OnModifyPaidListingConfig(&$event)
+ function OnModifyPaidListingConfig($event)
{
$edit_tab_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'EditTabPresets');
$edit_tab_presets['Default']['shopping_cart'] = Array ('title' => 'la_tab_ShopCartEntry', 't' => 'in-commerce/paid_listings/paid_listing_type_shopcart', 'priority' => 2);
@@ -1490,7 +1490,7 @@
* @return void
* @access protected
*/
- protected function OnCloneSubItem(kEvent &$event)
+ protected function OnCloneSubItem(kEvent $event)
{
parent::OnCloneSubItem($event);
@@ -1516,7 +1516,7 @@
* @return void
* @access protected
*/
- protected function OnAddToCompare(kEvent &$event)
+ protected function OnAddToCompare(kEvent $event)
{
$products = $this->getCompareProducts();
$product_id = (int)$this->Application->GetVar($event->Prefix . '_id');
@@ -1545,7 +1545,7 @@
* @return void
* @access protected
*/
- protected function OnRemoveFromCompare(kEvent &$event)
+ protected function OnRemoveFromCompare(kEvent $event)
{
$products = $this->getCompareProducts();
@@ -1568,7 +1568,7 @@
* @return void
* @access protected
*/
- protected function OnCancelCompare(kEvent &$event)
+ protected function OnCancelCompare(kEvent $event)
{
$this->Application->Session->SetCookie('compare_products', '', -1);
Index: in-commerce/units/reports/reports_event_handler.php
===================================================================
--- in-commerce/units/reports/reports_event_handler.php (revision 15111)
+++ in-commerce/units/reports/reports_event_handler.php (working copy)
@@ -39,7 +39,7 @@
$this->permMapping = array_merge($this->permMapping, $permissions);
}
- function OnRunReport(&$event)
+ function OnRunReport($event)
{
$this->Application->LinkVar('reports_finish_t');
$progress_t = $this->Application->GetVar('progress_t');
@@ -330,7 +330,7 @@
$this->Application->StoreVar('report_options', serialize($field_values));
}
- function OnUpdateConfig(&$event)
+ function OnUpdateConfig($event)
{
$report = $this->Application->RecallVar('report_options');
if (!$report) {
@@ -645,12 +645,12 @@
return $a_ret;
}
- function OnChangeStatistics(&$event)
+ function OnChangeStatistics($event)
{
$this->Application->StoreVar('ChartMetric', $this->Application->GetVar('metric'));
}
- function OnPieChart(&$event)
+ function OnPieChart($event)
{
$ChartHelper =& $this->Application->RecallObject('ChartHelper');
@@ -689,7 +689,7 @@
* @param kEvent $event
*/
- function OnPrintChart(&$event)
+ function OnPrintChart($event)
{
$ChartHelper =& $this->Application->RecallObject('ChartHelper');
@@ -747,7 +747,7 @@
}
- function OnExportReport(&$event)
+ function OnExportReport($event)
{
$report =& $this->Application->recallObject($event->getPrefixSpecial(),'rep_List',Array('skip_counting'=>true,'per_page'=>-1) );
/* @var $report kDBList*/
Index: in-commerce/units/sections/section_eh.php
===================================================================
--- in-commerce/units/sections/section_eh.php (revision 15111)
+++ in-commerce/units/sections/section_eh.php (working copy)
@@ -20,7 +20,7 @@
*
* @param kEvent $event
*/
- function OnModifySiteDomainConfig(&$event)
+ function OnModifySiteDomainConfig($event)
{
$edit_tab_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'EditTabPresets');
$edit_tab_presets['Default']['in-commerce'] = Array (
Index: in-commerce/units/shipping/shipping_event_handler.php
===================================================================
--- in-commerce/units/shipping/shipping_event_handler.php (revision 15111)
+++ in-commerce/units/shipping/shipping_event_handler.php (working copy)
@@ -41,7 +41,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
@@ -76,7 +76,7 @@
* @param kEvent $event
* @return unknown
*/
- function OnApplyModifier(&$event)
+ function OnApplyModifier($event)
{
$cost_object =& $this->Application->recallObject('sc');
/* @var $cost_object kDBItem */
@@ -143,7 +143,7 @@
$this->finalizePopup($event);
}
- function OnFlip(&$event)
+ function OnFlip($event)
{
$object =& $event->getObject();
$aligment = $this->Application->GetLinkedVar('CostsTableAligment');
@@ -164,7 +164,7 @@
* @return void
* @access protected
*/
- protected function OnSave(kEvent &$event)
+ protected function OnSave(kEvent $event)
{
$this->OnAfterItemLoad($event);
@@ -178,7 +178,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -192,7 +192,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -207,14 +207,14 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
$event->CallSubEvent('OnAnyChange');
}
- function OnAnyChange(&$event)
+ function OnAnyChange($event)
{
$sql = 'DELETE FROM ' . TABLE_PREFIX . 'SystemCache
WHERE VarName LIKE "ShippingQuotes%"';
@@ -229,7 +229,7 @@
* @return void
* @access protected
*/
- protected function OnPreSaveCreated(kEvent &$event)
+ protected function OnPreSaveCreated(kEvent $event)
{
parent::OnPreSaveCreated($event);
@@ -239,7 +239,7 @@
$object->SetDBField('PortalGroups', ',' . $this->Application->ConfigValue('User_LoggedInGroup') . ',');
}
- function UpdateGroups(&$event)
+ function UpdateGroups($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -267,7 +267,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
$this->UpdateGroups($event);
}
Index: in-commerce/units/shipping_costs/shipping_costs_event_handler.php
===================================================================
--- in-commerce/units/shipping_costs/shipping_costs_event_handler.php (revision 15111)
+++ in-commerce/units/shipping_costs/shipping_costs_event_handler.php (working copy)
@@ -42,7 +42,7 @@
* @return void
* @access protected
*/
- protected function OnCreate(kEvent &$event)
+ protected function OnCreate(kEvent $event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -87,9 +87,9 @@
*
* @param kEvent $event
*/
- function OnPropagate(&$event)
+ function OnPropagate($event)
{
- // $this->OnCreate(&$event);
+ // $this->OnCreate($event);
$object =& $event->getObject();
@@ -158,11 +158,9 @@
}
}
- /* $shipping_event = new kEvent();
- $shipping_event->Init('s');
- $shipping_event->Name = 'OnPreSave';
+ /*$shipping_event = new kEvent('s:OnPreSave');
$shipping_event->status = kEvent::erFATAL;
- $this->Application->HandleEvent(&$shipping_event);*/
+ $this->Application->HandleEvent($shipping_event);*/
}
/**
@@ -170,7 +168,7 @@
*
* @param kEvent $event
*/
- function OnClearAll(&$event)
+ function OnClearAll($event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -199,7 +197,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
if ( $type == 'before' && $this->Application->GetVar('sc') ) {
$shipping_obj =& $this->Application->recallObject('s');
@@ -226,7 +224,7 @@
*
* @param kEvent $event
*/
- function OnSaveCreated(&$event)
+ function OnSaveCreated($event)
{
$event->CallSubEvent('OnCreate');
$event->redirect = false;
@@ -241,7 +239,7 @@
* @return void
* @access protected
*/
- protected function OnAfterCopyToTemp(kEvent &$event)
+ protected function OnAfterCopyToTemp(kEvent $event)
{
parent::OnAfterCopyToTemp($event);
@@ -274,7 +272,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeCopyToLive(kEvent &$event)
+ protected function OnBeforeCopyToLive(kEvent $event)
{
parent::OnBeforeCopyToLive($event);
Index: in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (revision 15111)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (working copy)
@@ -22,7 +22,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -72,7 +72,7 @@
* @return void
* @access protected
*/
- protected function iterateItems(kEvent &$event)
+ protected function iterateItems(kEvent $event)
{
parent::iterateItems($event);
@@ -89,7 +89,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemLoad(kEvent &$event)
+ protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
@@ -110,7 +110,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemCreate(kEvent &$event)
+ protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
@@ -124,7 +124,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemUpdate(kEvent &$event)
+ protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
@@ -138,7 +138,7 @@
* @return void
* @access protected
*/
- protected function OnAfterItemDelete(kEvent &$event)
+ protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
Index: in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 15111)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (working copy)
@@ -21,10 +21,10 @@
'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
Array ('pseudo' => 'ShippingQuoteEngine', 'class' => 'ShippingQuoteEngine', 'file' => 'shipping_quote_engine.php', 'build_event' => ''),
- Array ('pseudo' => 'CustomShippingQuoteEngine', 'class' => 'CustomShippingQuoteEngine', 'file' => 'custom_shipping_quote_engine.php', 'require_classes' => 'ShippingQuoteEngine', 'build_event' => ''),
- Array ('pseudo' => 'Intershipper', 'class' => 'Intershipper', 'file' => 'intershipper.php', 'require_classes' => 'ShippingQuoteEngine', 'build_event' => ''),
- Array ('pseudo' => 'USPS', 'class' => 'USPS', 'file' => 'usps.php', 'require_classes' => 'ShippingQuoteEngine', 'build_event' => ''),
- Array ('pseudo' => 'ShippingQuoteCollector', 'class' => 'ShippingQuoteCollector', 'file' => 'shipping_quote_collector.php', 'build_event' => '', 'require_classes' => 'ShippingQuoteEngine'),
+ Array ('pseudo' => 'CustomShippingQuoteEngine', 'class' => 'CustomShippingQuoteEngine', 'file' => 'custom_shipping_quote_engine.php', 'build_event' => ''),
+ Array ('pseudo' => 'Intershipper', 'class' => 'Intershipper', 'file' => 'intershipper.php', 'build_event' => ''),
+ Array ('pseudo' => 'USPS', 'class' => 'USPS', 'file' => 'usps.php', 'build_event' => ''),
+ Array ('pseudo' => 'ShippingQuoteCollector', 'class' => 'ShippingQuoteCollector', 'file' => 'shipping_quote_collector.php', 'build_event' => ''),
),
'AutoLoad' => true,
'Hooks' => Array (
Index: in-commerce/units/taxes/taxes_event_handler.php
===================================================================
--- in-commerce/units/taxes/taxes_event_handler.php (revision 15111)
+++ in-commerce/units/taxes/taxes_event_handler.php (working copy)
@@ -64,7 +64,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
$zone_object =& $event->getObject();
/* @var $zone_object kDBItem */
@@ -88,8 +88,7 @@
$this->Application->SetVar('taxdst', $temp);
}
- $dst_event = new kEvent('taxdst:OnCreate');
- $this->Application->HandleEvent($dst_event);
+ $this->Application->HandleEvent(new kEvent('taxdst:OnCreate'));
}
}
@@ -98,7 +97,7 @@
*
* @param kEvent $event
*/
- function OnTypeChange(&$event)
+ function OnTypeChange($event)
{
$this->Application->DeleteVar('taxdst');
$event->CallSubEvent('OnPreSave');
@@ -110,7 +109,7 @@
*
* @param kEvent $event
*/
- function DestinationAction(&$event)
+ function DestinationAction($event)
{
$event->redirect = false;
@@ -238,7 +237,7 @@
$event->CallSubEvent("OnPreSave");
}
- function OnCountryChange(&$event)
+ function OnCountryChange($event)
{
$destinations = &$this->Application->recallObject('taxdst');
Index: in-commerce/units/taxesdestinations/taxes_dst_event_handler.php
===================================================================
--- in-commerce/units/taxesdestinations/taxes_dst_event_handler.php (revision 15111)
+++ in-commerce/units/taxesdestinations/taxes_dst_event_handler.php (working copy)
@@ -20,7 +20,7 @@
*
* @param kEvent $event
*/
- function OnSaveDestinations(&$event)
+ function OnSaveDestinations($event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -71,7 +71,7 @@
* @return void
* @access protected
*/
- protected function OnCreate(kEvent &$event)
+ protected function OnCreate(kEvent $event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -105,7 +105,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
switch ($type) {
case 'before':
@@ -133,9 +133,10 @@
*
* @param kEvent $event
*/
- function OnZoneUpdate(&$event) {
+ function OnZoneUpdate($event) {
- $object = &$event->getObject();
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
$zone_object = &$this->Application->recallObject('tax');
$zone_id = (int)$this->Application->GetVar('tax_id');
Index: in-commerce/units/zones/zones_event_handler.php
===================================================================
--- in-commerce/units/zones/zones_event_handler.php (revision 15111)
+++ in-commerce/units/zones/zones_event_handler.php (working copy)
@@ -64,7 +64,7 @@
* @return void
* @access protected
*/
- protected function customProcessing(kEvent &$event, $type)
+ protected function customProcessing(kEvent $event, $type)
{
$zone_object =& $event->getObject();
/* @var $zone_object kDBItem */
@@ -93,8 +93,7 @@
$this->Application->SetVar('dst', $temp);
}
- $dst_event = new kEvent('dst:OnCreate');
- $this->Application->HandleEvent($dst_event);
+ $this->Application->HandleEvent(new kEvent('dst:OnCreate'));
break;
}
}
@@ -104,7 +103,7 @@
*
* @param kEvent $event
*/
- function OnTypeChange(&$event)
+ function OnTypeChange($event)
{
$this->Application->DeleteVar('dst');
@@ -117,7 +116,7 @@
*
* @param kEvent $event
*/
- function DestinationAction(&$event)
+ function DestinationAction($event)
{
$event->redirect = false;
@@ -219,7 +218,7 @@
}
}
- function OnCountryChange(&$event)
+ function OnCountryChange($event)
{
$destinations = &$this->Application->recallObject('dst');
@@ -239,7 +238,7 @@
* @return void
* @access protected
*/
- protected function OnCancel(kEvent &$event)
+ protected function OnCancel(kEvent $event)
{
parent::OnCancel($event);
@@ -266,7 +265,7 @@
* @return void
* @access protected
*/
- protected function OnNew(kEvent &$event)
+ protected function OnNew(kEvent $event)
{
parent::OnNew($event);
Index: in-link/units/helpers/helpers_config.php
===================================================================
--- in-link/units/helpers/helpers_config.php (revision 15111)
+++ in-link/units/helpers/helpers_config.php (working copy)
@@ -19,6 +19,6 @@
'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
- Array ('pseudo' => 'LinkHelper', 'class' => 'LinkHelper', 'file' => 'link_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
+ Array ('pseudo' => 'LinkHelper', 'class' => 'LinkHelper', 'file' => 'link_helper.php', 'build_event' => ''),
),
);
\ No newline at end of file
Index: in-link/units/l-visits/l-visit_eh.php
===================================================================
--- in-link/units/l-visits/l-visit_eh.php (revision 15111)
+++ in-link/units/l-visits/l-visit_eh.php (working copy)
@@ -21,7 +21,7 @@
*
* @param kEvent $event
*/
- function OnDeleteVisits(&$event)
+ function OnDeleteVisits($event)
{
$key_field = $event->MasterEvent->Prefix == 'u' ? 'PortalUserId' : 'ResourceId';
$table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
Index: in-link/units/link_validation/link_validation_eh.php
===================================================================
--- in-link/units/link_validation/link_validation_eh.php (revision 15111)
+++ in-link/units/link_validation/link_validation_eh.php (working copy)
@@ -66,7 +66,7 @@
* @return bool
* @access public
*/
- public function CheckPermission(kEvent &$event)
+ public function CheckPermission(kEvent $event)
{
$check_events = Array ('OnApproveLinks', 'OnDeclineLinks', 'OnDeleteLinks');
@@ -107,7 +107,7 @@
* @return void
* @access protected
*/
- protected function prepareObject(&$object, kEvent &$event)
+ protected function prepareObject(&$object, kEvent $event)
{
parent::prepareObject($object, $event);
@@ -122,7 +122,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -141,7 +141,7 @@
*
* @param kEvent $event
*/
- function OnRestartValidation(&$event)
+ function OnRestartValidation($event)
{
$this->_resetValidation($event);
@@ -153,7 +153,7 @@
*
* @param kEvent $event
*/
- function _resetValidation(&$event)
+ function _resetValidation($event)
{
// 1. delete previous validation results
$sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . '
@@ -173,7 +173,7 @@
*
* @param kEvent $event
*/
- function OnValidateSelected(&$event)
+ function OnValidateSelected($event)
{
$link_ids = $this->_getSelectedIds($event);
if (!$link_ids) {
@@ -195,7 +195,7 @@
*
* @param kEvent $event
*/
- function OnContinueValidation(&$event)
+ function OnContinueValidation($event)
{
$have_data = $this->_prepareValidation($event);
if ($have_data) {
@@ -209,7 +209,7 @@
* @param kEvent $event
* @param bool $from_ajax
*/
- function _validate(&$event, $from_ajax = true)
+ function _validate($event, $from_ajax = true)
{
$validation_data = unserialize( $this->Application->RecallVar($event->Prefix . '_status') );
@@ -253,7 +253,7 @@
*
* @param kEvent $event
*/
- function OnValidateProgress(&$event)
+ function OnValidateProgress($event)
{
$done = $this->_validate($event, true);
@@ -362,7 +362,7 @@
*
* @param kEvent $event
*/
- function OnCancelValidation(&$event)
+ function OnCancelValidation($event)
{
$this->Application->RemoveVar($event->Prefix . '_status');
}
@@ -372,7 +372,7 @@
*
* @param kEvent $event
*/
- function OnResetValidationStatus(&$event)
+ function OnResetValidationStatus($event)
{
$ids = $this->_getSelectedIds($event, true);
if (!$ids) {
@@ -392,7 +392,7 @@
* @param bool $transform convert link ids to link validation ids
* @return Array
*/
- function _getSelectedIds(&$event, $transform = false)
+ function _getSelectedIds($event, $transform = false)
{
$ids = Array();
@@ -423,7 +423,7 @@
* @return void
* @access protected
*/
- protected function iterateItems(kEvent &$event)
+ protected function iterateItems(kEvent $event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
@@ -465,7 +465,7 @@
*
* @param kEvent $event
*/
- function OnDeleteLinks(&$event)
+ function OnDeleteLinks($event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
@@ -488,7 +488,7 @@
*
* @param kEvent $event
*/
- function OnPrepareLinkEditing(&$event)
+ function OnPrepareLinkEditing($event)
{
// hook to OnAfterConfigRead instead of OnEdit, because fake ids should be available in CheckPermission
if ($this->Application->GetVar('l_event') != 'OnEdit') {
@@ -513,7 +513,7 @@
*
* @return bool
*/
- function _prepareValidation(&$event)
+ function _prepareValidation($event)
{
// 2. get ids of all links and put them into validation queue
$id_field = $this->Application->getUnitOption('l', 'IDField');
@@ -540,7 +540,7 @@
*
* @param kEvent $event
*/
- function OnCronValidation(&$event)
+ function OnCronValidation($event)
{
$this->_resetValidation($event); // remove this for continuing to non validated before links
@@ -559,7 +559,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
Index: in-link/units/links/links_config.php
===================================================================
--- in-link/units/links/links_config.php (revision 15111)
+++ in-link/units/links/links_config.php (working copy)
@@ -18,8 +18,8 @@
'Prefix' => 'l',
'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'LinksEventHandler', 'file' => 'links_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'LinkTagProcessor', 'file' => 'link_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'),
+ 'EventHandlerClass' => Array ('class' => 'LinksEventHandler', 'file' => 'links_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'LinkTagProcessor', 'file' => 'link_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'ConfigPriority' => 0,
Index: in-link/units/links/links_event_handler.php
===================================================================
--- in-link/units/links/links_event_handler.php (revision 15111)
+++ in-link/units/links/links_event_handler.php (working copy)
@@ -46,7 +46,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -93,7 +93,7 @@
*
* @param kEvent $event
*/
- function OnSetGrouping(&$event)
+ function OnSetGrouping($event)
{
$this->Application->LinkVar($event->getPrefixSpecial(true).'_dupe_fields', $event->getPrefixSpecial().'_dupe_fields');
}
@@ -103,7 +103,7 @@
*
* @param kEvent $event
*/
- function OnMerge(&$event)
+ function OnMerge($event)
{
$link_helper =& $this->Application->recallObject('LinkHelper');
/* @var $link_helper LinkHelper */
@@ -194,7 +194,7 @@
* @return void
* @access protected
*/
- protected function OnStoreSelected(kEvent &$event)
+ protected function OnStoreSelected(kEvent $event)
{
$this->StoreSelectedIDs($event);
@@ -208,7 +208,7 @@
* @return void
* @access protected
*/
- protected function OnCreate(kEvent &$event)
+ protected function OnCreate(kEvent $event)
{
parent::OnCreate($event);
@@ -241,7 +241,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
@@ -274,7 +274,7 @@
*
* @param kEvent $event
*/
- function OnContactFormSubmit(&$event)
+ function OnContactFormSubmit($event)
{
$fields = Array (
'ContactFormFullName', 'ContactFormEmail', 'ContactFormSubject', 'ContactFormBody', 'ContactFormCaptcha'
@@ -357,7 +357,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -371,7 +371,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -383,7 +383,7 @@
*
* @param kEvent $event
*/
- function _checkLink(&$event)
+ function _checkLink($event)
{
if (!$this->Application->ConfigValue('ReciprocalLinkChecking')) {
return ;
@@ -413,7 +413,7 @@
*
* @param kEvent $event
*/
- function OnProcessReciprocalLinks(&$event)
+ function OnProcessReciprocalLinks($event)
{
if ( !$this->Application->ConfigValue('ReciprocalLinkChecking') ) {
return;
@@ -481,7 +481,7 @@
* @return int
* @access public
*/
- public function getPassedID(kEvent &$event)
+ public function getPassedID(kEvent $event)
{
$id = parent::getPassedID($event);
@@ -522,7 +522,7 @@
* @return void
* @access protected
*/
- protected function OnCloneSubItem(kEvent &$event)
+ protected function OnCloneSubItem(kEvent $event)
{
parent::OnCloneSubItem($event);
@@ -553,7 +553,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeDeleteOriginal(kEvent &$event)
+ protected function OnBeforeDeleteOriginal(kEvent $event)
{
parent::OnBeforeDeleteOriginal($event);
@@ -579,7 +579,7 @@
* @return void
* @access protected
*/
- protected function OnAfterDeleteOriginal(kEvent &$event)
+ protected function OnAfterDeleteOriginal(kEvent $event)
{
parent::OnAfterDeleteOriginal($event);
Index: in-link/units/listing_types/listing_types_event_handler.php
===================================================================
--- in-link/units/listing_types/listing_types_event_handler.php (revision 15111)
+++ in-link/units/listing_types/listing_types_event_handler.php (working copy)
@@ -39,7 +39,7 @@
*
* @param kEvent $event
*/
- function OnProcessSelected(&$event)
+ function OnProcessSelected($event)
{
$object =& $event->getObject();
$selected_ids = $this->Application->GetVar('selected_ids');
@@ -52,7 +52,7 @@
}
- function OnPreSaveListingType(&$event)
+ function OnPreSaveListingType($event)
{
$event->redirect = false;
$object =& $event->getObject( Array('skip_autoload' => true) );
@@ -69,7 +69,7 @@
* @return void
* @access protected
*/
- protected function OnEdit(kEvent &$event)
+ protected function OnEdit(kEvent $event)
{
if ( $this->Application->prefixRegistred('p') ) {
$this->Application->recallObject('p', null, Array ('skip_autoload' => true));
@@ -85,7 +85,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
Index: in-link/units/listings/listings_event_handler.php
===================================================================
--- in-link/units/listings/listings_event_handler.php (revision 15111)
+++ in-link/units/listings/listings_event_handler.php (working copy)
@@ -42,7 +42,7 @@
*
* @param kEvent $event
*/
- function OnProcessSelected(&$event)
+ function OnProcessSelected($event)
{
$object =& $event->getObject();
@@ -62,7 +62,7 @@
$this->finalizePopup($event);
}
- function OnPreSaveListing(&$event)
+ function OnPreSaveListing($event)
{
$event->redirect=false;
$object =& $event->getObject( Array('skip_autoload' => true) );
@@ -80,7 +80,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -97,7 +97,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -118,7 +118,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeDeleteFromLive(kEvent &$event)
+ protected function OnBeforeDeleteFromLive(kEvent $event)
{
parent::OnBeforeDeleteFromLive($event);
@@ -269,7 +269,7 @@
*
* @param kEvent $event
*/
- function OnRequestEnhancement(&$event)
+ function OnRequestEnhancement($event)
{
if ($this->Application->isModuleEnabled('In-Commerce')) {
$l_info = $this->Application->GetVar('l');
@@ -303,7 +303,7 @@
*
* @param kEvent $event
*/
- function OnListingCreate(&$event)
+ function OnListingCreate($event)
{
$new_processing = false;
$link_id = $listing_type_id = 0;
@@ -433,7 +433,7 @@
*
* @param kEvent $event
*/
- function EnhancedLinkOnCompleteOrder(&$event)
+ function EnhancedLinkOnCompleteOrder($event)
{
// create enhancement, but pending
$this->OnListingCreate($event);
@@ -456,7 +456,7 @@
*
* @param kEvent $event
*/
- function EnhanceLinkAfterOrderApprove(&$event)
+ function EnhanceLinkAfterOrderApprove($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
@@ -493,7 +493,7 @@
*
* @param kEvent $event
*/
- function EnhanceLinkAfterOrderDeny(&$event)
+ function EnhanceLinkAfterOrderDeny($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$fields = $event->getEventParam('field_values');
@@ -509,7 +509,7 @@
*
* @param kEvent $event
*/
- function ExpireLink(&$event)
+ function ExpireLink($event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -541,7 +541,7 @@
* @return void
* @access protected
*/
- protected function iterateItems(kEvent &$event)
+ protected function iterateItems(kEvent $event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -635,7 +635,7 @@
* @return void
* @access protected
*/
- protected function OnCancel(kEvent &$event)
+ protected function OnCancel(kEvent $event)
{
parent::OnCancel($event);
@@ -651,7 +651,7 @@
* @param kEvent $event
* @return mixed
*/
- function verifyListingOwner(&$event)
+ function verifyListingOwner($event)
{
$link_id = $this->Application->GetVar('l_id');
$user_id = $this->Application->RecallVar('user_id');
@@ -672,7 +672,7 @@
return $this->Conn->GetOne($sql);
}
- function OnExtendEnhancement(&$event)
+ function OnExtendEnhancement($event)
{
$listing_id = $this->verifyListingOwner($event);
if (!$listing_id) {
@@ -697,7 +697,7 @@
*
* @param kEvent $event
*/
- function OnCancelEnhancement(&$event)
+ function OnCancelEnhancement($event)
{
$listing_id = $this->verifyListingOwner($event);
if ( !$listing_id ) {
@@ -727,7 +727,7 @@
*
* @param kEvent $event
*/
- function OnCheckExpiredPaidListings(&$event)
+ function OnCheckExpiredPaidListings($event)
{
$sql = 'SELECT ListingId FROM '.$this->Application->getUnitOption($event->Prefix, 'TableName').'
WHERE ExpiresOn < '.adodb_mktime().' AND Status = 1';
@@ -784,7 +784,7 @@
* @return void
* @access protected
*/
- protected function OnMassDelete(kEvent &$event)
+ protected function OnMassDelete(kEvent $event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
@@ -807,7 +807,7 @@
*
* @param kEvent $event
*/
- function OnMoveEnhancement(&$event)
+ function OnMoveEnhancement($event)
{
$id_field = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'IDField');
$item_table_name = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TableName');
@@ -834,7 +834,7 @@
* @return void
* @access protected
*/
- protected function OnAfterConfigRead(kEvent &$event)
+ protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
Index: in-news/units/articles/articles_config.php
===================================================================
--- in-news/units/articles/articles_config.php (revision 15111)
+++ in-news/units/articles/articles_config.php (working copy)
@@ -19,8 +19,8 @@
'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'),
- 'EventHandlerClass' => Array ('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'),
- 'TagProcessorClass' => Array ('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ArticlesEventHandler', 'file' => 'articles_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ArticlesTagProcessor', 'file' => 'articles_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'ConfigPriority' => 0,
Index: in-news/units/articles/articles_event_handler.php
===================================================================
--- in-news/units/articles/articles_event_handler.php (revision 15111)
+++ in-news/units/articles/articles_event_handler.php (working copy)
@@ -24,7 +24,7 @@
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
- protected function SetCustomQuery(kEvent &$event)
+ protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
@@ -43,7 +43,7 @@
* @param kEvent $event
* @return Array
*/
- function getTypeClauses(&$event)
+ function getTypeClauses($event)
{
$type_clauses = parent::getTypeClauses($event);
@@ -64,7 +64,7 @@
*
* @param kEvent $event
*/
- function OnUpdateRSSArticles(&$event)
+ function OnUpdateRSSArticles($event)
{
if ( defined('IS_INSTALL') && IS_INSTALL ) {
return;
@@ -148,7 +148,7 @@
* @param kEvent $event
* @return Array
*/
- function getFeedArticles(&$event)
+ function getFeedArticles($event)
{
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
$table = $this->Application->getUnitOption($event->Prefix, 'TableName');
@@ -168,7 +168,7 @@
*
* @param kEvent $event
*/
- function parseFeed(&$event)
+ function parseFeed($event)
{
$source_urls = explode(',', $event->getEventParam('source_url'));
if (count($source_urls) > 1) {
@@ -262,7 +262,7 @@
* @param kXMLNode $root_node
* @param kEvent $event
*/
- function parseRssFeed(&$root_node, &$event)
+ function parseRssFeed(&$root_node, $event)
{
$current_node = $root_node->firstChild;
$feed_articles = $this->getFeedArticles($event);
@@ -350,7 +350,7 @@
* @param kXMLNode $root_node
* @param kEvent $event
*/
- function parseAtomFeed(&$root_node, &$event)
+ function parseAtomFeed(&$root_node, $event)
{
$current_node = $root_node->firstChild;
$feed_articles = $this->getFeedArticles($event);
@@ -426,7 +426,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemUpdate(kEvent &$event)
+ protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
@@ -441,7 +441,7 @@
* @return void
* @access protected
*/
- protected function OnBeforeItemCreate(kEvent &$event)
+ protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
@@ -454,7 +454,7 @@
*
* @param kEvent $event
*/
- function createExcerpt(&$event)
+ function createExcerpt($event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
@@ -497,7 +497,7 @@
*
* @param kEvent $event
*/
- function OnUpdateCategoryCustomFields(&$event)
+ function OnUpdateCategoryCustomFields($event)
{
$new_virtual_fields = Array(
'cust_RssSource' => Array('type' => 'string', 'default' => ''),
@@ -523,7 +523,7 @@
* @return void
* @access protected
*/
- protected function OnPreCreate(kEvent &$event)
+ protected function OnPreCreate(kEvent $event)
{
parent::OnPreCreate($event);
@@ -549,7 +549,7 @@
* @return void
* @access protected
*/
- protected function OnCloneSubItem(kEvent &$event)
+ protected function OnCloneSubItem(kEvent $event)
{
parent::OnCloneSubItem($event);
removing_references_in_makeclass_recallobject_core.patch [^] (294,978 bytes) 2012-03-04 02:05
removing_references_in_makeclass_recallobject_modules.patch [^] (210,600 bytes) 2012-03-04 02:05
[Show Content]
Index: custom/units/widgets/widget_eh.php
===================================================================
--- custom/units/widgets/widget_eh.php (revision 15131)
+++ custom/units/widgets/widget_eh.php (working copy)
@@ -234,7 +234,7 @@
$params['pass_template'] = false;
}
- $rewrite_processor =& $this->Application->recallObject('kRewriteUrlProcessor');
+ $rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor');
/* @var $rewrite_processor kRewriteUrlProcessor */
$processed_params = $rewrite_processor->getProcessedParams($prefix, $params, $keep_events);
@@ -280,7 +280,7 @@
$id = $this->Conn->GetOne($sql);
$to_parse = $url_parts;
- $rewrite_processor =& $this->Application->recallObject('kRewriteUrlProcessor');
+ $rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor');
/* @var $rewrite_processor kRewriteUrlProcessor */
if ($id > 0) {
Index: in-auction/units/category_listing/category_listing_eh.php
===================================================================
--- in-auction/units/category_listing/category_listing_eh.php (revision 15132)
+++ in-auction/units/category_listing/category_listing_eh.php (working copy)
@@ -117,7 +117,7 @@
if ($object->GetDBField('AuctionPrimaryCategoryId'))
{
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
$object->SetDBField('CustomItemSpecifics', $CatSelectHelper->GetCustomItemSpecificsInput());
Index: in-auction/units/category_listing/category_listing_tp.php
===================================================================
--- in-auction/units/category_listing/category_listing_tp.php (revision 15111)
+++ in-auction/units/category_listing/category_listing_tp.php (working copy)
@@ -32,7 +32,7 @@
function RenderShipping($block_params)
{
- $object =& $this->Application->recallObject('c');
+ $object = $this->Application->recallObject('c');
$block_params['ResourceId'] = $object->GetDBField('ResourceId');
return $this->Application->ParseBlock($block_params);
}
@@ -42,7 +42,7 @@
{
$Object =& $this->getObject($params);
$params['prefix'] = $this->Prefix;
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
return $CatSelectHelper->GetSelectorHTML($params, $Object);
}
@@ -51,7 +51,7 @@
{
$Object =& $this->getObject($params);
$params['prefix'] = $this->Prefix;
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
return $CatSelectHelper->GetSelectorHTML2($params, $Object);
}
@@ -60,7 +60,7 @@
{
$Object =& $this->getObject($params);
$params['prefix'] = $this->Prefix;
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
return $CatSelectHelper->GetItemSpecificsHTML($params, $Object);
}
@@ -68,7 +68,7 @@
function IsSecondLevelProductCategory($params)
{
$parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix');
- $category =& $this->Application->recallObject($parent_prefix);
+ $category = $this->Application->recallObject($parent_prefix);
/* @var $category kDBItem */
$products_category_id = $this->Application->findModule('Name', 'In-Commerce', 'RootCat');
@@ -79,7 +79,7 @@
function IsProductsCategory($params)
{
$parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix');
- $category =& $this->Application->recallObject($parent_prefix);
+ $category = $this->Application->recallObject($parent_prefix);
/* @var $category kDBItem */
$products_category_id = $this->Application->findModule('Name', 'In-Commerce', 'RootCat');
@@ -111,7 +111,7 @@
$a_products_cat = $this->Conn->GetRow($sql);
$parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix');
- $category =& $this->Application->recallObject($parent_prefix);
+ $category = $this->Application->recallObject($parent_prefix);
/* @var $category kDBItem */
if ($category->GetID() == $products_category_id)
Index: in-auction/units/error_log/error_log_eh.php
===================================================================
--- in-auction/units/error_log/error_log_eh.php (revision 15132)
+++ in-auction/units/error_log/error_log_eh.php (working copy)
@@ -74,7 +74,7 @@
// get current list without per_page
- $list =& $this->Application->recallObject($event->getPrefixSpecial(), 'err-ebay_List', Array ('per_page' => -1, 'skip_counting' => true));
+ $list = $this->Application->recallObject($event->getPrefixSpecial(), 'err-ebay_List', Array ('per_page' => -1, 'skip_counting' => true));
/* @var $list kDBList */
$list->Query();
@@ -86,7 +86,7 @@
return;
}
- $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($event->Prefix, $event->Special, $ids);
Index: in-auction/units/helpers/catselect_helper.php
===================================================================
--- in-auction/units/helpers/catselect_helper.php (revision 15111)
+++ in-auction/units/helpers/catselect_helper.php (working copy)
@@ -242,7 +242,7 @@
{
$a_structure = Array();
- $XMLHelper =& $this->Application->recallObject('XMLHelper');
+ $XMLHelper = $this->Application->recallObject('XMLHelper');
/* @var $XMLHelper XMLHelper*/
@@ -438,7 +438,7 @@
return '';
}
- $XMLHelper =& $this->Application->recallObject('XMLHelper');
+ $XMLHelper = $this->Application->recallObject('XMLHelper');
/* @var $XMLHelper XMLHelper*/
$a_xml = $XMLHelper->xml2array($xml);
// echo '<pre>';
Index: in-auction/units/helpers/ebay_helper.php
===================================================================
--- in-auction/units/helpers/ebay_helper.php (revision 15111)
+++ in-auction/units/helpers/ebay_helper.php (working copy)
@@ -413,7 +413,7 @@
)
{
// set prices by products pricing
- $Product =& $this->Application->recallObject('p');
+ $Product = $this->Application->recallObject('p');
$Product->Load($product_id);
$price = $Product->GetDBField('Price');
if ($a_listing['AuctionStartPrice'] == 0)
Index: in-auction/units/listing/listing_eh.php
===================================================================
--- in-auction/units/listing/listing_eh.php (revision 15132)
+++ in-auction/units/listing/listing_eh.php (working copy)
@@ -67,12 +67,12 @@
$this->Application->RemoveVar('clipboard');
// preset values for each product
- $candidate_products =& $this->Application->recallObject('l-ebay.add', 'l-ebay_List', Array ('per_page' => -1));
+ $candidate_products = $this->Application->recallObject('l-ebay.add', 'l-ebay_List', Array ('per_page' => -1));
/* @var $candidate_products kDBList */
$candidate_products->Query();
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper */
$candidate_products->GoFirst();
@@ -173,7 +173,7 @@
// get current list without per_page
- $list =& $this->Application->recallObject($event->getPrefixSpecial(), 'l-ebay_List', Array ('per_page' => -1, 'skip_counting' => true));
+ $list = $this->Application->recallObject($event->getPrefixSpecial(), 'l-ebay_List', Array ('per_page' => -1, 'skip_counting' => true));
/* @var $list kDBList */
$list->Query();
@@ -187,7 +187,7 @@
return;
}
- $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($event->Prefix, $event->Special, $ids);
@@ -230,13 +230,13 @@
if (!$this->Application->isAdminUser) {
return;
}
- $listing_items =& $this->Application->recallObject('l-ebay.add','l-ebay_List',Array('skip_counting'=>true,'per_page'=>-1) );
+ $listing_items = $this->Application->recallObject('l-ebay.add','l-ebay_List',Array('skip_counting'=>true,'per_page'=>-1) );
/* @var $listing_items kDBList */
$listing_items->Query();
$listing_items->GoFirst();
- $listing_object =& $this->Application->recallObject('l-ebay', null, Array('skip_autoload' => true));
+ $listing_object = $this->Application->recallObject('l-ebay', null, Array('skip_autoload' => true));
/* @var $listing_object kDBItem */
$all_valid = 1;
@@ -433,11 +433,11 @@
$a_domestic_shipping_services = $this->Conn->GetCol($sql);
- $Product =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
- $ProductListing =& $this->Application->recallObject('p-ebay.item', null, Array('skip_autoload' => true));
+ $Product = $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+ $ProductListing = $this->Application->recallObject('p-ebay.item', null, Array('skip_autoload' => true));
/* @var $ProductListing kDBItem */
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
@@ -517,7 +517,7 @@
$country = $this->Application->ConfigValue('Comm_Shipping_Country'); // as USA
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
// Convert to 2-symbol - as US
@@ -1068,7 +1068,7 @@
function OnStoreToLog($event)
{
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$eBayHelper->StoreToLog();
@@ -1131,7 +1131,7 @@
$a_items = $this->Conn->GetCol($sql);
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper */
foreach ($a_items AS $item_id)
@@ -1157,7 +1157,7 @@
// get current list without per_page
- $list =& $this->Application->recallObject($event->getPrefixSpecial(), 'l-ebay_List', Array('per_page'=>-1, 'skip_counting'=>true) );
+ $list = $this->Application->recallObject($event->getPrefixSpecial(), 'l-ebay_List', Array('per_page'=>-1, 'skip_counting'=>true) );
/* @var $list kDBList */
$list->Query();
@@ -1302,7 +1302,7 @@
if (!$this->Application->isAdminUser) {
return;
}
- $ChartHelper =& $this->Application->RecallObject('ChartHelper');
+ $ChartHelper = $this->Application->recallObject('ChartHelper');
header("Content-type: image/png");
Index: in-auction/units/listing/listing_tp.php
===================================================================
--- in-auction/units/listing/listing_tp.php (revision 15111)
+++ in-auction/units/listing/listing_tp.php (working copy)
@@ -83,7 +83,7 @@
// $object =& $this->Get
return 0;
- $list =& $this->Application->recallObject('l-ebay.add', 'l-ebay_List');
+ $list = $this->Application->recallObject('l-ebay.add', 'l-ebay_List');
/* @var $list kDBList */
$cur_rec =& $list->getCurrentRecord();
@@ -106,7 +106,7 @@
if (!isset($a_values[$product_id]))
{
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$a_values[$product_id] =& $eBayHelper->GetProductParams($product_id);
@@ -187,7 +187,7 @@
function ProductLastComplexStatus($params)
{
- $products =& $this->Application->recallObject($params['PrefixSpecial'],'p_List');
+ $products = $this->Application->recallObject($params['PrefixSpecial'],'p_List');
/* @var $products kDBList*/
$a_product =& $products->getCurrentRecord();
@@ -232,7 +232,7 @@
function ProductLastIsPartiallySold($params)
{
- $products =& $this->Application->recallObject($params['PrefixSpecial'],'p_List');
+ $products = $this->Application->recallObject($params['PrefixSpecial'],'p_List');
/* @var $products kDBList*/
$a_product =& $products->getCurrentRecord();
@@ -254,7 +254,7 @@
function ListingLink($params)
{
- $products =& $this->Application->recallObject($params['PrefixSpecial'],'p_List');
+ $products = $this->Application->recallObject($params['PrefixSpecial'],'p_List');
/* @var $products kDBList*/
$a_product =& $products->getCurrentRecord();
@@ -289,7 +289,7 @@
$metric = 1;
}
- $object =& $this->Application->recallObject('l-ebay', null, Array('skip_autoload' => true));
+ $object = $this->Application->recallObject('l-ebay', null, Array('skip_autoload' => true));
/* @var $object kDBItem */
$object->setID(1);
Index: in-auction/units/product_listing/product_listing_eh.php
===================================================================
--- in-auction/units/product_listing/product_listing_eh.php (revision 15132)
+++ in-auction/units/product_listing/product_listing_eh.php (working copy)
@@ -96,7 +96,7 @@
$object =& $event->getObject();
/* @var $object kDBItem */
- $Product =& $this->Application->recallObject('p');
+ $Product = $this->Application->recallObject('p');
/* @var $Product ProductsItem */
if ( is_null($object->GetDBField('ListingDescription')) ) {
@@ -142,7 +142,7 @@
if ($object->GetDBField('AuctionPrimaryCategoryId'))
{
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
$object->SetDBField('CustomItemSpecifics', $CatSelectHelper->GetCustomItemSpecificsInput());
@@ -370,7 +370,7 @@
$template_id = $listing_info[$productListingID]['DetailTemplateId'];
$product_id = $listing_info[$productListingID]['ProductId'];
- $Product =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+ $Product = $this->Application->recallObject('p', null, Array('skip_autoload' => true));
$Product->Load($product_id);
// Parse description (with product 'p' tags possible)
$sql = 'SELECT TemplateBody
Index: in-auction/units/product_listing/product_listing_tp.php
===================================================================
--- in-auction/units/product_listing/product_listing_tp.php (revision 15111)
+++ in-auction/units/product_listing/product_listing_tp.php (working copy)
@@ -32,7 +32,7 @@
function RenderShipping($block_params)
{
- $object =& $this->Application->recallObject('p');
+ $object = $this->Application->recallObject('p');
$block_params['ResourceId'] = $object->GetDBField('ResourceId');
return $this->Application->ParseBlock($block_params);
}
@@ -41,7 +41,7 @@
{
return $this->Application->RecallVar('preview_ebay_description');
// load objects
-// $ProductListing =& $this->Application->recallObject('p-ebay');
+// $ProductListing = $this->Application->recallObject('p-ebay');
$ProductListing =& $this->getObject($params);
/* @var $ProductListing kDBItem */
@@ -70,7 +70,7 @@
if ($description == '')
{
- $Product =& $this->Application->recallObject('p');
+ $Product = $this->Application->recallObject('p');
$description = $Product->GetDBField('l1_Description');
}
@@ -82,14 +82,14 @@
{
$Object =& $this->getObject($params);
$params['prefix'] = $this->Prefix;
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
return $CatSelectHelper->GetSelectorHTML($params, $Object);
}
function GetCurrentImagePriority($params)
{
- $ImagesList =& $this->Application->recallObject('img','img_List');
+ $ImagesList = $this->Application->recallObject('img','img_List');
/* @var $ImagesList kDBList*/
$image_id = $ImagesList->GetDBField('ImageId');
$Object =& $this->getObject($params);
@@ -101,7 +101,7 @@
{
$Object =& $this->getObject($params);
$params['prefix'] = $this->Prefix;
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
return $CatSelectHelper->GetSelectorHTML2($params, $Object);
}
@@ -110,7 +110,7 @@
{
$Object =& $this->getObject($params);
$params['prefix'] = $this->Prefix;
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
return $CatSelectHelper->GetItemSpecificsHTML($params, $Object);
}
Index: in-auction/units/sections/ebay_eh.php
===================================================================
--- in-auction/units/sections/ebay_eh.php (revision 15132)
+++ in-auction/units/sections/ebay_eh.php (working copy)
@@ -221,7 +221,7 @@
*/
function OnAfterSaveProduct($event)
{
- $temp_handler =& $this->Application->recallObject($event->MasterEvent->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->MasterEvent->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$sql = 'SELECT Images, ProductId
@@ -403,7 +403,7 @@
'PaymentMethodUsed' => $this->GetEBayPaymentMethod($a_order),
);
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
*/
/* @var $eBayHelper eBayHelper*/
@@ -449,7 +449,7 @@
}
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$a_params = array(
@@ -495,7 +495,7 @@
{
// $this->AddEbayUser('alex-intechnic','110024859878');
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
// $a_params = Array(
@@ -611,7 +611,7 @@
function CreateUser(&$Buyer)
{
- $User =& $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
+ $User = $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
/* @var $User kDBItem */
$User->Clear();
@@ -673,7 +673,7 @@
// add address
- $Addr =& $this->Application->recallObject('addr.item', null, Array('skip_autoload' => true));
+ $Addr = $this->Application->recallObject('addr.item', null, Array('skip_autoload' => true));
$Addr->Clear();
$Addr->SetDBField('To', $Address->Name);
@@ -872,7 +872,7 @@
function GetCategorySpecifics()
{
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
// Get Categories which supports item specifics
@@ -937,7 +937,7 @@
function UpdateCategorySpecifics($a_cats)
{
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$a_params = array(
@@ -1067,7 +1067,7 @@
function GetCategories($level_limit = 0, $parent_id = 0)
{
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$a_params = array(
@@ -1094,7 +1094,7 @@
{
set_time_limit(0);
ini_set('memory_limit', '200M');
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$a_params = array(
@@ -1155,7 +1155,7 @@
$tag = 'CharacteristicsSet';
$end_tag = '</'.$tag.'>';
- $XMLHelper =& $this->Application->recallObject('XMLHelper');
+ $XMLHelper = $this->Application->recallObject('XMLHelper');
/* @var $XMLHelper XMLHelper*/
while (true)
@@ -1206,7 +1206,7 @@
$tag = 'CategoryMapping';
$end_tag = '</'.$tag.'>';
- $XMLHelper =& $this->Application->recallObject('XMLHelper');
+ $XMLHelper = $this->Application->recallObject('XMLHelper');
/* @var $XMLHelper XMLHelper*/
@@ -1295,7 +1295,7 @@
$tag = 'AttributeSet';
$end_tag = '</'.$tag.'>';
- $XMLHelper =& $this->Application->recallObject('XMLHelper');
+ $XMLHelper = $this->Application->recallObject('XMLHelper');
/* @var $XMLHelper XMLHelper*/
while (true)
@@ -1420,7 +1420,7 @@
{
set_time_limit(0);
ini_set('memory_limit', '200M');
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$a_params = array(
@@ -1553,7 +1553,7 @@
function TestCategories()
{
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$a_params = array(
@@ -1712,7 +1712,7 @@
// Load Created / Updated user bu token
- $User =& $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
+ $User = $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
/* @var $User kDBItem */
if (!$User->Load($Transaction->Buyer->EIASToken, 'EbayEIASToken'))
@@ -1755,18 +1755,18 @@
$order_id = $this->Application->GetVar($event->getPrefixSpecial(true).'_id');
}
- $order_eh =& $this->Application->recallObject('ord_EventHandler');
+ $order_eh = $this->Application->recallObject('ord_EventHandler');
/* @var $order_eh OrdersEventHandler */
$this->Application->SetVar('ord_id', $order_id);
$this->Application->StoreVar('ord_id', $order_id);
- $Order =& $this->Application->recallObject('ord.item', null, Array('skip_autoload' => true));
+ $Order = $this->Application->recallObject('ord.item', null, Array('skip_autoload' => true));
$Order->Load($order_id);
// Add Product to cart
- $product =& $this->Application->recallObject('p.toadd', null, Array('skip_autoload' => true));
+ $product = $this->Application->recallObject('p.toadd', null, Array('skip_autoload' => true));
/* @var $product kCatDBItem */
$product->Load($product_id);
@@ -1800,7 +1800,7 @@
$this->Application->HandleEvent($event);
*/
-// $OrderItem =& $this->Application->recallObject('orditems.-item');
+// $OrderItem = $this->Application->recallObject('orditems.-item');
// $order_item_id = $OrderItem->GetID();
// $Order =& $event->getObject();
// $Order->Clear();
@@ -1918,7 +1918,7 @@
$ShippingAddress =& $Transaction->Buyer->BuyerInfo->ShippingAddress;
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
// Country transform to 3-symbol code
@@ -2015,7 +2015,7 @@
}
// Load Order
- $Order =& $this->Application->recallObject('ord.item', null, Array('skip_autoload' => true));
+ $Order = $this->Application->recallObject('ord.item', null, Array('skip_autoload' => true));
/* @var $Order OrdersItem */
if (!$Order->Load($order_id))
@@ -2088,7 +2088,7 @@
// $Order->SetDBField('Status', ORDER_STATUS_TOSHIP);
- $User =& $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
+ $User = $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
/* @var $User kDBItem */
$User->Load($Transaction->Buyer->EIASToken, 'EbayEIASToken');
@@ -2116,11 +2116,11 @@
$Order->Update();
-// $order_eh =& $this->Application->recallObject('ord_EventHandler');
+// $order_eh = $this->Application->recallObject('ord_EventHandler');
// /* @var $order_eh OrdersEventHandler */
-// $order =& $this->Application->recallObject('ord');
+// $order = $this->Application->recallObject('ord');
// $order->Load($order_id);
$event = new kEvent('ord:OnMassPlaceOrder');
$this->Application->HandleEvent($event);
@@ -2184,14 +2184,14 @@
}
- $User =& $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
+ $User = $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
$User->Load($user_id);
$groups = $User->getMembershipGroups(true);
if(!$groups) $groups = Array();
array_push($groups, $this->Application->ConfigValue('User_LoggedInGroup') );
$this->Application->StoreVar( 'UserGroups', implode(',', $groups) );
- $session =& $this->Application->recallObject('Session');
+ $session = $this->Application->recallObject('Session');
$session->SetField('PortalUserId', $user_id);
$session->SetField('GroupList', implode(',', $groups) );
$this->Application->SetVar('u.current_id', $user_id);
@@ -2486,7 +2486,7 @@
$a_ebay_products = $this->Conn->Query($sql, 'ProductId');
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
// perform dual sell check
@@ -2617,7 +2617,7 @@
}
$curr_gmt_time = mktime(gmdate("H, i, s, m, d, Y"));
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
$a_params = Array(
'StartTimeFrom' => $this->GetEbayDateTime($start_time_from - 3600*24),
);
@@ -2794,7 +2794,7 @@
),
);
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$eBayHelper->SetNotificationPreferences($a_params);
@@ -2821,7 +2821,7 @@
$curr_gmt_time = mktime(gmdate("H, i, s, m, d, Y"));
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
$a_params = Array(
'DetailLevel' => 'ReturnAll',
'ModTimeFrom' => $this->GetEbayDateTime($a_times['time_from']),
@@ -2968,7 +2968,7 @@
$a_items = $this->Conn->Query($sql);
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
$a_params = Array(
'DisputeReason' => 'BuyerHasNotPaid',
@@ -3032,10 +3032,10 @@
AND eoi.NotPaidUserNotified = 0
';
- $User =& $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
+ $User = $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
/* @var $User kDBItem */
- $Order =& $this->Application->recallObject('ord.item', null, Array('skip_autoload' => true));
+ $Order = $this->Application->recallObject('ord.item', null, Array('skip_autoload' => true));
/* @var $Order kDBItem */
$admin_email = $this->Application->ConfigValue('eBay_DisputeEmail');
@@ -3096,7 +3096,7 @@
// Get Schedules to run
// return;
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$curr_datetime = adodb_mktime();
@@ -3372,7 +3372,7 @@
if ($this->Application->ConfigValue('eBay_UseFetchToken') == 1)
{
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
@@ -3415,7 +3415,7 @@
return;
}
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
@@ -3500,7 +3500,7 @@
return;
}
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
foreach ($a_revisable_list AS $a_revisable)
@@ -3535,7 +3535,7 @@
function OnReceiveFeedbacks($event)
{
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$last_config_time = $this->Application->ConfigValue('eBay_LastReceivedFeedbackTime');
@@ -3716,7 +3716,7 @@
// get feedback message
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
foreach ($a_feedbacks AS $a_feedback)
@@ -3798,7 +3798,7 @@
AND LastFeedbackNotificationTime < '.$last_notification_to;
$a_transactions = $this->Conn->Query($sql);
- $esender =& $this->Application->recallObject('EmailSender');
+ $esender = $this->Application->recallObject('EmailSender');
/* @var $esender kEmailSendingHelper */
@@ -3814,15 +3814,15 @@
// load objects to use in email
- $User =& $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
+ $User = $this->Application->recallObject('u.item', null, Array('skip_autoload' => true));
/* @var $User kDBItem*/
$User->Load($a_transaction['PortalUserId']);
- $Product =& $this->Application->recallObject('p.item', null, Array('skip_autoload' => true));
+ $Product = $this->Application->recallObject('p.item', null, Array('skip_autoload' => true));
/* @var $Product kDBItem*/
$Product->Load($a_transaction['ProductId']);
- $Listing =& $this->Application->recallObject('l-ebay.item', null, Array('skip_autoload' => true));
+ $Listing = $this->Application->recallObject('l-ebay.item', null, Array('skip_autoload' => true));
/* @var $Listing kDBItem*/
$Listing->Load($a_transaction['eBayListingId'], 'eBayListingId');
// send email
@@ -3856,7 +3856,7 @@
return;
}
- $eBayHelper =& $this->Application->recallObject('eBayHelper');
+ $eBayHelper = $this->Application->recallObject('eBayHelper');
/* @var $eBayHelper eBayHelper*/
$eBayHelper->RemoveToken();
Index: in-auction/units/sections/ebay_tp.php
===================================================================
--- in-auction/units/sections/ebay_tp.php (revision 15111)
+++ in-auction/units/sections/ebay_tp.php (working copy)
@@ -17,7 +17,7 @@
function IseBayItem($params)
{
- $Orditems =& $this->Application->recallObject('orditems','orditems_List');
+ $Orditems = $this->Application->recallObject('orditems','orditems_List');
/* @var $Orditems kDBList*/
$options_salt = $Orditems->GetDBField('OptionsSalt');
@@ -31,19 +31,19 @@
}
function GetCategoryChilds($params)
{
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
return $CatSelectHelper->GetCategoryChilds($params);
}
function GetCategories($params)
{
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
return $CatSelectHelper->GetCategories($params);
}
function GetItemSpecifics($params)
{
- $CatSelectHelper =& $this->Application->recallObject('CatSelectHelper');
+ $CatSelectHelper = $this->Application->recallObject('CatSelectHelper');
/* @var $CatSelectHelper CatSelectHelper*/
return $CatSelectHelper->GetItemSpecifics($params);
}
Index: in-auction/units/shipping/shipping_eh.php
===================================================================
--- in-auction/units/shipping/shipping_eh.php (revision 15132)
+++ in-auction/units/shipping/shipping_eh.php (working copy)
@@ -167,7 +167,7 @@
function UpdateShippings($prefix, $special)
{
- $Shipping =& $this->Application->recallObject($prefix . '.item', null, Array('skip_autoload' => true));
+ $Shipping = $this->Application->recallObject($prefix . '.item', null, Array('skip_autoload' => true));
/* @var $Shipping kDBItem */
$items_info = $this->Application->GetVar( $prefix.'_'.$special );
Index: in-bulletin/units/helpers/post_helper.php
===================================================================
--- in-bulletin/units/helpers/post_helper.php (revision 15111)
+++ in-bulletin/units/helpers/post_helper.php (working copy)
@@ -181,7 +181,7 @@
function replacePostQuote($text, $render_as)
{
if (preg_match('/\[quote id=([\d]+)\](.*)\[\/quote\]/s', $text, $regs)) {
- $post =& $this->Application->recallObject('bb-post.-item', null, Array ('skip_autoload' => true));
+ $post = $this->Application->recallObject('bb-post.-item', null, Array ('skip_autoload' => true));
/* @var $post kDBItem */
$post->Load($regs[1]);
Index: in-bulletin/units/poll_comments/poll_comment_eh.php
===================================================================
--- in-bulletin/units/poll_comments/poll_comment_eh.php (revision 15133)
+++ in-bulletin/units/poll_comments/poll_comment_eh.php (working copy)
@@ -94,7 +94,7 @@
$poll_id = $parent_info['ParentId'];
if ( $poll_id ) {
- $spam_helper =& $this->Application->recallObject('SpamHelper');
+ $spam_helper = $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
$spam_helper->InitHelper($poll_id, 'PollComment', 0); // ResourceId used for SpamControl only
@@ -146,7 +146,7 @@
parent::OnAfterItemCreate($event);
if ( !$this->Application->isAdminUser ) {
- $spam_helper =& $this->Application->recallObject('SpamHelper');
+ $spam_helper = $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
$object =& $event->getObject();
Index: in-bulletin/units/polls/poll_tp.php
===================================================================
--- in-bulletin/units/polls/poll_tp.php (revision 15111)
+++ in-bulletin/units/polls/poll_tp.php (working copy)
@@ -48,7 +48,7 @@
$object =& $this->getObject($params);
/* @var $object kDBItem */
- $spam_helper =& $this->Application->recallObject('SpamHelper');
+ $spam_helper = $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
$spam_helper->InitHelper($object->GetID(), 'PollComment', 0); // PollId used for SpamControl only
Index: in-bulletin/units/posts/post_eh.php
===================================================================
--- in-bulletin/units/posts/post_eh.php (revision 15133)
+++ in-bulletin/units/posts/post_eh.php (working copy)
@@ -68,7 +68,7 @@
$object->SetDBField('PosterAlias', $this->Conn->GetOne($sql));
// set post options
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
$options_map = $post_helper->getOptionsMap();
@@ -101,7 +101,7 @@
WHERE p.'.$object->IDField.' = '.$object->GetID();
$post_info = $this->Conn->GetRow($sql);
- $perm_helper =& $this->Application->recallObject('PermissionsHelper');
+ $perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$is_owner = $post_info['CreatedById'] == $this->Application->RecallVar('user_id');
@@ -131,7 +131,7 @@
return;
}
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
$options_map = $post_helper->getOptionsMap();
@@ -190,7 +190,7 @@
$object =& $event->getObject();
/* @var $object kDBItem */
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
$options_map = $post_helper->getOptionsMap();
@@ -218,14 +218,14 @@
$parent_prefix = $this->Application->getUnitOption($event->Prefix, 'ParentPrefix');
- $main_object =& $this->Application->recallObject($parent_prefix);
+ $main_object = $this->Application->recallObject($parent_prefix);
/* @var $main_object kCatDBItem */
// update user posts counter
$user_posts = $this->Application->RecallPersistentVar('bb_posts');
$this->Application->StorePersistentVar('bb_posts', $user_posts + 1);
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
$category_id = $this->Application->GetVar('m_cat_id');
@@ -343,7 +343,7 @@
return;
}
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
// update posts count in topic
@@ -356,7 +356,7 @@
$this->Conn->Query($sql);
- $main_object =& $this->Application->recallObject('bb.-item', null, Array ('skip_autoload' => true));
+ $main_object = $this->Application->recallObject('bb.-item', null, Array ('skip_autoload' => true));
/* @var $main_object kCatDBItem */
$main_object->Load($topic_id);
@@ -430,7 +430,7 @@
$object =& $event->getObject();
/* @var $object kDBItem */
- $source_post =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
+ $source_post = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $source_post kDBItem */
$source_post->Load($reply_to);
Index: in-bulletin/units/posts/post_tp.php
===================================================================
--- in-bulletin/units/posts/post_tp.php (revision 15111)
+++ in-bulletin/units/posts/post_tp.php (working copy)
@@ -19,7 +19,7 @@
function ListPosts($params)
{
$parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix');
- $main_object =& $this->Application->recallObject($parent_prefix);
+ $main_object = $this->Application->recallObject($parent_prefix);
/* @var $main_object kCatDBItem */
if ($main_object->isLoaded()) {
@@ -50,7 +50,7 @@
$object =& $this->getObject($params);
/* @var $object kDBItem */
- $poster =& $this->Application->recallObject('u.poster', null, Array('skip_autoload' => true));
+ $poster = $this->Application->recallObject('u.poster', null, Array('skip_autoload' => true));
/* @var $poster UsersItem */
if ( !isset($posters) ) {
@@ -117,7 +117,7 @@
{
$object =& $this->getObject($params);
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
return $post_helper->CensorText( $object->GetDBField('Subject') );
@@ -127,7 +127,7 @@
{
$object =& $this->getObject($params);
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
$body = $object->GetDBField('PostingText');
@@ -154,7 +154,7 @@
$object =& $this->getObject($params);
$post_options = $object->GetDBField('Options');
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
// show poster signature in this post
@@ -181,7 +181,7 @@
{
$object =& $this->getObject($params);
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
$sub_blocks = Array (
@@ -254,11 +254,11 @@
if (!isset($category_path)) {
// get topic category
$parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix');
- $parent_item =& $this->Application->recallObject($parent_prefix, null, Array ('raise_warnings' => 0));
+ $parent_item = $this->Application->recallObject($parent_prefix, null, Array ('raise_warnings' => 0));
$category_path = $parent_item->isLoaded() ? $parent_item->GetDBField('ParentPath') : $this->Application->GetVar('m_cat_id');
}
- $perm_helper =& $this->Application->recallObject('PermissionsHelper');
+ $perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$params['raise_warnings'] = 0;
@@ -276,7 +276,7 @@
function CategoryItemCount($params)
{
- $count_helper =& $this->Application->recallObject('CountHelper');
+ $count_helper = $this->Application->recallObject('CountHelper');
/* @var $count_helper kCountHelper */
return $count_helper->CategoryItemCount('bb', $params, 'SUM(Posts)'); // - COUNT(TopicId)
@@ -284,7 +284,7 @@
function ItemCount($params)
{
- $count_helper =& $this->Application->recallObject('CountHelper');
+ $count_helper = $this->Application->recallObject('CountHelper');
/* @var $count_helper kCountHelper */
$today_only = isset($params['today']) && $params['today'];
Index: in-bulletin/units/private_message_body/private_message_body_eh.php
===================================================================
--- in-bulletin/units/private_message_body/private_message_body_eh.php (revision 15133)
+++ in-bulletin/units/private_message_body/private_message_body_eh.php (working copy)
@@ -31,7 +31,7 @@
/* @var $object kDBItem */
// set post options
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
$options_map = $post_helper->getOptionsMap();
Index: in-bulletin/units/private_messages/private_message_eh.php
===================================================================
--- in-bulletin/units/private_messages/private_message_eh.php (revision 15133)
+++ in-bulletin/units/private_messages/private_message_eh.php (working copy)
@@ -118,7 +118,7 @@
return ;
}
- $message_body =& $this->Application->recallObject($event->Prefix . '-body', null, Array ('skip_autoload' => true));
+ $message_body = $this->Application->recallObject($event->Prefix . '-body', null, Array ('skip_autoload' => true));
/* @var $message_body kDBItem */
// 1. create message body (for sender & recipient)
@@ -152,7 +152,7 @@
$object =& $event->getObject();
/* @var $object kDBItem */
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
$options_map = $post_helper->getOptionsMap();
@@ -283,7 +283,7 @@
if ( $reply_to > 0 ) {
// reply to message
- $source_msg =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
+ $source_msg = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $source_msg kDBItem */
$source_msg->Load($reply_to);
Index: in-bulletin/units/private_messages/private_message_tp.php
===================================================================
--- in-bulletin/units/private_messages/private_message_tp.php (revision 15111)
+++ in-bulletin/units/private_messages/private_message_tp.php (working copy)
@@ -77,7 +77,7 @@
{
$object =& $this->getObject($params);
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
// 2. parse post body
Index: in-bulletin/units/topics/topics_event_handler.php
===================================================================
--- in-bulletin/units/topics/topics_event_handler.php (revision 15133)
+++ in-bulletin/units/topics/topics_event_handler.php (working copy)
@@ -96,7 +96,7 @@
$object->SetDBField('TodayDate', adodb_date('Y-m-d'));
}
- $post_helper =& $this->Application->recallObject('PostHelper');
+ $post_helper = $this->Application->recallObject('PostHelper');
/* @var $post_helper PostHelper */
$object->SetDBField('TopicText', $post_helper->CensorText($object->GetDBField('TopicText')));
@@ -121,7 +121,7 @@
$object =& $event->getObject();
/* @var $object kDBItem */
- $post =& $this->Application->recallObject($event->Prefix . '-post', null, Array ('skip_autoload' => true));
+ $post = $this->Application->recallObject($event->Prefix . '-post', null, Array ('skip_autoload' => true));
/* @var $post kDBItem */
$post->SetDBField('Pending', $object->GetDBField('Status') == STATUS_ACTIVE ? 0 : 1);
@@ -156,7 +156,7 @@
/* @var $object kCatDBItem */
if ( $object->GetDBField('Posts') == 1 ) {
- $post =& $this->Application->recallObject($event->Prefix . '-post', null, Array ('skip_autoload' => true));
+ $post = $this->Application->recallObject($event->Prefix . '-post', null, Array ('skip_autoload' => true));
/* @var $post kDBItem */
$main_status = $object->GetDBField('Status');
Index: in-commerce/gw_notify.php
===================================================================
--- in-commerce/gw_notify.php (revision 15134)
+++ in-commerce/gw_notify.php (working copy)
@@ -30,7 +30,7 @@
$db =& $application->GetADODBConnection();
$application->setUnitOption('ord','AutoLoad',false);
- $order =& $application->recallObject('ord');
+ $order = $application->recallObject('ord');
$order_id = $application->GetVar('order_id');
if ($order_id) {
@@ -39,7 +39,7 @@
$gw_data = $order->getGatewayData($application->GetVar('payment_type_id'));
$application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $application->recallObject( $gw_data['ClassName'] );
$transaction_status = $gateway_object->processNotification($gw_data['gw_params']);
Index: in-commerce/units/addresses/addresses_event_handler.php
===================================================================
--- in-commerce/units/addresses/addresses_event_handler.php (revision 15134)
+++ in-commerce/units/addresses/addresses_event_handler.php (working copy)
@@ -108,7 +108,7 @@
return ;
}
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->CheckStateField($event, 'State', 'Country');
@@ -178,7 +178,7 @@
{
parent::OnAfterItemLoad($event);
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'State', 'Country');
@@ -223,7 +223,7 @@
'Country' => 1,
);
- $user =& $this->Application->recallObject($this->Application->isAdmin ? 'u' : 'u.current');
+ $user = $this->Application->recallObject($this->Application->isAdmin ? 'u' : 'u.current');
/* @var $user UsersItem */
$user->setName( $object->GetDBField('To') );
@@ -273,7 +273,7 @@
$load_keys = Array ('PortalUserId' => $user->GetID(), 'IsProfileAddress' => 1);
- $object =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
+ $object = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->Load($load_keys);
@@ -373,7 +373,7 @@
$object->SetDBField('PortalUserId', $this->Application->RecallVar('user_id'));
}
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->CheckStateField($event, 'State', 'Country');
@@ -416,7 +416,7 @@
{
parent::OnAfterConfigRead($event);
- $site_helper =& $this->Application->recallObject('SiteHelper');
+ $site_helper = $this->Application->recallObject('SiteHelper');
/* @var $site_helper SiteHelper */
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
Index: in-commerce/units/addresses/addresses_list.php
===================================================================
--- in-commerce/units/addresses/addresses_list.php (revision 15111)
+++ in-commerce/units/addresses/addresses_list.php (working copy)
@@ -32,7 +32,7 @@
if ($address_found) {
$order_fields = Array('To', 'Company', 'Phone', 'Fax', 'Email', 'Address1', 'Address2', 'City', 'State', 'Zip', 'Country');
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
foreach ($order_fields as $order_field) {
$order->SetDBField($to_address_type.$order_field, $this->GetDBField($order_field) );
}
Index: in-commerce/units/addresses/addresses_tag_processor.php
===================================================================
--- in-commerce/units/addresses/addresses_tag_processor.php (revision 15111)
+++ in-commerce/units/addresses/addresses_tag_processor.php (working copy)
@@ -57,7 +57,7 @@
function EditLink($params)
{
- $tag_processor =& $this->Application->recallTagProcessor('m');
+ $tag_processor = $this->Application->recallTagProcessor('m');
$params['pass'] = 'm,addr';
return $tag_processor->Link($params);
}
Index: in-commerce/units/affiliate_payment_types/affiliate_payment_types_tp.php
===================================================================
--- in-commerce/units/affiliate_payment_types/affiliate_payment_types_tp.php (revision 15111)
+++ in-commerce/units/affiliate_payment_types/affiliate_payment_types_tp.php (working copy)
@@ -27,7 +27,7 @@
{
static $checked = false;
- $affiliate =& $this->Application->recallObject( $params['prefix'] );
+ $affiliate = $this->Application->recallObject( $params['prefix'] );
/* @var $affiliate kDBItem */
$payment_type = $affiliate->GetDBField( $params['field'] );
Index: in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php
===================================================================
--- in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php (revision 15134)
+++ in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php (working copy)
@@ -33,7 +33,7 @@
$parent_info = $object->getLinkedInfo();
- $parent_object =& $this->Application->recallObject($parent_info['ParentPrefix']);
+ $parent_object = $this->Application->recallObject($parent_info['ParentPrefix']);
/* @var $parent_object kDBItem */
$options = $object->GetFieldOptions('PaymentTypeId');
@@ -61,7 +61,7 @@
{
parent::OnNew($event);
- $affiliate =& $this->Application->recallObject('affil');
+ $affiliate = $this->Application->recallObject('affil');
/* @var $affiliate kDBItem */
$object =& $event->getObject(Array ('skip_autoload' => true));
@@ -92,7 +92,7 @@
WHERE ' . $parent_info['ParentTableKey'] . ' = ' . $parent_info['ParentId'];
$payment_date = $this->Conn->GetOne($sql);
- $affiliate =& $this->Application->recallObject('affil');
+ $affiliate = $this->Application->recallObject('affil');
/* @var $affiliate kDBItem */
$affiliate->SetDBField('AmountToPay', $affiliate->GetDBField('AmountToPay') - $object->GetDBField('Amount'));
Index: in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php
===================================================================
--- in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (revision 15134)
+++ in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (working copy)
@@ -44,7 +44,7 @@
{
$event->redirect = false;
- $brackets_helper =& $this->Application->recallObject('BracketsHelper');
+ $brackets_helper = $this->Application->recallObject('BracketsHelper');
$brackets_helper->InitHelper('FromAmount', 'ToAmount', Array('Percent' => '') );
$brackets_helper->OnMoreBrackets($event);
}
@@ -57,7 +57,7 @@
function OnArrange($event)
{
$event->redirect = false;
- $brackets_helper =& $this->Application->recallObject('BracketsHelper');
+ $brackets_helper = $this->Application->recallObject('BracketsHelper');
$brackets_helper->InitHelper('FromAmount', 'ToAmount', Array('Percent' => '') );
$brackets_helper->arrangeBrackets($event);
@@ -72,7 +72,7 @@
function OnInfinity($event)
{
$event->redirect = false;
- $brackets_helper =& $this->Application->recallObject('BracketsHelper');
+ $brackets_helper = $this->Application->recallObject('BracketsHelper');
$brackets_helper->InitHelper('FromAmount', 'ToAmount', Array('Percent' => '') );
$brackets_helper->arrangeBrackets($event);
@@ -100,7 +100,7 @@
$linked_info = $object->getLinkedInfo();
$object->SetDBField($linked_info['ParentTableKey'], $linked_info['ParentId']);
- $brackets_helper =& $this->Application->recallObject('BracketsHelper');
+ $brackets_helper = $this->Application->recallObject('BracketsHelper');
/* @var $brackets_helper kBracketsHelper */
$brackets_helper->InitHelper('FromAmount', 'ToAmount', Array ('Percent' => ''));
@@ -114,7 +114,7 @@
*/
function OnPreSaveBrackets($event)
{
- $brackets_helper =& $this->Application->recallObject('BracketsHelper');
+ $brackets_helper = $this->Application->recallObject('BracketsHelper');
/* @var $brackets_helper kBracketsHelper */
$brackets_helper->InitHelper('FromAmount', 'ToAmount', Array('Percent' => '') );
Index: in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_tag_processor.php
===================================================================
--- in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_tag_processor.php (revision 15111)
+++ in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_tag_processor.php (working copy)
@@ -31,7 +31,7 @@
function ShowPricingForm($params)
{
- $br_object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+ $br_object = $this->Application->recallObject( $this->getPrefixSpecial() );
/* @var $br_object kDBItem */
$br_data = $this->Application->GetVar( $this->getPrefixSpecial(true) );
@@ -61,7 +61,7 @@
$block_params['name'] = $params['block'];
$first = true;
- $main_object =& $this->Application->recallObject($linked_info['ParentPrefix'].'.'.$this->Special);
+ $main_object = $this->Application->recallObject($linked_info['ParentPrefix'].'.'.$this->Special);
$plan_type = $main_object->GetDBField('PlanType');
$limits_format = ($plan_type == 2) ? '%d' : $br_object->GetFieldOption('FromAmount', 'format');
Index: in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php
===================================================================
--- in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (revision 15134)
+++ in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (working copy)
@@ -24,7 +24,7 @@
function OnProcessSelected($event)
{
// uses another handler event, because does the same stuff but on different table
- $di_handler =& $this->Application->recallObject('di_EventHandler');
+ $di_handler = $this->Application->recallObject('di_EventHandler');
$di_handler->OnProcessSelected($event);
}
Index: in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php
===================================================================
--- in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php (revision 15111)
+++ in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php (working copy)
@@ -35,9 +35,9 @@
/* @var $object kDBList */
if ($object->GetDBField('ItemType') == 2) {
- $cat_object =& $this->Application->recallObject('c');
+ $cat_object = $this->Application->recallObject('c');
$cat_object->Load( $object->GetDBField('CategoryId') );
- $cat_tag_processor =& $this->Application->recallObject('c_TagProcessor');
+ $cat_tag_processor = $this->Application->recallObject('c_TagProcessor');
return $cat_tag_processor->ItemIcon();
}
Index: in-commerce/units/affiliates/affiliates_event_handler.php
===================================================================
--- in-commerce/units/affiliates/affiliates_event_handler.php (revision 15134)
+++ in-commerce/units/affiliates/affiliates_event_handler.php (working copy)
@@ -170,7 +170,7 @@
return;
}
- $object =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
+ $object = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $object kDBItem */
$affiliate_storage_method = $this->Application->ConfigValue('Comm_AffiliateStorageMethod');
@@ -186,7 +186,7 @@
if ( $object->isLoaded() && ($object->GetDBField('Status') == 1) ) {
// user is found with such email
- $affiliate_user =& $this->Application->recallObject('u.affiliate', null, Array ('skip_autoload' => true));
+ $affiliate_user = $this->Application->recallObject('u.affiliate', null, Array ('skip_autoload' => true));
/* @var $affiliate_user UsersItem */
$affiliate_user->Load($object->GetDBField('PortalUserId'));
@@ -225,7 +225,7 @@
*/
function OnOrderApprove($event)
{
- $order =& $this->Application->recallObject($event->getEventParam('Order_PrefixSpecial'));
+ $order = $this->Application->recallObject($event->getEventParam('Order_PrefixSpecial'));
/* @var $order OrdersItem */
$affiliate_id = $order->GetDBField('AffiliateId');
@@ -237,7 +237,7 @@
/* @var $object kDBItem */
if ( $object->Load($affiliate_id) ) {
- $affiliate_plan =& $this->Application->recallObject('ap', null, Array ('skip_autoload' => true));
+ $affiliate_plan = $this->Application->recallObject('ap', null, Array ('skip_autoload' => true));
/* @var $affiliate_plan kDBItem */
$affiliate_plan->Load($object->GetDBField('AffiliatePlanId'));
@@ -428,7 +428,7 @@
{
parent::OnBeforeDeleteFromLive($event);
- $payment_object =& $this->Application->recallObject('apayments', 'apayments', Array ('skip_autoload' => true));
+ $payment_object = $this->Application->recallObject('apayments', 'apayments', Array ('skip_autoload' => true));
/* @var $payment_object kDBItem */
$id = $event->getEventParam('id');
Index: in-commerce/units/affiliates/affiliates_tag_processor.php
===================================================================
--- in-commerce/units/affiliates/affiliates_tag_processor.php (revision 15111)
+++ in-commerce/units/affiliates/affiliates_tag_processor.php (working copy)
@@ -77,7 +77,7 @@
*/
protected function User_IsAffiliate($params)
{
- $object =& $this->Application->recallObject($this->Prefix . '.user');
+ $object = $this->Application->recallObject($this->Prefix . '.user');
/* @var $object kDBItem */
return $object->isLoaded();
@@ -92,7 +92,7 @@
*/
protected function User_AffiliateIsActive($params)
{
- $object =& $this->Application->recallObject($this->Prefix . '.user');
+ $object = $this->Application->recallObject($this->Prefix . '.user');
/* @var $object kDBItem */
return $object->isLoaded() && ($object->GetDBField('Status') == STATUS_ACTIVE);
@@ -133,7 +133,7 @@
function IsAffiliateOrRegisterAsAffiliateAllowed($params)
{
- $object =& $this->Application->recallObject($this->Prefix . '.user');
+ $object = $this->Application->recallObject($this->Prefix . '.user');
/* @var $object kDBItem */
return $this->Application->ConfigValue('Comm_RegisterAsAffiliate') || $object->isLoaded() ? 1 : 0;
Index: in-commerce/units/brackets/brackets_event_handler.php
===================================================================
--- in-commerce/units/brackets/brackets_event_handler.php (revision 15134)
+++ in-commerce/units/brackets/brackets_event_handler.php (working copy)
@@ -51,16 +51,16 @@
return;
}
- $shipping_object =& $this->Application->recallObject('s');
+ $shipping_object = $this->Application->recallObject('s');
/* @var $shipping_object kDBItem */
- $lang_object =& $this->Application->recallObject('lang.current');
+ $lang_object = $this->Application->recallObject('lang.current');
/* @var $lang_object LanguagesItem */
if ( $lang_object->GetDBField('UnitSystem') == 2 && $shipping_object->GetDBField('Type') == 1 ) {
$fields = Array ('Start', 'End');
- $formatter =& $this->Application->recallObject('kUnitFormatter');
+ $formatter = $this->Application->recallObject('kUnitFormatter');
/* @var $formatter kUnitFormatter */
foreach ($fields as $field) {
@@ -74,10 +74,10 @@
function prepareBrackets($event)
{
- $lang_object =& $this->Application->recallObject('lang.current');
+ $lang_object = $this->Application->recallObject('lang.current');
/* @var $lang_object LanguagesItem */
- $shipping_object =& $this->Application->recallObject('s');
+ $shipping_object = $this->Application->recallObject('s');
/* @var $shipping_object kDBItem */
if ( $lang_object->GetDBField('UnitSystem') != 2 || $shipping_object->GetDBField('Type') != 1 ) {
@@ -158,7 +158,7 @@
*/
protected function &getHelper($event, $event_readonly = false)
{
- $shipping_object =& $this->Application->recallObject('s');
+ $shipping_object = $this->Application->recallObject('s');
/* @var $shipping_object kDBItem */
$default_start = $shipping_object->GetDBField('Type') == 1 ? 0 : 1;
@@ -168,7 +168,7 @@
$event->redirect = false;
}
- $brackets_helper =& $this->Application->recallObject('BracketsHelper');
+ $brackets_helper = $this->Application->recallObject('BracketsHelper');
/* @var $brackets_helper kBracketsHelper */
$brackets_helper->InitHelper('Start', 'End', Array (), $default_start);
@@ -204,10 +204,10 @@
*/
function OnPreSaveBrackets($event)
{
- $lang_object =& $this->Application->recallObject('lang.current');
+ $lang_object = $this->Application->recallObject('lang.current');
/* @var $lang_object LanguagesItem */
- $shipping_object =& $this->Application->recallObject('s');
+ $shipping_object = $this->Application->recallObject('s');
/* @var $shipping_object kDBItem */
if ( $lang_object->GetDBField('UnitSystem') == 2 && $shipping_object->GetDBField('Type') == 1 ) {
Index: in-commerce/units/brackets/brackets_tag_processor.php
===================================================================
--- in-commerce/units/brackets/brackets_tag_processor.php (revision 15111)
+++ in-commerce/units/brackets/brackets_tag_processor.php (working copy)
@@ -28,15 +28,15 @@
function ShowBracketsForm($params)
{
- $shipping_object =& $this->Application->recallObject('s');
+ $shipping_object = $this->Application->recallObject('s');
$default_start = ($shipping_object->GetDBField('Type') == 1) ? 0 : 1;
- $brackets_helper =& $this->Application->recallObject('BracketsHelper');
+ $brackets_helper = $this->Application->recallObject('BracketsHelper');
/* @var $brackets_helper kBracketsHelper */
$brackets_helper->InitHelper('Start', 'End', Array(), $default_start );
- $br_object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+ $br_object = $this->Application->recallObject( $this->getPrefixSpecial() );
$event = new kEvent($this->getPrefixSpecial(true) . ':OnArrange');
$br_data = $brackets_helper->getBrackets($event);
@@ -48,7 +48,7 @@
usort($brackets, Array(&$brackets_helper, 'compareBrackets'));
- $dummy =& $this->Application->recallObject($this->Prefix.'.-dummy', null, array('skip_autoload' => true));
+ $dummy = $this->Application->recallObject($this->Prefix.'.-dummy', null, array('skip_autoload' => true));
/* @var $dummy kDBItem */
// performs number formatting
@@ -75,7 +75,7 @@
$block_params['name'] = $params['block'];
$first = true;
- $main_object =& $this->Application->recallObject($linked_info['ParentPrefix'].'.'.$this->Special);
+ $main_object = $this->Application->recallObject($linked_info['ParentPrefix'].'.'.$this->Special);
// $plan_type = $main_object->GetDBField('PlanType');
// $limits_format = ($plan_type == 2) ? '%d' : $br_object->getFieldOption('Start', 'format');
@@ -101,7 +101,7 @@
$block_params['max'] = ($values['End'] == -1) ? '∞' : $values['End'];
$block_params['next_min_id'] = $next_bracket[$br_object->IDField];
- $lang_object =& $this->Application->recallObject('lang.current');
+ $lang_object = $this->Application->recallObject('lang.current');
if($lang_object->GetDBField('UnitSystem') == 2 && $main_object->GetDBField('Type') == 1)
{
if($block_params['min'] === '')
@@ -144,7 +144,7 @@
/*
function ShowBracketsForm($params)
{
- $br_object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+ $br_object = $this->Application->recallObject( $this->getPrefixSpecial() );
$br_data = $this->Application->GetVar('br');
Index: in-commerce/units/coupon_items/coupon_items_event_handler.php
===================================================================
--- in-commerce/units/coupon_items/coupon_items_event_handler.php (revision 15134)
+++ in-commerce/units/coupon_items/coupon_items_event_handler.php (working copy)
@@ -41,7 +41,7 @@
function OnProcessSelected($event)
{
// uses another handler event, because does the same stuff but on different table
- $di_handler =& $this->Application->recallObject('di_EventHandler');
+ $di_handler = $this->Application->recallObject('di_EventHandler');
$di_handler->OnProcessSelected($event);
}
Index: in-commerce/units/coupon_items/coupon_items_tag_processor.php
===================================================================
--- in-commerce/units/coupon_items/coupon_items_tag_processor.php (revision 15111)
+++ in-commerce/units/coupon_items/coupon_items_tag_processor.php (working copy)
@@ -35,9 +35,9 @@
/* @var $object kDBList */
if ($object->GetDBField('ItemType') == 2) {
- $cat_object =& $this->Application->recallObject('c');
+ $cat_object = $this->Application->recallObject('c');
$cat_object->Load( $object->GetDBField('CategoryId') );
- $cat_tag_processor =& $this->Application->recallObject('c_TagProcessor');
+ $cat_tag_processor = $this->Application->recallObject('c_TagProcessor');
return $cat_tag_processor->ItemIcon();
}
Index: in-commerce/units/coupons/coupons_event_handler.php
===================================================================
--- in-commerce/units/coupons/coupons_event_handler.php (revision 15134)
+++ in-commerce/units/coupons/coupons_event_handler.php (working copy)
@@ -111,7 +111,7 @@
return ;
}
- $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+ $temp = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
/* @var $temp kTempTablesHandler */
$original_coupon_ids = $this->getSelectedIDs($event, true);
Index: in-commerce/units/currencies/currencies_event_handler.php
===================================================================
--- in-commerce/units/currencies/currencies_event_handler.php (revision 15134)
+++ in-commerce/units/currencies/currencies_event_handler.php (working copy)
@@ -137,7 +137,7 @@
// site domain currency picker
if ( $event->Special == 'selected' || $event->Special == 'available' ) {
- $edit_picker_helper =& $this->Application->recallObject('EditPickerHelper');
+ $edit_picker_helper = $this->Application->recallObject('EditPickerHelper');
/* @var $edit_picker_helper EditPickerHelper */
$edit_picker_helper->applyFilter($event, 'Currencies');
@@ -204,7 +204,7 @@
1 => 'BankLVCurrencyRates'
);
$rates_class = $rate_source_classes[$rate_source];
- $rates =& $this->Application->recallObject($rates_class);
+ $rates = $this->Application->recallObject($rates_class);
$rates->GetRatesData();
@@ -254,7 +254,7 @@
1 => 'BankLVCurrencyRates'
);
$rates_class = $rate_source_classes[$rate_source];
- $rates =& $this->Application->recallObject($rates_class);
+ $rates = $this->Application->recallObject($rates_class);
$rates->GetRatesData();
Index: in-commerce/units/currencies/currencies_tag_processor.php
===================================================================
--- in-commerce/units/currencies/currencies_tag_processor.php (revision 15111)
+++ in-commerce/units/currencies/currencies_tag_processor.php (working copy)
@@ -74,7 +74,7 @@
function SelectedCurrency($params)
{
- $object =& $this->Application->recallObject($this->getPrefixSpecial());
+ $object = $this->Application->recallObject($this->getPrefixSpecial());
return $object->GetDBField('ISO') == $this->Application->RecallVar('curr_iso');
}
Index: in-commerce/units/destinations/dst_event_handler.php
===================================================================
--- in-commerce/units/destinations/dst_event_handler.php (revision 15134)
+++ in-commerce/units/destinations/dst_event_handler.php (working copy)
@@ -74,7 +74,7 @@
$object->SetDBField('ShippingZoneId', $this->Application->GetVar('z_id'));
}
- $zone_object =& $this->Application->recallObject('z');
+ $zone_object = $this->Application->recallObject('z');
/* @var $zone_object kDBItem */
if ( $zone_object->GetDBField('Type') == 3 ) {
Index: in-commerce/units/discount_items/discount_items_tag_processor.php
===================================================================
--- in-commerce/units/discount_items/discount_items_tag_processor.php (revision 15111)
+++ in-commerce/units/discount_items/discount_items_tag_processor.php (working copy)
@@ -35,9 +35,9 @@
/* @var $object kDBList */
if ($object->GetDBField('ItemType') == 2) {
- $cat_object =& $this->Application->recallObject('c');
+ $cat_object = $this->Application->recallObject('c');
$cat_object->Load( $object->GetDBField('CategoryId') );
- $cat_tag_processor =& $this->Application->recallObject('c_TagProcessor');
+ $cat_tag_processor = $this->Application->recallObject('c_TagProcessor');
return $cat_tag_processor->ItemIcon();
}
Index: in-commerce/units/downloads/download_helper.php
===================================================================
--- in-commerce/units/downloads/download_helper.php (revision 15111)
+++ in-commerce/units/downloads/download_helper.php (working copy)
@@ -25,7 +25,7 @@
function SendFile($file_id, $product_id)
{
- $file_object =& $this->Application->recallObject('file', null, Array('skip_autoload' => true));
+ $file_object = $this->Application->recallObject('file', null, Array('skip_autoload' => true));
/* @var $file_object kDBItem */
$sql = $file_id ?
@@ -57,9 +57,9 @@
function LogDownload($product_id, $file_info)
{
- $down_object =& $this->Application->recallObject('down', null, Array('skip_autoload' => true));
- $user_object =& $this->Application->recallObject('u.current');
- $product_object =& $this->Application->recallObject( 'p' );
+ $down_object = $this->Application->recallObject('down', null, Array('skip_autoload' => true));
+ $user_object = $this->Application->recallObject('u.current');
+ $product_object = $this->Application->recallObject( 'p' );
$down_object->SetDBField('PortalUserId', $this->Application->RecallVar('user_id'));
$down_object->SetDBField('Username', $user_object->GetDBField('Username'));
Index: in-commerce/units/gateways/gw_classes/atosorigin.php
===================================================================
--- in-commerce/units/gateways/gw_classes/atosorigin.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/atosorigin.php (working copy)
@@ -121,12 +121,12 @@
$result = $this->parseGWResponce($ret);
list ($sid, $auth_code) = explode(',', $result['caddie']);
- $session =& $this->Application->recallObject('Session');
+ $session = $this->Application->recallObject('Session');
$session->SID = $sid;
$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE md5(OrderId) = '.$this->Conn->qstr($auth_code));
$this->Application->SetVar('ord_id', $order_id);
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
$order->Load($order_id);
return $result['response_code'] === '00' ? 1 : 0;
Index: in-commerce/units/gateways/gw_classes/authorizenet.php
===================================================================
--- in-commerce/units/gateways/gw_classes/authorizenet.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/authorizenet.php (working copy)
@@ -54,7 +54,7 @@
$post_fields['x_email'] = $billing_email;
$post_fields['x_phone'] = $item_data['BillingPhone'];
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$post_fields['x_country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
@@ -63,7 +63,7 @@
$post_fields['x_description'] = 'Invoice #'.$item_data['OrderNumber'];
$post_fields['x_email_customer'] = 'FALSE';
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->SetPostData($post_fields);
@@ -104,7 +104,7 @@
if( $this->IsTestMode() ) $post_fields['x_test_request'] = 'True';
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->SetPostData($post_fields);
Index: in-commerce/units/gateways/gw_classes/google_checkout.php
===================================================================
--- in-commerce/units/gateways/gw_classes/google_checkout.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/google_checkout.php (working copy)
@@ -74,7 +74,7 @@
WHERE oi.OrderId = '.$cart_fields['OrderId'];
$order_items = $this->Conn->Query($sql);
- $ml_formatter =& $this->Application->recallObject('kMultiLanguage');
+ $ml_formatter = $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
$cart_xml = Array ();
@@ -207,7 +207,7 @@
// parse xml & get order_id from there, like sella pay
$this->gwParams = $gw_params;
- $xml_helper =& $this->Application->recallObject('kXMLHelper');
+ $xml_helper = $this->Application->recallObject('kXMLHelper');
/* @var $xml_helper kXMLHelper */
$root_node =& $xml_helper->Parse( $this->getRequestXML() );
@@ -361,7 +361,7 @@
}
// 2. update shipping address in order
- $order =& $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
+ $order = $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
/* @var $order OrdersItem */
$order->Load($order_id);
@@ -372,7 +372,7 @@
'ShippingZip' => $address_info['POSTAL-CODE'],
);
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$shipping_address['ShippingCountry'] = $cs_helper->getCountryIso($address_info['COUNTRY-CODE'], true);
@@ -481,7 +481,7 @@
}
// 2. update shipping address in order
- $order =& $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
+ $order = $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
/* @var $order OrdersItem */
$order->Load($order_id);
@@ -527,7 +527,7 @@
'POSTAL-CODE' => 'Zip',
);
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
foreach ($user_address as $field_prefix => $address_details) {
@@ -607,7 +607,7 @@
}
// 2. update shipping address in order
- $order =& $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
+ $order = $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
/* @var $order OrdersItem */
$order->Load($google_order_number, 'GoogleOrderNumber');
@@ -689,7 +689,7 @@
$this->_chargeOrder($item_data);
- $order =& $this->Application->recallObject('ord.-item', null, Array ('skip_autoload' => true));
+ $order = $this->Application->recallObject('ord.-item', null, Array ('skip_autoload' => true));
/* @var $order OrdersItem */
$order->Load($item_data['OrderId']);
@@ -713,10 +713,10 @@
{
$submit_url = $this->gwParams['submit_url'].'/request/Merchant/'.$this->gwParams['merchant_id'];
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
- $xml_helper =& $this->Application->recallObject('kXMLHelper');
+ $xml_helper = $this->Application->recallObject('kXMLHelper');
/* @var $xml_helper kXMLHelper */
$curl_helper->SetPostData($command_xml);
@@ -773,7 +773,7 @@
}
// 2. update shipping address in order
- $order =& $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
+ $order = $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
/* @var $order OrdersItem */
$order->Load($google_order_number, 'GoogleOrderNumber');
@@ -800,7 +800,7 @@
if ($order_charged) {
// when using Pre-Authorize
- $order_eh =& $this->Application->recallObject('ord_EventHandler');
+ $order_eh = $this->Application->recallObject('ord_EventHandler');
/* @var $order_eh OrdersEventHandler */
$order_eh->SplitOrder( new kEvent('ord:OnMassOrderApprove'), $order);
@@ -846,7 +846,7 @@
$shipping_totals = $this->Conn->GetRow($query);
$this->Application->recallObject('ShippingQuoteEngine');
- $quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
+ $quote_engine_collector = $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
$shipping_quote_params = Array(
Index: in-commerce/units/gateways/gw_classes/gw_base.php
===================================================================
--- in-commerce/units/gateways/gw_classes/gw_base.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/gw_base.php (working copy)
@@ -152,7 +152,7 @@
*/
function ConvertCurrency($value, $iso, $format_value = true)
{
- $converter =& $this->Application->recallObject('CurrencyRates');
+ $converter = $this->Application->recallObject('CurrencyRates');
/* @var $converter CurrencyRates */
$value = $converter->Convert($value, 'PRIMARY', $iso);
@@ -185,7 +185,7 @@
$gw_id = $this->Conn->getInsertID();
// 2. create DISABLED payment type, that uses this gateway (used for storing configuration properties of gateway)
- $payment_type =& $this->Application->recallObject('pt.-item', null, Array ('skip_autoload' => true));
+ $payment_type = $this->Application->recallObject('pt.-item', null, Array ('skip_autoload' => true));
/* @var $payment_type kDBItem */
$payment_type->Clear();
Index: in-commerce/units/gateways/gw_classes/ideal_nl.php
===================================================================
--- in-commerce/units/gateways/gw_classes/ideal_nl.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/ideal_nl.php (working copy)
@@ -46,12 +46,12 @@
$this->Application->StoreVar('gw_success_template',$tag_params['return_template']);
$this->Application->StoreVar('gw_cancel_template',$tag_params['cancel_template']);
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$banks = $curl_helper->Send($gw_params['request_url'].'?a=banklist');
- $parser =& $this->Application->recallObject('kXMLHelper');
+ $parser = $this->Application->recallObject('kXMLHelper');
/* @var $parser kXMLHelper */
$bank_data =& $parser->Parse($banks);
@@ -84,13 +84,13 @@
$fields['returnurl'] = $this->getNotificationUrl() . '?order_id='.$item_data['OrderId'];
$fields['reporturl'] = $this->getNotificationUrl() . '?mode=report&order_id='.$item_data['OrderId'];
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->SetRequestData($fields);
$transaction_xml = $curl_helper->Send($gw_params['request_url']);
- $parser =& $this->Application->recallObject('kXMLHelper');
+ $parser = $this->Application->recallObject('kXMLHelper');
/* @var $parser kXMLHelper */
$trans_data =& $parser->Parse($transaction_xml);
$transaction_id = $trans_data->FindChildValue('transaction_id');
@@ -131,13 +131,13 @@
$fields['transaction_id'] = $this->Application->GetVar('transaction_id');
$fields['bank_id'] = $this->Application->GetVar('ideal_nl_bank_id');
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->SetRequestData($fields);
$check_xml = $curl_helper->Send($gw_params['request_url']);
- $parser =& $this->Application->recallObject('kXMLHelper');
+ $parser = $this->Application->recallObject('kXMLHelper');
/* @var $parser kXMLHelper */
$trans_data =& $parser->Parse($check_xml);
@@ -151,7 +151,7 @@
return $result;
}
else {
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
if ($order->GetDBField('Status') == ORDER_STATUS_INCOMPLETE) {
// error
$t = $this->Application->RecallVar('gw_cancel_template');
Index: in-commerce/units/gateways/gw_classes/multicards.php
===================================================================
--- in-commerce/units/gateways/gw_classes/multicards.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/multicards.php (working copy)
@@ -106,12 +106,12 @@
$this->parsed_responce = $_POST;
list ($sid, $auth_code) = explode(',', $this->Application->GetVar('user1'));
- $session =& $this->Application->recallObject('Session');
+ $session = $this->Application->recallObject('Session');
$session->SID = $sid;
$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE md5(OrderId) = '.$this->Conn->qstr($auth_code));
$this->Application->SetVar('ord_id', $order_id);
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
$order->Load($order_id);
$url = $this->Application->GetVar('user2');
Index: in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php
===================================================================
--- in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php (revision 15134)
+++ in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php (working copy)
@@ -26,12 +26,12 @@
$application->SetVar('payment_type_id', $payment_type_id); // keep, because kGWGoogleCheckout::processNewOrderNotification relies on this
- $order =& $application->recallObject('ord', null, Array ('skip_autoload' => true));
+ $order = $application->recallObject('ord', null, Array ('skip_autoload' => true));
/* @var $order OrdersItem */
$gw_data = $order->getGatewayData($application->GetVar('payment_type_id'));
$application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $application->recallObject( $gw_data['ClassName'] );
$transaction_status = $gateway_object->processNotification($gw_data['gw_params']);
Index: in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php
===================================================================
--- in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php (working copy)
@@ -24,12 +24,12 @@
WHERE g.ClassName = "kGWGoogleCheckout"';
$payment_type_id = $application->Conn->GetOne($sql);
- $order =& $application->recallObject('ord', null, Array ('skip_autoload' => true));
+ $order = $application->recallObject('ord', null, Array ('skip_autoload' => true));
/* @var $order OrdersItem */
$gw_data = $order->getGatewayData($payment_type_id);
$application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $application->recallObject( $gw_data['ClassName'] );
/* @var $gateway_object kGWGoogleCheckout */
$gateway_object->processNotification($gw_data['gw_params'], 'shippings');
Index: in-commerce/units/gateways/gw_classes/paybox.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paybox.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/paybox.php (working copy)
@@ -113,12 +113,12 @@
$this->parsed_responce = $result;
list ($sid, $auth_code) = explode(',', $result['reference']);
- $session =& $this->Application->recallObject('Session');
+ $session = $this->Application->recallObject('Session');
$session->SID = $sid;
$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE md5(OrderId) = '.$this->Conn->qstr($auth_code));
$this->Application->SetVar('ord_id', $order_id);
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
$order->Load($order_id);
return $result['error'] === '00000' ? 1 : 0;
Index: in-commerce/units/gateways/gw_classes/paymentech.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paymentech.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/paymentech.php (working copy)
@@ -72,7 +72,7 @@
'ShippingRef' => '',
);
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$data['AVScountryCode'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
@@ -166,7 +166,7 @@
function setGWResponce($gw_params, $headers, $xml)
{
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->SetHeaders($headers);
@@ -186,7 +186,7 @@
{
if( !isset($gw_responce) ) $gw_responce = $this->gw_responce;
- $parser =& $this->Application->recallObject('kXMLHelper');
+ $parser = $this->Application->recallObject('kXMLHelper');
$parser->Clear();
$res = $parser->Parse($gw_responce);
Index: in-commerce/units/gateways/gw_classes/paypal.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paypal.php (revision 15134)
+++ in-commerce/units/gateways/gw_classes/paypal.php (working copy)
@@ -81,7 +81,7 @@
$ret['state'] = $item_data['BillingState'];
$ret['zip'] = $item_data['BillingZip'];
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
@@ -146,7 +146,7 @@
$ret['state'] = $item_data['BillingState'];
$ret['zip'] = $item_data['BillingZip'];
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
@@ -172,7 +172,7 @@
// status, of that PayPal server really has sent such notification to us
$status_map = Array('INVALID' => 0, 'VERIFIED' => 1);
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->SetPostData($_POST);
Index: in-commerce/units/gateways/gw_classes/paypal_direct.php
===================================================================
--- in-commerce/units/gateways/gw_classes/paypal_direct.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/paypal_direct.php (working copy)
@@ -77,7 +77,7 @@
$post_fields['CITY'] = $item_data['BillingCity'];
$post_fields['STATE'] = $item_data['BillingState'];
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$post_fields['COUNTRYCODE'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
@@ -129,7 +129,7 @@
// print_r($post_fields);
// exit;
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->SetPostData($post_fields);
@@ -175,7 +175,7 @@
if( $this->IsTestMode() ) $post_fields['x_test_request'] = 'True';
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
$curl_helper->SetPostData($post_fields);
$this->gw_responce = $curl_helper->Send($gw_params['submit_url']);
Index: in-commerce/units/gateways/gw_classes/rightconnect.php
===================================================================
--- in-commerce/units/gateways/gw_classes/rightconnect.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/rightconnect.php (working copy)
@@ -109,7 +109,7 @@
$post_fields["email"] = $item_data['BillingEmail'];
$post_fields["ADMIN_EMAIL"] = $this->Application->ConfigValue('DefaultEmailSender');
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->SetPostData($post_fields);
Index: in-commerce/units/gateways/gw_classes/sella_guestpay.php
===================================================================
--- in-commerce/units/gateways/gw_classes/sella_guestpay.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/sella_guestpay.php (working copy)
@@ -69,7 +69,7 @@
$b = join($separator, $b);
$url = 'https://ecomm.sella.it/CryptHTTPS/Encrypt.asp?a='.$a.'&b='.$b.'&c=2.0';
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$res = $curl_helper->Send($url);
@@ -92,19 +92,19 @@
$b = $_REQUEST['b'];
$url = 'https://ecomm.sella.it/CryptHTTPS/Decrypt.asp?a='.$a.'&b='.$b.'&c=2.0';
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$ret = $curl_helper->Send($url);
$result = $this->parseGWResponce($ret);
list ($sid, $auth_code) = explode(',', $result['CUSTOM_INFO']);
- $session =& $this->Application->recallObject('Session');
+ $session = $this->Application->recallObject('Session');
$session->SID = $sid;
$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE md5(OrderId) = '.$this->Conn->qstr($auth_code));
$this->Application->SetVar('ord_id', $order_id);
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
$order->Load($order_id);
if ($this->Application->GetVar('sella_ok')) {
Index: in-commerce/units/gateways/gw_classes/verisign_pflink.php
===================================================================
--- in-commerce/units/gateways/gw_classes/verisign_pflink.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/verisign_pflink.php (working copy)
@@ -91,12 +91,12 @@
{
$result = $this->parseGWResponce($_POST);
- $session =& $this->Application->recallObject('Session');
+ $session = $this->Application->recallObject('Session');
$session->SID = $_POST['USER2'];
$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE OrderId = '.$_POST['USER1']);
$this->Application->SetVar('ord_id', $order_id);
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
$order->Load($order_id);
define('ADMIN', 1);
Index: in-commerce/units/gateways/gw_classes/worldpay.php
===================================================================
--- in-commerce/units/gateways/gw_classes/worldpay.php (revision 15111)
+++ in-commerce/units/gateways/gw_classes/worldpay.php (working copy)
@@ -74,7 +74,7 @@
}
$ret['postcode'] = $item_data['BillingZip'];
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$ret['country'] = $cs_helper->getCountryIso( $item_data['BillingCountry'] );
@@ -106,7 +106,7 @@
$transaction_status = $this->Application->GetVar('transStatus') == 'Y' ? 1 : 0;
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$url = $this->Application->GetVar($transaction_status ? 'MC_return_page' : 'MC_cancel_return_page');
Index: in-commerce/units/gateways/gw_event_handler.php
===================================================================
--- in-commerce/units/gateways/gw_event_handler.php (revision 15134)
+++ in-commerce/units/gateways/gw_event_handler.php (working copy)
@@ -23,7 +23,7 @@
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
$PaymentType_info = $this->Application->GetVar( 'pt' );
- $GWConfigValue =& $this->Application->recallObject('gwfv');
+ $GWConfigValue = $this->Application->recallObject('gwfv');
$GWConfigValue->SetDBField('PaymentTypeId', $this->Application->GetVar('pt_id'));
//deleting old values
Index: in-commerce/units/gateways/gw_tag_processor.php
===================================================================
--- in-commerce/units/gateways/gw_tag_processor.php (revision 15111)
+++ in-commerce/units/gateways/gw_tag_processor.php (working copy)
@@ -35,7 +35,7 @@
function initGWConfigValues()
{
$payment_type_id = $this->Application->GetVar('pt_id');
- $GWConfigValue =& $this->Application->recallObject('gwfv');
+ $GWConfigValue = $this->Application->recallObject('gwfv');
$sql = 'SELECT Value, GWConfigFieldId FROM '.$GWConfigValue->TableName.' WHERE PaymentTypeId = '.$payment_type_id;
$this->ConfigValues = $this->Conn->GetCol($sql,'GWConfigFieldId');
@@ -62,7 +62,7 @@
function PrintList($params)
{
- $list =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List', $params);
+ $list = $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List', $params);
$id_field = $this->Application->getUnitOption($this->Prefix,'IDField');
$list->Query();
@@ -72,7 +72,7 @@
$block_params['name']=$params['block'];
$block_params['pass_params']='true';
- $payment_type_object =& $this->Application->recallObject('pt');
+ $payment_type_object = $this->Application->recallObject('pt');
$o = '';
Index: in-commerce/units/gift_certificates/gift_certificates_eh.php
===================================================================
--- in-commerce/units/gift_certificates/gift_certificates_eh.php (revision 15134)
+++ in-commerce/units/gift_certificates/gift_certificates_eh.php (working copy)
@@ -117,7 +117,7 @@
$object->setRequired('RecipientEmail', false);
}
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
if ( !$cs_helper->CountryHasStates($object->GetDBField('RecipientCountry')) ) {
Index: in-commerce/units/gift_certificates/gift_certificates_tp.php
===================================================================
--- in-commerce/units/gift_certificates/gift_certificates_tp.php (revision 15111)
+++ in-commerce/units/gift_certificates/gift_certificates_tp.php (working copy)
@@ -14,7 +14,7 @@
defined('FULL_PATH') or die('restricted access!');
class GiftCertificateTagProcessor extends kDBTagProcessor {
-
+
function HasOrder($params)
{
if ($this->IsNewItem($params)) {
@@ -39,7 +39,7 @@
$params[$this->getPrefixSpecial().'_id'] = $this->Application->RecallVar('print_certificate_id');
$this->Application->RemoveVar('print_certificate_id');
- $main_processor =& $this->Application->recallTagProcessor('m');
+ $main_processor = $this->Application->recallTagProcessor('m');
/* @var $main_processor kMainTagProcessor */
return $main_processor->Link($params);
Index: in-commerce/units/helpers/bank_lv_currency_rates.php
===================================================================
--- in-commerce/units/helpers/bank_lv_currency_rates.php (revision 15111)
+++ in-commerce/units/helpers/bank_lv_currency_rates.php (working copy)
@@ -26,7 +26,7 @@
{
$xml_parser = xml_parser_create();
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$xml = $curl_helper->Send($this->RateSource);
Index: in-commerce/units/helpers/currency_rates.php
===================================================================
--- in-commerce/units/helpers/currency_rates.php (revision 15111)
+++ in-commerce/units/helpers/currency_rates.php (working copy)
@@ -91,7 +91,7 @@
function StoreRates($currencies=null)
{
- $curr_object =& $this->Application->recallObject('curr', null, Array ('skip_autoload' => true));
+ $curr_object = $this->Application->recallObject('curr', null, Array ('skip_autoload' => true));
/* @var $curr_object kDBItem */
if ($currencies) {
Index: in-commerce/units/helpers/ecb_currency_rates.php
===================================================================
--- in-commerce/units/helpers/ecb_currency_rates.php (revision 15111)
+++ in-commerce/units/helpers/ecb_currency_rates.php (working copy)
@@ -26,7 +26,7 @@
{
$xml_parser = xml_parser_create();
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$xml = $curl_helper->Send($this->RateSource);
Index: in-commerce/units/helpers/frny_currency_rates.php
===================================================================
--- in-commerce/units/helpers/frny_currency_rates.php (revision 15111)
+++ in-commerce/units/helpers/frny_currency_rates.php (working copy)
@@ -24,7 +24,7 @@
function GetRatesData()
{
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
for($i = 0; $i < 10; $i++)
Index: in-commerce/units/helpers/order_helper.php
===================================================================
--- in-commerce/units/helpers/order_helper.php (revision 15111)
+++ in-commerce/units/helpers/order_helper.php (working copy)
@@ -29,7 +29,7 @@
'errors' => $errors ? unserialize($errors) : Array (),
);
- $items =& $this->Application->recallObject('orditems', 'orditems_List', Array ('per_page' => -1));
+ $items = $this->Application->recallObject('orditems', 'orditems_List', Array ('per_page' => -1));
/* @var $items kDBList */
$items->Query();
@@ -41,7 +41,7 @@
return $ret;
}
- $product =& $this->Application->recallObject('p', null, Array ('skip_autoload' => true));
+ $product = $this->Application->recallObject('p', null, Array ('skip_autoload' => true));
/* @var $product kCatDBItem */
$sql = $product->GetSelectSQL() . '
@@ -71,7 +71,7 @@
$row_index = $items->GetDBField('ProductId') . ':' . $items->GetDBField('OptionsSalt') . ':' . $items->GetDBField('BackOrderFlag');
- $image_helper =& $this->Application->recallObject('ImageHelper');
+ $image_helper = $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
// TODO: find a way to specify thumbnail size & default image
@@ -109,7 +109,7 @@
function convertCurrency($amount, $currency)
{
- $converter =& $this->Application->recallObject('CurrencyRates');
+ $converter = $this->Application->recallObject('CurrencyRates');
/* @var $converter CurrencyRates */
// convert primary currency to selected (if they are the same, converter will just return)
Index: in-commerce/units/manufacturers/manufacturers_event_handler.php
===================================================================
--- in-commerce/units/manufacturers/manufacturers_event_handler.php (revision 15134)
+++ in-commerce/units/manufacturers/manufacturers_event_handler.php (working copy)
@@ -93,7 +93,7 @@
{
parent::OnAfterItemLoad($event);
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'State', 'Country');
@@ -110,7 +110,7 @@
{
parent::OnBeforeItemUpdate($event);
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->CheckStateField($event, 'State', 'Country');
@@ -128,7 +128,7 @@
{
parent::OnBeforeItemCreate($event);
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->CheckStateField($event, 'State', 'Country');
Index: in-commerce/units/order_items/order_items_event_handler.php
===================================================================
--- in-commerce/units/order_items/order_items_event_handler.php (revision 15134)
+++ in-commerce/units/order_items/order_items_event_handler.php (working copy)
@@ -51,7 +51,7 @@
// = allows selecting one item at a time, but we leave this code just in case :)
$product_ids = explode(',', $product_ids);
- $product_object =& $this->Application->recallObject('p.-item', null, array('skip_autoload' => true));
+ $product_object = $this->Application->recallObject('p.-item', null, array('skip_autoload' => true));
/* @var $product_object ProductsItem */
foreach ($product_ids as $product_id) {
@@ -72,7 +72,7 @@
$this->Application->EventManager->openerStackPush('in-commerce/orders/order_product_edit', $url_params);
}
else {
- $orders_h =& $this->Application->recallObject('ord_EventHandler');
+ $orders_h = $this->Application->recallObject('ord_EventHandler');
/* @var $orders_h OrdersEventHandler */
// 1 for PacakgeNum - temporary solution to overcome splitting into separate sub-orders
@@ -106,7 +106,7 @@
$table_info = $object->getLinkedInfo();
- $main_object =& $this->Application->recallObject($table_info['ParentPrefix']);
+ $main_object = $this->Application->recallObject($table_info['ParentPrefix']);
/* @var $main_object OrdersItem */
foreach ($items_info as $id => $field_values) {
@@ -176,7 +176,7 @@
if ( $changed_fields ) {
$table_info = $object->getLinkedInfo();
- $main_object =& $this->Application->recallObject($table_info['ParentPrefix']);
+ $main_object = $this->Application->recallObject($table_info['ParentPrefix']);
/* @var $main_object OrdersItem */
$oi_string = $object->GetDBField('ProductId') . ':' . $object->GetDBField('OptionsSalt') . ':' . $object->GetDBField('BackOrderFlag');
@@ -358,7 +358,7 @@
return true;
}
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
/* @var $order kDBItem */
if ( $order->isLoaded() && ($order->GetID() == $object->GetDBField('OrderId')) ) {
Index: in-commerce/units/order_items/order_items_tag_processor.php
===================================================================
--- in-commerce/units/order_items/order_items_tag_processor.php (revision 15111)
+++ in-commerce/units/order_items/order_items_tag_processor.php (working copy)
@@ -17,7 +17,7 @@
{
function PrintGrid($params)
{
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
/* @var $order kDBList */
if ( $order->GetDBField('Status') != ORDER_STATUS_INCOMPLETE ) {
@@ -71,7 +71,7 @@
$render_as = $this->SelectParam($params, 'render_as');
$block_params['name'] = $render_as;
- $opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+ $opt_helper = $this->Application->recallObject('kProductOptionsHelper');
/* @var $opt_helper kProductOptionsHelper */
$o = '';
@@ -99,7 +99,7 @@
$val = join(',', $val);
}*/
- $lang =& $this->Application->recallObject('lang.current');
+ $lang = $this->Application->recallObject('lang.current');
/* @var $lang LanguagesItem */
if ( $render_as ) {
@@ -219,7 +219,7 @@
$block_params['name'] = $this->SelectParam($params, 'render_as,block');
$block_params['pass_params'] = 'true';
- $product_object =& $this->Application->recallObject('p', 'p', Array ('skip_autoload' => true));
+ $product_object = $this->Application->recallObject('p', 'p', Array ('skip_autoload' => true));
/* @var $product_object kCatDBItem */
$i = 0;
@@ -267,7 +267,7 @@
}
$options = getArrayValue($item_data, 'Options');
- $helper =& $this->Application->recallObject('kProductOptionsHelper');
+ $helper = $this->Application->recallObject('kProductOptionsHelper');
/* @var $helper kProductOptionsHelper */
$crc = $helper->OptionsSalt($options, true);
@@ -292,7 +292,7 @@
$object =& $this->getObject($params);
/* @var $object kDBItem */
- $order_helper =& $this->Application->recallObject('OrderHelper');
+ $order_helper = $this->Application->recallObject('OrderHelper');
/* @var $order_helper OrderHelper */
return $order_helper->eligibleForFreePromoShipping($object);
Index: in-commerce/units/orders/order_calculator.php
===================================================================
--- in-commerce/units/orders/order_calculator.php (revision 15111)
+++ in-commerce/units/orders/order_calculator.php (working copy)
@@ -546,7 +546,7 @@
{
$addition = 0;
- $opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+ $opt_helper = $this->Application->recallObject('kProductOptionsHelper');
/* @var $opt_helper kProductOptionsHelper */
foreach ($item_data['Options'] as $opt => $val) {
@@ -643,7 +643,7 @@
*/
public function generateOptionsSalt($options)
{
- $opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+ $opt_helper = $this->Application->recallObject('kProductOptionsHelper');
/* @var $opt_helper kProductOptionsHelper */
return $opt_helper->OptionsSalt($options, true);
Index: in-commerce/units/orders/order_manager.php
===================================================================
--- in-commerce/units/orders/order_manager.php (revision 15111)
+++ in-commerce/units/orders/order_manager.php (working copy)
@@ -69,7 +69,7 @@
{
parent::__construct();
- $this->calculator =& $this->Application->makeClass('OrderCalculator');
+ $this->calculator = $this->Application->makeClass('OrderCalculator');
$this->calculator->setManager($this);
$this->reset();
@@ -218,7 +218,7 @@
{
$ret = false;
- $order_item =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
+ $order_item = $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
/* @var $order_item kDBItem */
foreach ($this->operations as $operation) {
@@ -376,7 +376,7 @@
*/
protected function getProductField($product_id, $field)
{
- $product =& $this->Application->recallObject('p', null, Array ('skip_autoload' => true));
+ $product = $this->Application->recallObject('p', null, Array ('skip_autoload' => true));
/* @var $product kCatDBItem */
if ( !$product->isLoaded() || ($product->GetID() != $product_id) ) {
Index: in-commerce/units/orders/order_validator.php
===================================================================
--- in-commerce/units/orders/order_validator.php (revision 15134)
+++ in-commerce/units/orders/order_validator.php (working copy)
@@ -121,7 +121,7 @@
$gw_data = $this->dataSource->getGatewayData();
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $this->Application->recallObject( $gw_data['ClassName'] );
$test_numbers = $gateway_object->GetTestCCNumbers();
Index: in-commerce/units/orders/orders_event_handler.php
===================================================================
--- in-commerce/units/orders/orders_event_handler.php (revision 15134)
+++ in-commerce/units/orders/orders_event_handler.php (working copy)
@@ -37,7 +37,7 @@
// when POST is present, then check when is beeing submitted
$order_session_id = $this->Application->RecallVar($event->getPrefixSpecial(true) . '_id');
- $order_dummy =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
+ $order_dummy = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $order_dummy OrdersItem */
foreach ($items_info as $id => $field_values) {
@@ -204,13 +204,13 @@
$billing_address_id = $this->Application->GetVar('billing_address_id');
if ($shipping_address_id || $billing_address_id) {
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
- $address =& $this->Application->recallObject('addr.-item','addr', Array('skip_autoload' => true));
+ $address = $this->Application->recallObject('addr.-item','addr', Array('skip_autoload' => true));
/* @var $address AddressesItem */
- $addr_list =& $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
+ $addr_list = $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
/* @var $addr_list AddressesList */
$addr_list->Query();
@@ -303,7 +303,7 @@
*/
function updateUserID($order_id, $event)
{
- $user =& $this->Application->recallObject('u.current');
+ $user = $this->Application->recallObject('u.current');
/* @var $user UsersItem */
$affiliate_id = $this->isAffiliate( $user->GetID() );
@@ -331,7 +331,7 @@
function isAffiliate($user_id)
{
- $affiliate_user =& $this->Application->recallObject('affil.-item', null, Array('skip_autoload' => true) );
+ $affiliate_user = $this->Application->recallObject('affil.-item', null, Array('skip_autoload' => true) );
/* @var $affiliate_user kDBItem */
$affiliate_user->Load($user_id, 'PortalUserId');
@@ -350,7 +350,7 @@
$gw_data = $order->getGatewayData();
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $this->Application->recallObject( $gw_data['ClassName'] );
/* @var $gateway_object kGWBase */
$payment_result = $gateway_object->DirectPayment($order->GetFieldValues(), $gw_data['gw_params']);
@@ -382,7 +382,7 @@
function PrepareCoupons($event, &$order)
{
- $order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
+ $order_items = $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
/* @var $order_items kDBList */
$order_items->linkToParent($order->Special);
@@ -390,7 +390,7 @@
$order_items->GoFirst();
$assigned_coupons = array();
- $coup_handler =& $this->Application->recallObject('coup_EventHandler');
+ $coup_handler = $this->Application->recallObject('coup_EventHandler');
foreach($order_items->Records as $product_item)
{
if ($product_item['ItemData']) {
@@ -398,7 +398,7 @@
if (isset($item_data['AssignedCoupon']) && $item_data['AssignedCoupon']) {
$coupon_id = $item_data['AssignedCoupon'];
// clone coupon, get new coupon ID
- $coupon =& $this->Application->recallObject('coup',null,array('skip_autload' => true));
+ $coupon = $this->Application->recallObject('coup',null,array('skip_autload' => true));
/* @var $coupon kDBItem */
$coupon->Load($coupon_id);
if (!$coupon->isLoaded()) continue;
@@ -460,7 +460,7 @@
}
// call CompleteOrder events for items in order BEFORE SplitOrder (because ApproveEvents are called there)
- $order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
+ $order_items = $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
/* @var $order_items kDBList */
$order_items->linkToParent($order->Special);
@@ -574,7 +574,7 @@
function OnContinueShopping($event)
{
- $order_helper =& $this->Application->recallObject('OrderHelper');
+ $order_helper = $this->Application->recallObject('OrderHelper');
/* @var $order_helper OrderHelper */
$template = $this->Application->GetVar('continue_shopping_template');
@@ -776,12 +776,12 @@
$object =& $event->getObject();
/* @var $object kDBItem */
- $addr_list =& $this->Application->recallObject('addr', 'addr_List', Array ('per_page' => -1, 'skip_counting' => true));
+ $addr_list = $this->Application->recallObject('addr', 'addr_List', Array ('per_page' => -1, 'skip_counting' => true));
/* @var $addr_list kDBList */
$addr_list->Query();
- $address_dummy =& $this->Application->recallObject('addr.-item', null, Array ('skip_autoload' => true));
+ $address_dummy = $this->Application->recallObject('addr.-item', null, Array ('skip_autoload' => true));
/* @var $address_dummy AddressesItem */
$address_prefixes = Array ('Billing', 'Shipping');
@@ -871,7 +871,7 @@
// 4. remove "orditems" object of kDBItem class, since getOrderInfo uses kDBList object under same prefix
$this->Application->removeObject('orditems');
- $order_helper =& $this->Application->recallObject('OrderHelper');
+ $order_helper = $this->Application->recallObject('OrderHelper');
/* @var $order_helper OrderHelper */
$event->status = kEvent::erSTOP;
@@ -927,7 +927,7 @@
$item_data = $default_item_data;
- $product =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+ $product = $this->Application->recallObject('p', null, Array('skip_autoload' => true));
/* @var $product ProductsItem */
$product->Load($item_id);
@@ -958,7 +958,7 @@
{
$package_content_ids = $product->GetPackageContentIds();
- $product_package_item =& $this->Application->recallObject('p.-packageitem');
+ $product_package_item = $this->Application->recallObject('p.-packageitem');
/* @var $product_package_item ProductsItem */
$package_item_data = array();
@@ -1112,7 +1112,7 @@
if (!$options) return;
- $ord_item =& $this->Application->recallObject('orditems.-opt', null, Array ('skip_autoload' => true));
+ $ord_item = $this->Application->recallObject('orditems.-opt', null, Array ('skip_autoload' => true));
/* @var $ord_item kDBItem */
$ord_item->Load($this->Application->GetVar('orditems_id'));
@@ -1178,7 +1178,7 @@
$object =& $event->getObject();
/* @var $object OrdersItem */
- $coupon =& $this->Application->recallObject('coup', null, Array ('skip_autoload' => true));
+ $coupon = $this->Application->recallObject('coup', null, Array ('skip_autoload' => true));
/* @var $coupon kDBItem */
$coupon->Load($code, 'Code');
@@ -1220,7 +1220,7 @@
$coupon->Update();
$this->Application->setUnitOption('ord', 'AutoLoad', true);
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
/* @var $order OrdersItem */
$order->SetDBField('CouponId', $coupon->GetDBField('CouponId'));
@@ -1256,7 +1256,7 @@
*/
function RemoveCoupon(&$object)
{
- $coupon =& $this->Application->recallObject('coup', null, Array('skip_autoload' => true));
+ $coupon = $this->Application->recallObject('coup', null, Array('skip_autoload' => true));
/* @var $coupon kDBItem */
$coupon->Load( $object->GetDBField('CouponId') );
@@ -1426,7 +1426,7 @@
// get user
if ( $this->Application->LoggedIn() ) {
- $user =& $this->Application->recallObject('u.current');
+ $user = $this->Application->recallObject('u.current');
/* @var $user UsersItem */
$user_id = $user->GetID();
@@ -1514,7 +1514,7 @@
$order =& $event->getObject();
/* @var $order OrdersItem */
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -1645,7 +1645,7 @@
function OnReserveItems($event)
{
- $order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
+ $order_items = $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
/* @var $order_items kDBList */
$order_items->linkToParent('-inv');
@@ -1658,15 +1658,15 @@
// query all combinations used in this order
- $product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+ $product_object = $this->Application->recallObject('p', null, Array('skip_autoload' => true));
/* @var $product_object kCatDBItem */
$product_object->SwitchToLive();
- $order_item =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
+ $order_item = $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
/* @var $order_item kDBItem */
- $combination_item =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
+ $combination_item = $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
/* @var $combination_item kDBItem */
$combinations = $this->queryCombinations($order_items);
@@ -1871,9 +1871,9 @@
*/
function approveOrder(&$order_items)
{
- $product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
- $order_item =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
- $combination_item =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
+ $product_object = $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+ $order_item = $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
+ $combination_item = $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
$combinations = $this->queryCombinations($order_items);
@@ -1916,15 +1916,15 @@
*/
function restoreOrder(&$order_items)
{
- $product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+ $product_object = $this->Application->recallObject('p', null, Array('skip_autoload' => true));
/* @var $product_object kCatDBItem */
$product_object->SwitchToLive();
- $order_item =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
+ $order_item = $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
/* @var $order_item kDBItem */
- $combination_item =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
+ $combination_item = $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
/* @var $combination_item kDBItem */
$combinations = $this->queryCombinations($order_items);
@@ -1954,7 +1954,7 @@
$inv_object->SetDBField('QtyInStock', $inv_object->GetDBField('QtyInStock') + $rec['QuantityReserved']);
$inv_object->Update();
- $product_h =& $this->Application->recallObject('p_EventHandler');
+ $product_h = $this->Application->recallObject('p_EventHandler');
/* @var $product_h ProductsEventHandler */
if ($product_object->GetDBField('InventoryStatus') == 2) {
@@ -1993,7 +1993,7 @@
}
// process order products
- $object =& $this->Application->recallObject($event->Prefix . '.-inv', null, Array ('skip_autoload' => true));
+ $object = $this->Application->recallObject($event->Prefix . '.-inv', null, Array ('skip_autoload' => true));
/* @var $object kDBItem */
$ids = $this->StoreSelectedIDs($event);
@@ -2026,14 +2026,14 @@
'OnOrderProcess' => ORDER_STATUS_TOSHIP,
);
- $order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
+ $order_items = $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
/* @var $order_items kDBList */
$order_items->linkToParent('-inv');
$order_items->Query();
$order_items->GoFirst();
- $object =& $this->Application->recallObject($event->Prefix.'.-inv');
+ $object = $this->Application->recallObject($event->Prefix.'.-inv');
/* @var $object OrdersItem */
if ($object->GetDBField('OnHold')) {
@@ -2073,7 +2073,7 @@
$gw_data = $object->getGatewayData();
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $this->Application->recallObject( $gw_data['ClassName'] );
/* @var $gateway_object kGWBase */
$charge_result = $gateway_object->Charge($object->GetFieldValues(), $gw_data['gw_params']);
@@ -2083,7 +2083,7 @@
$object->SetDBField('GWResult2', $gateway_object->getGWResponce() );
if ($charge_result) {
- $product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+ $product_object = $this->Application->recallObject('p', null, Array('skip_autoload' => true));
/* @var $product_object ProductsItem */
foreach ($order_items->Records as $product_item) {
@@ -2138,7 +2138,7 @@
if ( $gw_data ) {
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH . '/' . $gw_data['ClassFile'] );
- $gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $this->Application->recallObject( $gw_data['ClassName'] );
$gateway_object->OrderDeclined($object->GetFieldValues(), $gw_data['gw_params']);
}
@@ -2162,7 +2162,7 @@
$shipping_info = $object->GetDBField('ShippingInfo');
if ($shipping_info) {
- $quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
+ $quote_engine_collector = $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
$shipping_info = unserialize($shipping_info);
@@ -2171,7 +2171,7 @@
// try to create usps order
if (($object->GetDBField('ShippingType') == 0) && ($sqe_class_name !== false)) {
- $shipping_quote_engine =& $this->Application->recallObject($sqe_class_name);
+ $shipping_quote_engine = $this->Application->recallObject($sqe_class_name);
/* @var $shipping_quote_engine ShippingQuoteEngine */
$ret = $shipping_quote_engine->MakeOrder($object);
@@ -2192,7 +2192,7 @@
$gw_data = $object->getGatewayData();
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $this->Application->recallObject( $gw_data['ClassName'] );
$gateway_object->OrderShipped($object->GetFieldValues(), $gw_data['gw_params']);
}
@@ -2348,7 +2348,7 @@
$object->SetDBField('PaymentCVV2', $this->Application->RecallVar('CVV2Code'));
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
@@ -2371,7 +2371,7 @@
{
parent::OnBeforeItemCreate($event);
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
@@ -2407,7 +2407,7 @@
}
}
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
@@ -2444,7 +2444,7 @@
// guess fields from "One Step Checkout" form
if ( $object->GetDBField('PaymentAccount') ) {
- $order_helper =& $this->Application->recallObject('OrderHelper');
+ $order_helper = $this->Application->recallObject('OrderHelper');
/* @var $order_helper OrderHelper */
$object->SetDBField('PaymentCardType', $order_helper->getCreditCartType($object->GetDBField('PaymentAccount')));
@@ -2474,7 +2474,7 @@
$order =& $event->getObject();
/* @var $order OrdersItem */
- $order_helper =& $this->Application->recallObject('OrderHelper');
+ $order_helper = $this->Application->recallObject('OrderHelper');
/* @var $order_helper OrderHelper */
$user_fields = $order_helper->getUserFields($order);
@@ -2487,7 +2487,7 @@
$this->Application->HandleEvent(new kEvent('u.register:OnCreate'));
}
else {
- $user =& $this->Application->recallObject('u.current');
+ $user = $this->Application->recallObject('u.current');
/* @var $user UsersItem */
$user->SetFieldsFromHash($user_fields);
@@ -2817,7 +2817,7 @@
$skip_types = Array (PRODUCT_TYPE_TANGIBLE, PRODUCT_TYPE_DOWNLOADABLE);
foreach ($sub_orders as $sub_order_data) {
- $sub_order =& $this->Application->recallObject('ord.-sub'.$next_sub_number, 'ord');
+ $sub_order = $this->Application->recallObject('ord.-sub'.$next_sub_number, 'ord');
/* @var $sub_order OrdersItem */
if ($this->UseTempTables($event) && $next_sub_number == 0) {
@@ -2993,7 +2993,7 @@
function OptionsSalt($options, $comb_only=false)
{
- $helper =& $this->Application->recallObject('kProductOptionsHelper');
+ $helper = $this->Application->recallObject('kProductOptionsHelper');
return $helper->OptionsSalt($options, $comb_only);
}
@@ -3010,15 +3010,15 @@
}
// Loading product to add
- $product =& $this->Application->recallObject('p.toadd', null, Array('skip_autoload' => true));
+ $product = $this->Application->recallObject('p.toadd', null, Array('skip_autoload' => true));
/* @var $product kDBItem */
$product->Load($item_id);
- $object =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
+ $object = $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
/* @var $object kDBItem */
- $order =& $this->Application->recallObject('ord');
+ $order = $this->Application->recallObject('ord');
/* @var $order kDBItem */
if (!$order->isLoaded() && !$this->Application->isAdmin) {
@@ -3041,7 +3041,7 @@
return;
}
- $manager =& $this->Application->recallObject('OrderManager');
+ $manager = $this->Application->recallObject('OrderManager');
/* @var $manager OrderManager */
$manager->setOrder($order);
@@ -3114,7 +3114,7 @@
return;
}
- $manager =& $this->Application->recallObject('OrderManager');
+ $manager = $this->Application->recallObject('OrderManager');
/* @var $manager OrderManager */
$manager->setOrder($order);
@@ -3164,7 +3164,7 @@
/* function GetShippingCost($user_country_id, $user_state_id, $user_zip, $weight, $items, $amount, $shipping_type)
{
$this->Application->recallObject('ShippingQuoteEngine');
- $shipping_h =& $this->Application->recallObject('CustomShippingQuoteEngine');
+ $shipping_h = $this->Application->recallObject('CustomShippingQuoteEngine');
$query = $shipping_h->QueryShippingCost($user_country_id, $user_state_id, $user_zip, $weight, $items, $amount, $shipping_type);
$cost = $this->Conn->GetRow($query);
return $cost['TotalCost'];
@@ -3243,7 +3243,7 @@
$template = $this->Application->GetVar('t');
$shipping_templates = Array ('in-commerce/checkout/shipping', 'in-commerce/orders/orders_edit_shipping');
- $quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
+ $quote_engine_collector = $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
foreach ($shipping_ids as $package => $id) {
@@ -3252,7 +3252,7 @@
$sqe_class_name = $quote_engine_collector->GetClassByType($shipping_types, $package);
if (($object->GetDBField('ShippingType') == 0) && ($sqe_class_name !== false) && in_array($template, $shipping_templates)) {
- $shipping_quote_engine =& $this->Application->recallObject($sqe_class_name);
+ $shipping_quote_engine = $this->Application->recallObject($sqe_class_name);
/* @var $shipping_quote_engine ShippingQuoteEngine */
// USPS related part
@@ -3287,8 +3287,8 @@
/*function shipOrder(&$order_items)
{
- $product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
- $order_item =& $this->Application->recallObject('orditems.-item');
+ $product_object = $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+ $order_item = $this->Application->recallObject('orditems.-item');
while( !$order_items->EOL() )
{
@@ -3342,7 +3342,7 @@
{
$object =& $event->getObject();
- $coupon =& $this->Application->recallObject('coup', null, Array('skip_autoload' => true));
+ $coupon = $this->Application->recallObject('coup', null, Array('skip_autoload' => true));
if(!$coupon->Load( $object->GetDBField('CouponId'), 'CouponId' ))
{
return false;
@@ -3400,7 +3400,7 @@
$prefix_special = $event->Prefix.'.'.$this->getSpecialByType($order_status);
- $orders_list =& $this->Application->recallObject($prefix_special, $event->Prefix.'_List', Array('per_page'=>-1) );
+ $orders_list = $this->Application->recallObject($prefix_special, $event->Prefix.'_List', Array('per_page'=>-1) );
/* @var $orders_list kDBList */
$orders_list->Query();
@@ -3502,7 +3502,7 @@
}
// process only valid orders
- $temp_handler =& $this->Application->recallObject($event->Prefix.'_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->Prefix.'_TempHandler', 'kTempTablesHandler');
$cloned_order_ids = $temp_handler->CloneItems($event->Prefix, 'recurring', $order_ids);
$order =& $this->Application->recallObject($event->Prefix.'.recurring', null, Array('skip_autoload' => true));
foreach ($cloned_order_ids as $order_id) {
@@ -3558,7 +3558,7 @@
$this->Application->InitParser();
$o = $this->Application->ParseBlock(array('name'=>'in-commerce/orders/orders_pdf'));
- $file_helper =& $this->Application->recallObject('FileHelper');
+ $file_helper = $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$file_helper->CheckFolder(EXPORT_PATH);
@@ -3585,7 +3585,7 @@
@unlink($pdfFile);
- $pdf_helper =& $this->Application->recallObject('kPDFHelper');
+ $pdf_helper = $this->Application->recallObject('kPDFHelper');
$pdf_helper->FileToFile($htmlFile, $pdfFile);
return ;
@@ -3656,7 +3656,7 @@
$fields['Number']['format'] = str_replace('%06d', '%0'.$order_number.'d', $fields['Number']['format']);
$fields['SubNumber']['format'] = str_replace('%03d', '%0'.$order_sub_number.'d', $fields['SubNumber']['format']);
- $site_helper =& $this->Application->recallObject('SiteHelper');
+ $site_helper = $this->Application->recallObject('SiteHelper');
/* @var $site_helper SiteHelper */
$fields['BillingCountry']['default'] = $site_helper->getDefaultCountry('Billing');
@@ -3705,7 +3705,7 @@
$options = $event->getEventParam('options');
- $items_list =& $this->Application->recallObject($event->Prefix . '.' . $this->Application->RecallVar('export_oroginal_special'), $event->Prefix . '_List');
+ $items_list = $this->Application->recallObject($event->Prefix . '.' . $this->Application->RecallVar('export_oroginal_special'), $event->Prefix . '_List');
/* @var $items_list kDBList */
$items_list->SetPerPage(-1);
@@ -3719,7 +3719,7 @@
$event->setEventParam('options', $options);
- $object =& $this->Application->recallObject($event->Prefix . '.export');
+ $object = $this->Application->recallObject($event->Prefix . '.export');
/* @var $object kDBItem */
$object->SetField('Number', 999999);
@@ -3834,7 +3834,7 @@
$object =& $event->getObject();
/* @var $object OrdersItem */
- $gift_certificate =& $this->Application->recallObject('gc', null, Array ('skip_autoload' => true));
+ $gift_certificate = $this->Application->recallObject('gc', null, Array ('skip_autoload' => true));
/* @var $gift_certificate kDBItem */
$gift_certificate->Load($code, 'Code');
@@ -3976,7 +3976,7 @@
*/
function OnUpdateAjax($event)
{
- $ajax_form_helper =& $this->Application->recallObject('AjaxFormHelper');
+ $ajax_form_helper = $this->Application->recallObject('AjaxFormHelper');
/* @var $ajax_form_helper AjaxFormHelper */
$ajax_form_helper->transitEvent($event, 'OnUpdate');
Index: in-commerce/units/orders/orders_item.php
===================================================================
--- in-commerce/units/orders/orders_item.php (revision 15134)
+++ in-commerce/units/orders/orders_item.php (working copy)
@@ -112,7 +112,7 @@
*/
function getTaxPercent()
{
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$shipping_country_id = $cs_helper->getCountryStateId($this->GetDBField('ShippingCountry'), DESTINATION_TYPE_COUNTRY);
@@ -286,7 +286,7 @@
return;
}
- $gc =& $this->Application->recallObject('gc', null, Array('skip_autoload' => true));
+ $gc = $this->Application->recallObject('gc', null, Array('skip_autoload' => true));
/* @var $gc kDBItem */
$gc->Load($gc_id);
@@ -327,7 +327,7 @@
{
$gc_id = $this->GetDBField('GiftCertificateId');
- $gc =& $this->Application->recallObject('gc', null, Array('skip_autoload' => true));
+ $gc = $this->Application->recallObject('gc', null, Array('skip_autoload' => true));
/* @var $gc kDBItem */
$gc->Load($gc_id);
Index: in-commerce/units/orders/orders_tag_processor.php
===================================================================
--- in-commerce/units/orders/orders_tag_processor.php (revision 15111)
+++ in-commerce/units/orders/orders_tag_processor.php (working copy)
@@ -79,7 +79,7 @@
function Orderitems_ProductLink($params)
{
- $object =& $this->Application->recallObject('orditems');
+ $object = $this->Application->recallObject('orditems');
$url_params = Array (
'p_id' => $object->GetDBField('ProductId'),
@@ -91,7 +91,7 @@
function Orderitems_ProductExists($params)
{
- $object =& $this->Application->recallObject('orditems');
+ $object = $this->Application->recallObject('orditems');
return $object->GetDBField('ProductId') > 0;
}
@@ -134,13 +134,13 @@
function BackOrderFlag($params)
{
- $object =& $this->Application->recallObject('orditems');
+ $object = $this->Application->recallObject('orditems');
return $object->GetDBField('BackOrderFlag');
}
function OrderIcon($params)
{
- $object =& $this->Application->recallObject('orditems');
+ $object = $this->Application->recallObject('orditems');
if ($object->GetDBField('BackOrderFlag') == 0) {
return $params['ordericon'];
} else {
@@ -182,7 +182,7 @@
return 0;
}
- $object =& $this->Application->recallObject('orditems', 'orditems_List');
+ $object = $this->Application->recallObject('orditems', 'orditems_List');
/* @var $object kDBList */
$object->Query();
@@ -766,7 +766,7 @@
function OrdersLink(){
$params['pass']='m,ord';
- $main_processor =& $this->Application->RecallObject('m_TagProcessor');
+ $main_processor = $this->Application->recallObject('m_TagProcessor');
return $main_processor->Link($params);
}
@@ -776,7 +776,7 @@
{
$object =& $this->getObject($params);
- $address_list =& $this->Application->recallObject('addr','addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
+ $address_list = $this->Application->recallObject('addr','addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
$address_list->Query();
$address_id = $this->Application->GetVar($params['type'].'_address_id');
@@ -817,18 +817,18 @@
}
if ( isset($params['user_prefix']) ) {
- $user =& $this->Application->recallObject($params['user_prefix']);
+ $user = $this->Application->recallObject($params['user_prefix']);
/* @var $user kDBItem */
}
else {
- $user =& $this->Application->recallObject('u', null, Array ('skip_autoload' => true));
+ $user = $this->Application->recallObject('u', null, Array ('skip_autoload' => true));
/* @var $user kDBItem */
}
- $order =& $this->Application->recallObject($this->Prefix . '.last');
+ $order = $this->Application->recallObject($this->Prefix . '.last');
/* @var $order OrdersItem */
- $order_helper =& $this->Application->recallObject('OrderHelper');
+ $order_helper = $this->Application->recallObject('OrderHelper');
/* @var $order_helper OrderHelper */
$user_fields = $order_helper->getUserFields($order, $params['type'] == 'billing' ? 'Billing' : 'Shipping');
@@ -839,7 +839,7 @@
}
}
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates(new kEvent('u:OnBuild'), 'State', 'Country');
@@ -1007,7 +1007,7 @@
*/
function PrintOrderInfo($params)
{
- $order_helper =& $this->Application->recallObject('OrderHelper');
+ $order_helper = $this->Application->recallObject('OrderHelper');
/* @var $order_helper OrderHelper */
$object =& $this->getObject($params);
@@ -1074,7 +1074,7 @@
$gw_data = $object->getGatewayData( isset($params['payment_type_id']) ? $params['payment_type_id'] : null );
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $this->Application->recallObject( $gw_data['ClassName'] );
/* @var $gateway_object kGWBase */
return $gateway_object->getFormAction($gw_data['gw_params']);
@@ -1088,7 +1088,7 @@
$gw_data = $object->getGatewayData( isset($params['payment_type_id']) ? $params['payment_type_id'] : null );
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $this->Application->recallObject( $gw_data['ClassName'] );
/* @var $gateway_object kGWBase */
$tpl = '<input type="hidden" name="%s" value="%s" />'."\n";
@@ -1115,7 +1115,7 @@
$gw_data = $object->getGatewayData( isset($params['payment_type_id']) ? $params['payment_type_id'] : null );
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $this->Application->recallObject( $gw_data['ClassName'] );
/* @var $gateway_object kGWBase */
return $gateway_object->NeedPlaceButton($object->GetFieldValues(), $params, $gw_data['gw_params']);
@@ -1157,19 +1157,19 @@
{
$params['pass'] = 'all,orditems';
$params['m_cat_id'] = 0;
- $m_tag_processor =& $this->Application->recallObject('m_TagProcessor');
+ $m_tag_processor = $this->Application->recallObject('m_TagProcessor');
return $m_tag_processor->Link($params);
}
function DiscountField($params)
{
- $orditems =& $this->Application->recallObject( 'orditems' );
+ $orditems = $this->Application->recallObject( 'orditems' );
$item_data = $orditems->GetDBField('ItemData');
if(!$item_data) return '';
$item_data = unserialize($item_data);
$discount_prefix = ($item_data['DiscountType'] == 'coupon') ? 'coup' : 'd';
- $discount =& $this->Application->recallObject($discount_prefix, null, Array('skip_autoload' => true));
+ $discount = $this->Application->recallObject($discount_prefix, null, Array('skip_autoload' => true));
if(!$discount->isLoaded())
{
$discount->Load($item_data['DiscountId']);
@@ -1219,15 +1219,15 @@
function OrderProductEmail($params)
{
- $order =& $this->Application->recallObject('ord');
- $orditems =& $this->Application->recallObject('orditems');
+ $order = $this->Application->recallObject('ord');
+ $orditems = $this->Application->recallObject('orditems');
$sql = 'SELECT ResourceId
FROM '.TABLE_PREFIX.'Products
WHERE ProductId = '.$orditems->GetDBField('ProductId');
$resource_id = $this->Conn->GetOne($sql);
- $ml_formatter =& $this->Application->recallObject('kMultiLanguage');
+ $ml_formatter = $this->Application->recallObject('kMultiLanguage');
$custom_fields = $this->Application->getUnitOption('p', 'CustomFields');
$custom_name = $ml_formatter->LangFieldName('cust_'.array_search($params['msg_custom_field'], $custom_fields));
@@ -1254,13 +1254,13 @@
$to_email = $this->Conn->GetOne($sql);
}
- $esender =& $application->recallObject('EmailSender.-product');
+ $esender = $application->recallObject('EmailSender.-product');
/* @var $esender kEmailSendingHelper */
$esender->SetFrom($from_email, $from_name);
$esender->AddTo($to_email, $to_name);
- $email_events_eh =& $this->Application->recallObject('emailevents_EventHandler');
+ $email_events_eh = $this->Application->recallObject('emailevents_EventHandler');
/* @var $email_events_eh EmailEventsEventsHandler */
list ($message_headers, $message_body) = $email_events_eh->ParseMessageBody($message_template, Array());
@@ -1382,7 +1382,7 @@
return '';
}
- $addr_list =& $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
+ $addr_list = $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
$addr_list->Query();
$object =& $this->getObject();
@@ -1416,7 +1416,7 @@
$gw_data = $object->getGatewayData($params['payment_type_id']);
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
- $gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+ $gateway_object = $this->Application->recallObject( $gw_data['ClassName'] );
$sql = 'SELECT oi.*
@@ -1470,11 +1470,11 @@
function AllowAddAddress($params)
{
- $user =& $this->Application->recallObject('u.current');
+ $user = $this->Application->recallObject('u.current');
if ($user->GetDBField('cust_shipping_addr_block')) return false;
- $address_list =& $this->Application->recallObject('addr','addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
+ $address_list = $this->Application->recallObject('addr','addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
$address_list->Query();
$max = $this->Application->ConfigValue('MaxAddresses');
@@ -1526,7 +1526,7 @@
function _formatWeight($weight)
{
- $regional =& $this->Application->recallObject('lang.current');
+ $regional = $this->Application->recallObject('lang.current');
/* @var $regional kDBItem */
switch ( $regional->GetDBField('UnitSystem') ) {
@@ -1674,7 +1674,7 @@
*/
protected function ContinueShoppingLink($params)
{
- $order_helper =& $this->Application->recallObject('OrderHelper');
+ $order_helper = $this->Application->recallObject('OrderHelper');
/* @var $order_helper OrderHelper */
if ( isset($params['template']) ) {
Index: in-commerce/units/payment_type/payment_type_event_handler.php
===================================================================
--- in-commerce/units/payment_type/payment_type_event_handler.php (revision 15134)
+++ in-commerce/units/payment_type/payment_type_event_handler.php (working copy)
@@ -239,7 +239,7 @@
public function getPassedID(kEvent $event)
{
if ( $event->Special == 'auto-ord' ) {
- $main_object =& $this->Application->recallObject('ord');
+ $main_object = $this->Application->recallObject('ord');
/* @var $main_object kDBItem */
return $main_object->GetDBField('PaymentType');
@@ -277,7 +277,7 @@
// site domain payment type picker
if ( $event->Special == 'selected' || $event->Special == 'available' ) {
- $edit_picker_helper =& $this->Application->recallObject('EditPickerHelper');
+ $edit_picker_helper = $this->Application->recallObject('EditPickerHelper');
/* @var $edit_picker_helper EditPickerHelper */
$edit_picker_helper->applyFilter($event, 'PaymentTypes');
Index: in-commerce/units/payment_type_currencies/payment_type_currencies_tag_processor.php
===================================================================
--- in-commerce/units/payment_type_currencies/payment_type_currencies_tag_processor.php (revision 15111)
+++ in-commerce/units/payment_type_currencies/payment_type_currencies_tag_processor.php (working copy)
@@ -17,9 +17,9 @@
function CurrencySelected($params)
{
- $object =& $this->Application->recallObject($this->Prefix);
- $payment_type_object =& $this->Application->recallObject('pt');
- $currency_object =& $this->Application->recallObject('curr.active');
+ $object = $this->Application->recallObject($this->Prefix);
+ $payment_type_object = $this->Application->recallObject('pt');
+ $currency_object = $this->Application->recallObject('curr.active');
$pt_id = $payment_type_object->GetDBField('PaymentTypeId');
$curr_id = $currency_object->GetDBField('CurrencyId');
Index: in-commerce/units/pricing/pricing_event_handler.php
===================================================================
--- in-commerce/units/pricing/pricing_event_handler.php (revision 15134)
+++ in-commerce/units/pricing/pricing_event_handler.php (working copy)
@@ -66,11 +66,11 @@
$temp = $this->Application->GetVar($event->getPrefixSpecial(true));
// $object =& $event->GetObject();
-// $formatter =& $this->Application->recallObject('kFormatter');
+// $formatter = $this->Application->recallObject('kFormatter');
// $temp = $formatter->TypeCastArray($temp, $object);
//uasort($temp, 'pr_bracket_comp');
- $bracket =& $this->Application->recallObject($event->getPrefixSpecial());
+ $bracket = $this->Application->recallObject($event->getPrefixSpecial());
foreach($temp as $id => $record)
{
if( $record['MaxQty'] == '∞' || $record['MaxQty'] == '∞')
Index: in-commerce/units/pricing/pricing_tag_processor.php
===================================================================
--- in-commerce/units/pricing/pricing_tag_processor.php (revision 15111)
+++ in-commerce/units/pricing/pricing_tag_processor.php (working copy)
@@ -17,7 +17,7 @@
function ProductPrice($params)
{
- $object =& $this->Application->recallObject($params['PrefixSpecial']);
+ $object = $this->Application->recallObject($params['PrefixSpecial']);
$price = $object->GetField('Price');
// display selected currency by default
@@ -33,12 +33,12 @@
// convert primary currency to selected (if they are the same, converter will just return)
- $converter =& $this->Application->recallObject('CurrencyRates');
+ $converter = $this->Application->recallObject('CurrencyRates');
/* @var $converter CurrencyRates */
$price = $converter->Convert($price, 'PRIMARY', $iso);
- $currency =& $this->Application->recallObject('curr.-'.$iso, null, Array('skip_autoload' => true));
+ $currency = $this->Application->recallObject('curr.-'.$iso, null, Array('skip_autoload' => true));
if( !$currency->isLoaded() ) $currency->Load($iso, 'ISO');
$symbol = $currency->GetDBField('Symbol');
@@ -94,7 +94,7 @@
usort($brackets, 'pr_bracket_comp');
- $dummy =& $this->Application->recallObject($this->Prefix.'.-dummy', null, array('skip_autoload' => true));
+ $dummy = $this->Application->recallObject($this->Prefix.'.-dummy', null, array('skip_autoload' => true));
/* @var $dummy kDBItem */
foreach($brackets as $id => $values)
Index: in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (revision 15134)
+++ in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (working copy)
@@ -260,7 +260,7 @@
$this->LoadItem($event);
}
- $actions =& $this->Application->recallObject('kActions');
+ $actions = $this->Application->recallObject('kActions');
/* @var $actions Params */
$actions->Set($event->getPrefixSpecial() . '_GoTab', '');
@@ -288,7 +288,7 @@
}
if ( $object->Load($id) ) {
- $actions =& $this->Application->recallObject('kActions');
+ $actions = $this->Application->recallObject('kActions');
/* @var $actions Params */
$actions->Set($event->getPrefixSpecial() . '_id', $object->GetId());
@@ -381,13 +381,13 @@
$inventory_status = $this->Conn->GetOne($sql);
if ( $inventory_status == ProductInventory::BY_OPTIONS ) {
- $live_object =& $this->Application->recallObject($event->Prefix . '.itemlive', null, Array ('skip_autoload' => true));
+ $live_object = $this->Application->recallObject($event->Prefix . '.itemlive', null, Array ('skip_autoload' => true));
/* @var $live_object kDBItem */
$live_object->SwitchToLive();
$live_object->Load($id);
- $temp_object =& $this->Application->recallObject($event->Prefix . '.itemtemp', null, Array ('skip_autoload' => true));
+ $temp_object = $this->Application->recallObject($event->Prefix . '.itemtemp', null, Array ('skip_autoload' => true));
/* @var $temp_object kDBItem */
$temp_object->SwitchToTemp();
Index: in-commerce/units/product_option_combinations/product_option_combinations_tag_processor.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_combinations_tag_processor.php (revision 15111)
+++ in-commerce/units/product_option_combinations/product_option_combinations_tag_processor.php (working copy)
@@ -36,7 +36,7 @@
$block_params['name'] = $params['render_as'];
- $opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+ $opt_helper = $this->Application->recallObject('kProductOptionsHelper');
$o = '';
$i = 0;
foreach ($combination as $opt => $val) {
Index: in-commerce/units/product_option_combinations/product_option_formatters.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_formatters.php (revision 15111)
+++ in-commerce/units/product_option_combinations/product_option_formatters.php (working copy)
@@ -30,7 +30,7 @@
$options = $object->GetFieldOptions($field_name);
if ( isset($format) ) $options['format'] = $format;
$data = unserialize($value);
- $opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+ $opt_helper = $this->Application->recallObject('kProductOptionsHelper');
$top_prefix = $this->Application->GetTopmostPrefix($object->Prefix);
$use_temp = substr($this->Application->GetVar($top_prefix.'_mode'), 0, 1) == 't';
@@ -92,12 +92,12 @@
$converted = array_key_exists('converted', $options) ? $options['converted'] : false;
if ($converted) {
- $lang =& $this->Application->recallObject('lang.current');
+ $lang = $this->Application->recallObject('lang.current');
return $lang->formatNumber($object->GetDBField($field_name), 2);
}
$data = unserialize($object->GetDBField('Combination'));
- $opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+ $opt_helper = $this->Application->recallObject('kProductOptionsHelper');
$price = $object->GetDBField('BasePrice');
$addition = 0;
Index: in-commerce/units/product_option_combinations/products_option_combination_item.php
===================================================================
--- in-commerce/units/product_option_combinations/products_option_combination_item.php (revision 15111)
+++ in-commerce/units/product_option_combinations/products_option_combination_item.php (working copy)
@@ -26,7 +26,7 @@
function GetDBField($field)
{
if ($field == 'FinalPrice') {
- $product =& $this->Application->recallObject('p');
+ $product = $this->Application->recallObject('p');
switch($this->GetDBField('PriceType'))
{
Index: in-commerce/units/product_options/product_options_tag_processor.php
===================================================================
--- in-commerce/units/product_options/product_options_tag_processor.php (revision 15111)
+++ in-commerce/units/product_options/product_options_tag_processor.php (working copy)
@@ -20,7 +20,7 @@
$object =& $this->getObject($params);
/* @var $object kDBItem */
- $opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+ $opt_helper = $this->Application->recallObject('kProductOptionsHelper');
/* @var $opt_helper kProductOptionsHelper */
$parsed = $opt_helper->ExplodeOptionValues($object->GetFieldValues());
@@ -39,7 +39,7 @@
$combination_field = $this->SelectParam($params, 'combination_field');
if ( $mode == 'selected' ) {
- $comb =& $this->Application->recallObject($combination_prefix);
+ $comb = $this->Application->recallObject($combination_prefix);
/* @var $comb kDBItem */
$options = unserialize($comb->GetDBField($combination_field));
@@ -49,7 +49,7 @@
$block_params['selected'] = '';
$block_params['pass_params'] = 1;
- $lang =& $this->Application->recallObject('lang.current');
+ $lang = $this->Application->recallObject('lang.current');
/* @var $lang LanguagesItem */
$o = '';
@@ -148,7 +148,7 @@
$opt_data = $this->Application->GetVar('options');
$options = getArrayValue($opt_data, $this->Application->GetVar('p_id'));
if (!$options && $this->Application->GetVar('orditems_id')) {
- $ord_item =& $this->Application->recallObject('orditems.-opt', null, Array ('skip_autoload' => true));
+ $ord_item = $this->Application->recallObject('orditems.-opt', null, Array ('skip_autoload' => true));
/* @var $ord_item kDBItem */
$ord_item->Load($this->Application->GetVar('orditems_id'));
Index: in-commerce/units/products/products_event_handler.php
===================================================================
--- in-commerce/units/products/products_event_handler.php (revision 15134)
+++ in-commerce/units/products/products_event_handler.php (working copy)
@@ -150,7 +150,7 @@
{
if ($product->GetDBField('InventoryStatus') == 2) {
// save inventory changes to option combination instead of product
- $object =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
+ $object = $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
$object->Load($combination_id);
}
elseif ($combination_id > 0) {
@@ -217,7 +217,7 @@
function RealInventoryAction($action, $prod_id, $qty, $combination_id)
{
- $product =& $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true));
+ $product = $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true));
$product->SwitchToLive();
$product->Load($prod_id);
@@ -240,7 +240,7 @@
$products = array_unique($products);
if ($products) {
- $product_obj =& $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true));
+ $product_obj = $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true));
$product_obj->SwitchToLive();
foreach ($products as $product_key) {
list($prod_id, $combination_id) = explode('_', $product_key);
@@ -291,7 +291,7 @@
if (!$orders) return;
- $order =& $this->Application->recallObject('ord.-inv', null, Array('skip_autoload' => true));
+ $order = $this->Application->recallObject('ord.-inv', null, Array('skip_autoload' => true));
foreach ($orders as $ord_id) {
$order->Load($ord_id);
@@ -319,7 +319,7 @@
{
parent::OnBeforeDeleteFromLive($event);
- $product =& $this->Application->recallObject($event->Prefix . '.itemlive', null, Array ('skip_autoload' => true));
+ $product = $this->Application->recallObject($event->Prefix . '.itemlive', null, Array ('skip_autoload' => true));
/* @var $product kCatDBItem */
$product->SwitchToLive();
@@ -330,7 +330,7 @@
return ;
}
- $temp =& $this->Application->recallObject($event->Prefix . '.itemtemp', null, Array ('skip_autoload' => true));
+ $temp = $this->Application->recallObject($event->Prefix . '.itemtemp', null, Array ('skip_autoload' => true));
/* @var $temp kCatDBItem */
$temp->SwitchToTemp();
@@ -639,7 +639,7 @@
$object->removeFilter('category_filter');
$object->AddGroupByField('%1$s.ProductId');
- $object_product =& $this->Application->recallObject($event->Prefix);
+ $object_product = $this->Application->recallObject($event->Prefix);
/* @var $object_product ProductsItem */
$content_ids_array = $object_product->GetPackageContentIds();
@@ -753,7 +753,7 @@
function OnRecommendProduct($event)
{
// used for error reporting only -> rewrite code + theme (by Alex)
- $object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too
+ $object = $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too
/* @var $object kDBItem */
$friend_email = $this->Application->GetVar('friend_email');
@@ -800,7 +800,7 @@
function OnSaveVirtualProduct($event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
- $listing_type =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
+ $listing_type = $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
$listing_type->Load($event->MasterEvent->getEventParam('id'));
$product_id = $listing_type->GetDBField('VirtualProductId');
@@ -812,7 +812,7 @@
if (!$listing_type->GetDBField('EnableBuying')) {
if ($product_id) {
// delete virtual product here
- $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
$temp_handler->DeleteItems($event->Prefix, $event->Special, Array($product_id));
$listing_type->SetDBField('VirtualProductId', 0);
@@ -821,7 +821,7 @@
return true;
}
- $ml_formatter =& $this->Application->recallObject('kMultiLanguage');
+ $ml_formatter = $this->Application->recallObject('kMultiLanguage');
$object->SetDBField($ml_formatter->LangFieldName('Name'), $listing_type->GetDBField('ShopCartName') );
$object->SetDBField($ml_formatter->LangFieldName('Description'), $listing_type->GetDBField('Description'));
$object->SetDBField('SKU', 'ENHANCE_LINK_'.abs( crc32( $listing_type->GetDBField('Name') ) ) );
@@ -869,7 +869,7 @@
$product_id = $listing_type->GetDBField('VirtualProductId');
if ( $product_id ) {
- $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
$temp_handler->DeleteItems($event->Prefix, $event->Special, Array ($product_id));
}
}
@@ -925,7 +925,7 @@
$this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'UserGroupRelations', 'REPLACE');
- $sub_order =& $this->Application->recallObject('ord.-sub'.$event->getEventParam('next_sub_number'), 'ord');
+ $sub_order = $this->Application->recallObject('ord.-sub'.$event->getEventParam('next_sub_number'), 'ord');
$sub_order->SetDBField('IsRecurringBilling', getArrayValue($item_data, 'IsRecurringBilling') ? 1 : 0);
$sub_order->SetDBField('GroupId', $group_id);
$sub_order->SetDBField('NextCharge_date', $expire);
@@ -1046,7 +1046,7 @@
{
$object =& $event->getObject();
if ($object->GetDBField('ProductId') == '') return ; // if product does not have ID - it's not yet created
- $opt_object =& $this->Application->recallObject('po', null, Array('skip_autoload' => true) );
+ $opt_object = $this->Application->recallObject('po', null, Array('skip_autoload' => true) );
$has_required = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$opt_object->TableName.' WHERE Required = 1 AND ProductId = '.$object->GetDBField('ProductId'));
//we need to imitate data sumbit, as parent' PreSave sets object values from $items_info
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
@@ -1065,7 +1065,7 @@
*/
function setPrimaryPrice($product_id, $price, $additional_fields = Array())
{
- $pr_object =& $this->Application->recallObject('pr.-item', null, Array('skip_autoload' => true) );
+ $pr_object = $this->Application->recallObject('pr.-item', null, Array('skip_autoload' => true) );
/* @var $pr_object kDBItem */
$pr_object->Load( Array('ProductId' => $product_id, 'IsPrimary' => 1) );
@@ -1409,7 +1409,7 @@
if ( $this->Application->isAdminUser ) {
// we may get product id out of OrderItem, if it exists
- $ord_item =& $this->Application->recallObject('orditems', null, Array ('raise_warnings' => 0));
+ $ord_item = $this->Application->recallObject('orditems', null, Array ('raise_warnings' => 0));
/* @var $ord_item OrdersItem */
if ( $ord_item->GetDBField('ProductId') ) {
Index: in-commerce/units/products/products_tag_processor.php
===================================================================
--- in-commerce/units/products/products_tag_processor.php (revision 15111)
+++ in-commerce/units/products/products_tag_processor.php (working copy)
@@ -217,7 +217,7 @@
{
$params['per_page'] = $this->Application->ConfigValue('Comm_Perpage_Products_Short');
}
- $object =& $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
+ $object = $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
switch($params['ListType'])
{
@@ -281,7 +281,7 @@
if ($object->GetDBField('HasRequiredOptions')) {
$t = $params['product_template'];
if (!$t) {
- $theme =& $this->Application->recallObject('theme.current');
+ $theme = $this->Application->recallObject('theme.current');
if ($theme->GetDBField('Name') == 'onlinestore') {
$t = 'in-commerce/product/details';
}
@@ -331,10 +331,10 @@
}
$params['p_id'] = $product_id;
- $product =& $this->Application->recallObject($this->getPrefixSpecial());
+ $product = $this->Application->recallObject($this->getPrefixSpecial());
$params['m_cat_id'] = $product->GetDBField('CategoryId');
- $main_processor =& $this->Application->recallObject('m_TagProcessor');
+ $main_processor = $this->Application->recallObject('m_TagProcessor');
return $main_processor->T($params);
}
@@ -425,13 +425,13 @@
function ListReviews($params)
{
- $review_tag_processor =& $this->Application->recallObject('rev.product_TagProcessor');
+ $review_tag_processor = $this->Application->recallObject('rev.product_TagProcessor');
return $review_tag_processor->PrintList($params);
}
function ReviewCount($params)
{
- $review_tag_processor =& $this->Application->recallObject('rev.product_TagProcessor');
+ $review_tag_processor = $this->Application->recallObject('rev.product_TagProcessor');
return $review_tag_processor->TotalRecords($params);
}
@@ -475,7 +475,7 @@
function AlreadyReviewed($params)
{
- $rev_tag_processor =& $this->Application->recallObject('rev_TagProcessor');
+ $rev_tag_processor = $this->Application->recallObject('rev_TagProcessor');
return $rev_tag_processor->AlreadyReviewed($params);
}
@@ -555,7 +555,7 @@
function UniqueFileName($params)
{
- $file_object =& $this->Application->recallObject('file.downl');
+ $file_object = $this->Application->recallObject('file.downl');
return ($file_object->GetDBField('Name') &&
$file_object->GetDBField('Name') != $file_object->GetDBField('FilePath'))
? 1 : 0;
@@ -574,7 +574,7 @@
if (!$download_helper_class) {
$download_helper_class = 'DownloadHelper';
}
- $download_helper =& $this->Application->recallObject($download_helper_class);
+ $download_helper = $this->Application->recallObject($download_helper_class);
if (!$download_helper->CheckAccess($file_id, $product_id)) {
$this->Application->ApplicationDie('File Access permission check failed!');
}
@@ -647,7 +647,7 @@
function ListShippingTypes($params)
{
- $quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
+ $quote_engine_collector = $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
$types = $quote_engine_collector->GetAvailableShippingTypes();
@@ -706,7 +706,7 @@
}
if (isset($params['currency'])) {
- $lang =& $this->Application->recallObject('lang.current');
+ $lang = $this->Application->recallObject('lang.current');
/* @var $lang LanguagesItem */
$iso = $this->GetISO($params['currency']);
Index: in-commerce/units/reports/reports_event_handler.php
===================================================================
--- in-commerce/units/reports/reports_event_handler.php (revision 15134)
+++ in-commerce/units/reports/reports_event_handler.php (working copy)
@@ -601,7 +601,7 @@
$value = $object->GetField($search_field);
if (!$value) return false;
- $lang_current =& $this->Application->recallObject('lang.current');
+ $lang_current = $this->Application->recallObject('lang.current');
$dt_separator = getArrayValue($object->GetFieldOptions($search_field), 'date_time_separator');
if (!$dt_separator) {
$dt_separator = ' ';
@@ -612,7 +612,7 @@
$full_value = $value.$dt_separator.$time;
- $formatter =& $this->Application->recallObject( $object->GetFieldOption($search_field, 'formatter') );
+ $formatter = $this->Application->recallObject( $object->GetFieldOption($search_field, 'formatter') );
$value_ts = $formatter->Parse($full_value, $search_field, $object);
@@ -653,7 +653,7 @@
function OnPieChart($event)
{
- $ChartHelper =& $this->Application->RecallObject('ChartHelper');
+ $ChartHelper = $this->Application->recallObject('ChartHelper');
header("Content-type: image/png");
@@ -691,7 +691,7 @@
function OnPrintChart($event)
{
- $ChartHelper =& $this->Application->RecallObject('ChartHelper');
+ $ChartHelper = $this->Application->recallObject('ChartHelper');
header("Content-type: image/png");
@@ -749,10 +749,10 @@
function OnExportReport($event)
{
- $report =& $this->Application->recallObject($event->getPrefixSpecial(),'rep_List',Array('skip_counting'=>true,'per_page'=>-1) );
+ $report = $this->Application->recallObject($event->getPrefixSpecial(),'rep_List',Array('skip_counting'=>true,'per_page'=>-1) );
/* @var $report kDBList*/
- $ReportItem =& $this->Application->recallObject('rep.item', 'rep', Array('skip_autoload' => true));
+ $ReportItem = $this->Application->recallObject('rep.item', 'rep', Array('skip_autoload' => true));
/* @var $ReportItem kDBItem*/
$a_grids = $this->Application->getUnitOption('rep', 'Grids');
Index: in-commerce/units/reports/reports_tag_processor.php
===================================================================
--- in-commerce/units/reports/reports_tag_processor.php (revision 15111)
+++ in-commerce/units/reports/reports_tag_processor.php (working copy)
@@ -102,7 +102,7 @@
}
- $object =& $this->Application->recallObject('rep.params', null, Array('skip_autoload' => true));
+ $object = $this->Application->recallObject('rep.params', null, Array('skip_autoload' => true));
/* @var $object kDBItem */
$object->setID(1);
Index: in-commerce/units/shipping/shipping_event_handler.php
===================================================================
--- in-commerce/units/shipping/shipping_event_handler.php (revision 15134)
+++ in-commerce/units/shipping/shipping_event_handler.php (working copy)
@@ -55,7 +55,7 @@
$format = '%01.' . $object->GetDBField('PrecisionAfterSep') . 'f'; // %01.2f
$zero_if_empty = $object->GetDBField('ZeroIfEmpty');
- $sc_object =& $this->Application->recallObject('sc', null, Array ('raise_warnings' => 0));
+ $sc_object = $this->Application->recallObject('sc', null, Array ('raise_warnings' => 0));
/* @var $sc_object kDBItem */
// change default shipping cost values ("Costs" tab on shipping editing) based on field from "Shipping Type"
@@ -78,7 +78,7 @@
*/
function OnApplyModifier($event)
{
- $cost_object =& $this->Application->recallObject('sc');
+ $cost_object = $this->Application->recallObject('sc');
/* @var $cost_object kDBItem */
$object =& $event->getObject();
@@ -86,7 +86,7 @@
$operation = $this->Application->GetVar('operation');
- $formatter =& $this->Application->recallObject('kFormatter');
+ $formatter = $this->Application->recallObject('kFormatter');
/* @var $formatter kFormatter */
$modify_by = $formatter->TypeCast($this->Application->GetVar('modify_by'), array('type'=>'float'));
Index: in-commerce/units/shipping/shipping_tag_processor.php
===================================================================
--- in-commerce/units/shipping/shipping_tag_processor.php (revision 15111)
+++ in-commerce/units/shipping/shipping_tag_processor.php (working copy)
@@ -17,7 +17,7 @@
function CostInputSize($params)
{
- $object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+ $object = $this->Application->recallObject( $this->getPrefixSpecial() );
$prec_before_sep = $object->GetDBField('PrecisionBeforeSep');
$prec_after_sep = $object->GetDBField('PrecisionAfterSep');
return $prec_before_sep + $prec_after_sep + 1 + ($prec_before_sep > 3 ? 1:0);
@@ -25,14 +25,14 @@
function ShowCostsTable($params)
{
- $object =& $this->Application->recallObject( $this->getPrefixSpecial() );
- $zones_object =& $this->Application->recallObject('z');
- $brackets_object =& $this->Application->recallObject('br');
+ $object = $this->Application->recallObject( $this->getPrefixSpecial() );
+ $zones_object = $this->Application->recallObject('z');
+ $brackets_object = $this->Application->recallObject('br');
- $costs_object =& $this->Application->recallObject('sc');
+ $costs_object = $this->Application->recallObject('sc');
/* @var $costs_object kDBItem */
- $main_processor =& $this->Application->recallObject('m_TagProcessor');
+ $main_processor = $this->Application->recallObject('m_TagProcessor');
$zones_sql = 'SELECT * FROM '.$zones_object->TableName.' WHERE ShippingTypeID='.$this->Application->GetVar('s_id').' ORDER BY Name ASC';
$brackets_sql = 'SELECT * FROM '.$brackets_object->TableName.' WHERE ShippingTypeID='.$this->Application->GetVar('s_id').' ORDER BY Start ASC';
@@ -178,7 +178,7 @@
$this->Application->recallObject('ShippingQuoteEngine'); // TODO: why call this here?
- $quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
+ $quote_engine_collector = $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
$shipping_quote_params = Array (
@@ -220,7 +220,7 @@
$last_shippings = unserialize($last_shippings);
}
- $order_object =& $this->Application->recallObject('ord');
+ $order_object = $this->Application->recallObject('ord');
/* @var $order_object OrdersItem */
$original_shipping = $order_object->GetDBField('ShippingInfo');
@@ -255,7 +255,7 @@
return '';
}
- $lang =& $this->Application->recallObject('lang.current');
+ $lang = $this->Application->recallObject('lang.current');
/* @var $lang LanguagesItem */
foreach ($shipping_types as $shipping_type) {
@@ -285,7 +285,7 @@
function AvailableTypes($params)
{
- $quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
+ $quote_engine_collector = $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
$types = $quote_engine_collector->GetAvailableShippingTypes();
Index: in-commerce/units/shipping_costs/shipping_costs_event_handler.php
===================================================================
--- in-commerce/units/shipping_costs/shipping_costs_event_handler.php (revision 15134)
+++ in-commerce/units/shipping_costs/shipping_costs_event_handler.php (working copy)
@@ -47,7 +47,7 @@
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
- $zones_object =& $this->Application->recallObject('z');
+ $zones_object = $this->Application->recallObject('z');
$sql = 'SELECT ZoneID
FROM ' . $zones_object->TableName . '
@@ -93,7 +93,7 @@
$object =& $event->getObject();
- $shipping_object =& $this->Application->recallObject('s');
+ $shipping_object = $this->Application->recallObject('s');
if( $this->Application->GetVar('br_propagate_id') )
{
@@ -173,7 +173,7 @@
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
- $zones_object =& $this->Application->recallObject('z');
+ $zones_object = $this->Application->recallObject('z');
/* @var $zones_object kDBItem */
$sql = 'SELECT ZoneID
@@ -200,7 +200,7 @@
protected function customProcessing(kEvent $event, $type)
{
if ( $type == 'before' && $this->Application->GetVar('sc') ) {
- $shipping_obj =& $this->Application->recallObject('s');
+ $shipping_obj = $this->Application->recallObject('s');
/* @var $shipping_obj kDBItem */
$object =& $event->getObject();
@@ -245,16 +245,16 @@
$id = $event->getEventParam('id');
- $object =& $this->Application->recallObject($event->Prefix . '.-item', $event->Prefix);
+ $object = $this->Application->recallObject($event->Prefix . '.-item', $event->Prefix);
/* @var $object kDBItem */
$object->SwitchToTemp();
$object->Load($id);
- $shipping_obj =& $this->Application->recallObject('s');
+ $shipping_obj = $this->Application->recallObject('s');
/* @var $shipping_obj kDBItem */
- $lang_object =& $this->Application->recallObject('lang.current');
+ $lang_object = $this->Application->recallObject('lang.current');
/* @var $lang_object LanguagesItem */
// by weight and US/UK system - we need to store recalculated price per Kg cause shipping calculation is done per Kg!
@@ -278,16 +278,16 @@
$id = $event->getEventParam('id');
- $object =& $this->Application->recallObject($event->Prefix . '.-item', $event->Prefix);
+ $object = $this->Application->recallObject($event->Prefix . '.-item', $event->Prefix);
/* @var $object kDBItem */
$object->SwitchToTemp();
$object->Load($id);
- $shipping_obj =& $this->Application->recallObject('s');
+ $shipping_obj = $this->Application->recallObject('s');
/* @var $shipping_obj kDBItem */
- $lang_object =& $this->Application->recallObject('lang.current');
+ $lang_object = $this->Application->recallObject('lang.current');
/* @var $lang_object LanguagesItem */
// by weight and US/UK system - we need to store recalculated price per Kg cause shipping calculation is done per Kg!
Index: in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php
===================================================================
--- in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php (revision 15111)
+++ in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php (working copy)
@@ -39,7 +39,7 @@
function QueryShippingCost($user_country, $user_state, $user_zip, $weight, $items, $amount, $shipping_type=null, $promo_params)
{
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$user_country_id = $cs_helper->getCountryStateId($user_country, DESTINATION_TYPE_COUNTRY);
Index: in-commerce/units/shipping_quote_engines/intershipper.php
===================================================================
--- in-commerce/units/shipping_quote_engines/intershipper.php (revision 15111)
+++ in-commerce/units/shipping_quote_engines/intershipper.php (working copy)
@@ -171,7 +171,7 @@
$params['orig_country'] = $this->Application->ConfigValue('Comm_Shipping_Country');
}
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
if (strlen($params['orig_country']) == 3) {
@@ -253,7 +253,7 @@
xml_set_element_handler( $xml_parser, Array(&$this, 'startElement'), Array(&$this, 'endElement') );
xml_set_character_data_handler( $xml_parser, Array(&$this, 'characterData') );
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->SetPostData($target_url['uri']);
Index: in-commerce/units/shipping_quote_engines/shipping_quote_collector.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_collector.php (revision 15111)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_collector.php (working copy)
@@ -17,7 +17,7 @@
function GetShippingQuotes($params)
{
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$has_states = $cs_helper->CountryHasStates( $cs_helper->getCountryIso($params['dest_country'], true) );
@@ -43,7 +43,7 @@
$classes = $this->getEngineClasses();
foreach ($classes as $class) {
- $object =& $this->Application->recallObject($class);
+ $object = $this->Application->recallObject($class);
/* @var $object ShippingQuoteEngine */
$new_shipping_types = $object->GetShippingQuotes($params);
@@ -115,7 +115,7 @@
$classes = $this->getEngineClasses();
foreach ($classes as $class) {
- $object =& $this->Application->recallObject($class);
+ $object = $this->Application->recallObject($class);
/* @var $object ShippingQuoteEngine */
$new_shipping_types = $object->GetAvailableTypes();
@@ -162,7 +162,7 @@
$shipping_id = $shipping_info[$package_num]['ShippingId'];
foreach ($classes as $class) {
- $object =& $this->Application->recallObject($class);
+ $object = $this->Application->recallObject($class);
/* @var $object ShippingQuoteEngine */
$shipping_types = $object->GetAvailableTypes();
Index: in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (revision 15134)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (working copy)
@@ -29,7 +29,7 @@
$object =& $event->getObject();
/* @var $object kDBItem */
- $engine =& $this->Application->recallObject($object->GetDBField('ClassName'));
+ $engine = $this->Application->recallObject($object->GetDBField('ClassName'));
/* @var $engine ShippingQuoteEngine */
$engine_fields = $engine->GetEngineFields();
@@ -49,7 +49,7 @@
$object->SetDBField('Properties', serialize($properties));
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$from_country = $this->Application->ConfigValue('Comm_Shipping_Country');
Index: in-commerce/units/shipping_quote_engines/usps.php
===================================================================
--- in-commerce/units/shipping_quote_engines/usps.php (revision 15111)
+++ in-commerce/units/shipping_quote_engines/usps.php (working copy)
@@ -757,7 +757,7 @@
// parse response
- $xml_helper =& $this->Application->recallObject('kXMLHelper');
+ $xml_helper = $this->Application->recallObject('kXMLHelper');
/* @var $xml_helper kXMLHelper */
$root_node =& $xml_helper->Parse($body);
@@ -956,7 +956,7 @@
}
// parse response
- $xml_helper =& $this->Application->recallObject('kXMLHelper');
+ $xml_helper = $this->Application->recallObject('kXMLHelper');
$root_node =& $xml_helper->Parse($body);
/* @var $root_node kXMLNode */
$Postage = 0;
@@ -1000,7 +1000,7 @@
}
if ( $label_file != '' ) {
- $file_helper =& $this->Application->recallObject('FileHelper');
+ $file_helper = $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$file_helper->CheckFolder(USPS_LABEL_FOLDER);
@@ -1014,7 +1014,7 @@
function GetUSPSCountry($country, $default = 'US')
{
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$country = $cs_helper->getCountryIso($country);
@@ -1099,7 +1099,7 @@
return Array('error' => implode('<br/>', $errors));
}
- $xml_helper =& $this->Application->recallObject('kXMLHelper');
+ $xml_helper = $this->Application->recallObject('kXMLHelper');
$root_node =& $xml_helper->Parse($body);
/* @var $root_node kXMLNode */
Index: in-commerce/units/taxes/taxes_event_handler.php
===================================================================
--- in-commerce/units/taxes/taxes_event_handler.php (revision 15134)
+++ in-commerce/units/taxes/taxes_event_handler.php (working copy)
@@ -70,7 +70,7 @@
/* @var $zone_object kDBItem */
if ( $type == 'after' ) {
- $dst_object =& $this->Application->recallObject('taxdst');
+ $dst_object = $this->Application->recallObject('taxdst');
/* @var $dst_object kDBItem */
if ( $event->Name == 'OnUpdate' ) {
@@ -128,8 +128,8 @@
$object->SetFieldsFromHash($field_values);
$object->SetDBField('TaxZoneID', $item_id);
- $destination =& $this->Application->recallObject('taxdst');
- $tax_object =& $this->Application->recallObject('tax');
+ $destination = $this->Application->recallObject('taxdst');
+ $tax_object = $this->Application->recallObject('tax');
switch($event->Name)
{
Index: in-commerce/units/taxes/taxes_tag_processor.php
===================================================================
--- in-commerce/units/taxes/taxes_tag_processor.php (revision 15111)
+++ in-commerce/units/taxes/taxes_tag_processor.php (working copy)
@@ -68,7 +68,7 @@
break;
case 'has_states':
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$has_states = $cs_helper->getCountriesWithStates();
Index: in-commerce/units/taxesdestinations/taxes_dst_event_handler.php
===================================================================
--- in-commerce/units/taxesdestinations/taxes_dst_event_handler.php (revision 15134)
+++ in-commerce/units/taxesdestinations/taxes_dst_event_handler.php (working copy)
@@ -27,13 +27,13 @@
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
- $tax_object =& $this->Application->recallObject('tax');
+ $tax_object = $this->Application->recallObject('tax');
/* @var $tax_object kDBItem */
$std_dest_id = $this->Application->GetVar('StatesCountry');
if ( $items_info ) {
- $taxdest =& $this->Application->recallObject($event->getPrefixSpecial(true), null);
+ $taxdest = $this->Application->recallObject($event->getPrefixSpecial(true), null);
/* @var $taxdest kDBItem */
$parent_info =& $object->GetLinkedInfo();
@@ -118,7 +118,7 @@
$object->SetDBField('TaxZoneId', $this->Application->GetVar('tax_id'));
}
- $tax_object =& $this->Application->recallObject('tax');
+ $tax_object = $this->Application->recallObject('tax');
/* @var $tax_object kDBItem */
if ( $tax_object->GetDBField('Type') == 3 ) {
Index: in-commerce/units/zones/zones_event_handler.php
===================================================================
--- in-commerce/units/zones/zones_event_handler.php (revision 15134)
+++ in-commerce/units/zones/zones_event_handler.php (working copy)
@@ -77,7 +77,7 @@
break;
case 'after':
- $dst_object =& $this->Application->recallObject('dst');
+ $dst_object = $this->Application->recallObject('dst');
/* @var $dst_object kDBItem */
if ( $event->Name == 'OnUpdate' ) {
@@ -135,7 +135,7 @@
$object->SetFieldsFromHash($field_values);
$object->SetDBField('ZoneID', $item_id);
- $destination =& $this->Application->recallObject('dst');
+ $destination = $this->Application->recallObject('dst');
switch($event->Name)
{
Index: in-commerce/units/zones/zones_tag_processor.php
===================================================================
--- in-commerce/units/zones/zones_tag_processor.php (revision 15111)
+++ in-commerce/units/zones/zones_tag_processor.php (working copy)
@@ -67,7 +67,7 @@
break;
case 'has_states':
- $cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+ $cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$has_states = $cs_helper->getCountriesWithStates();
Index: in-link/units/link_validation/link_validation_eh.php
===================================================================
--- in-link/units/link_validation/link_validation_eh.php (revision 15135)
+++ in-link/units/link_validation/link_validation_eh.php (working copy)
@@ -75,7 +75,7 @@
$perm_value = true;
if ( $ids ) {
- $perm_helper =& $this->Application->recallObject('PermissionsHelper');
+ $perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$items = $perm_helper->GetCategoryItemData('l', $ids);
@@ -161,7 +161,7 @@
$ids = $this->Conn->GetCol($sql);
if ($ids) {
- $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($event->Prefix, $event->Special, $ids);
@@ -319,7 +319,7 @@
function _validateLink($link_id)
{
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$sql = 'SELECT Url, ResourceId
@@ -338,7 +338,7 @@
$curl_helper->lastErrorCode = 500;
}
- $link_validation =& $this->Application->recallObject($this->Prefix . '.-item', null, Array ('skip_autoload' => true));
+ $link_validation = $this->Application->recallObject($this->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $link_validation kDBItem */
$link_validation->Load($link_id, 'LinkId');
@@ -379,7 +379,7 @@
return ;
}
- $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($event->Prefix, $event->Special, $ids);
@@ -435,7 +435,7 @@
return;
}
- $object =& $this->Application->recallObject('l.-item', null, Array ('skip_autoload' => true));
+ $object = $this->Application->recallObject('l.-item', null, Array ('skip_autoload' => true));
/* @var $object kCatDBItem */
foreach ($ids as $id) {
@@ -477,7 +477,7 @@
return ;
}
- $temp_handler =& $this->Application->recallObject('l_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject('l_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems('l', '', $ids);
Index: in-link/units/links/link_tag_processor.php
===================================================================
--- in-link/units/links/link_tag_processor.php (revision 15111)
+++ in-link/units/links/link_tag_processor.php (working copy)
@@ -92,7 +92,7 @@
$lst_id = $this->getListingInfo($object->GetDBField('ResourceId'), 'ListingTypeId');
- $lst_object =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
+ $lst_object = $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
$lst_object->Load($lst_id);
return $lst_object->GetField( $this->SelectParam($params, 'name,field') );
@@ -105,7 +105,7 @@
$listing_id = $this->getListingInfo($object->GetDBField('ResourceId'), 'ListingId');
- $listing_object =& $this->Application->recallObject('ls', null, Array('skip_autoload' => true));
+ $listing_object = $this->Application->recallObject('ls', null, Array('skip_autoload' => true));
$listing_object->Load($listing_id);
return $listing_object->GetField( $this->SelectParam($params, 'name,field') );
@@ -155,7 +155,7 @@
$listtype_id = $this->getListingInfo($object->GetDBField('ResourceId'), 'ListingTypeId');
- $lst_object =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
+ $lst_object = $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
$lst_object->Load($listtype_id);
return $lst_object->GetDBField('EnableBuying');
@@ -180,7 +180,7 @@
function ListingDescription($params)
{
- $listing_type =& $this->Application->recallObject('lst');
+ $listing_type = $this->Application->recallObject('lst');
/* @var $listing_type kDBItem */
return $listing_type->GetDBField('Description');
@@ -188,7 +188,7 @@
function ListingTypeDetailsLink($params)
{
- $listing_type =& $this->Application->recallObject('lst', null, Array ('raise_warnings' => 0));
+ $listing_type = $this->Application->recallObject('lst', null, Array ('raise_warnings' => 0));
/* @var $listing_type kDBList */
$params['lst_id'] = $listing_type->isLoaded() ? $listing_type->GetID() : $this->Application->Parser->GetParam('key');
@@ -312,7 +312,7 @@
if (isset($params['formatted']) && $params['formatted']) {
// format the date
- $lang =& $this->Application->recallObject('lang.current');
+ $lang = $this->Application->recallObject('lang.current');
if (isset($params['display_time']) && $params['display_time']) {
$display_format = $lang->GetDBField('DateFormat').' @ '.$lang->GetDBField('TimeFormat');
@@ -403,7 +403,7 @@
return ;
}
- $link_helper =& $this->Application->recallObject('LinkHelper');
+ $link_helper = $this->Application->recallObject('LinkHelper');
/* @var $link_helper LinkHelper */
// 1. get current grouping
@@ -441,7 +441,7 @@
static $grouping = null;
if (!isset($grouping)) {
- $link_helper =& $this->Application->recallObject('LinkHelper');
+ $link_helper = $this->Application->recallObject('LinkHelper');
/* @var $link_helper LinkHelper */
// 1. get current grouping
Index: in-link/units/links/links_event_handler.php
===================================================================
--- in-link/units/links/links_event_handler.php (revision 15135)
+++ in-link/units/links/links_event_handler.php (working copy)
@@ -60,7 +60,7 @@
if ( substr($event->Special, 0, 10) == 'duplicates' ) {
$object->removeFilter('category_filter');
- $link_helper =& $this->Application->recallObject('LinkHelper');
+ $link_helper = $this->Application->recallObject('LinkHelper');
/* @var $link_helper LinkHelper */
$grouping = $link_helper->getGrouping($event->getPrefixSpecial());
@@ -75,7 +75,7 @@
break;
case 'duplicates-sub':
- $main_object =& $this->Application->recallObject($event->Prefix . '.duplicates');
+ $main_object = $this->Application->recallObject($event->Prefix . '.duplicates');
/* @var $main_object kDBItem */
foreach ($grouping as $field_index => $group_field) {
@@ -105,7 +105,7 @@
*/
function OnMerge($event)
{
- $link_helper =& $this->Application->recallObject('LinkHelper');
+ $link_helper = $this->Application->recallObject('LinkHelper');
/* @var $link_helper LinkHelper */
$grouping = $link_helper->getGrouping($event->getPrefixSpecial());
@@ -144,7 +144,7 @@
}
if ( !$groping_error ) {
- $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$categories_sql = ' SELECT main_table.ResourceId, ci.CategoryId, main_table.' . $id_field . '
@@ -293,7 +293,7 @@
if (!strlen($field_value) || ($field_value != $this->Application->RecallVar($event->Prefix . '_captcha_code'))) {
$this->Application->SetVar('error_'.$field_name, 1);
- $captcha_helper =& $this->Application->recallObject('CaptchaHelper');
+ $captcha_helper = $this->Application->recallObject('CaptchaHelper');
/* @var $captcha_helper kCaptchaHelper */
$this->Application->StoreVar($event->Prefix . '_captcha_code', $captcha_helper->GenerateCaptchaCode());
@@ -395,7 +395,7 @@
if ($object->GetDBField('Url') != $object->GetOriginalField('Url')) {
// check only when url was changed
- $link_helper =& $this->Application->recallObject('LinkHelper');
+ $link_helper = $this->Application->recallObject('LinkHelper');
/* @var $link_helper LinkHelper */
$link_checked = $link_helper->CheckReciprocalURL($object->GetDBField('Url'));
@@ -422,7 +422,7 @@
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kCatDBItem */
- $link_helper =& $this->Application->recallObject('LinkHelper');
+ $link_helper = $this->Application->recallObject('LinkHelper');
/* @var $link_helper LinkHelper */
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
Index: in-link/units/listings/listings_event_handler.php
===================================================================
--- in-link/units/listings/listings_event_handler.php (revision 15135)
+++ in-link/units/listings/listings_event_handler.php (working copy)
@@ -173,10 +173,10 @@
$this->UpdateLink('OnPurchase', $object->GetDBField('ItemResourceId'), $object->GetDBField('ListingTypeId'));
- $listtype_object =& $this->Application->recallObject('lst');
+ $listtype_object = $this->Application->recallObject('lst');
if ( $listtype_object->GetDBField('OnPurchaseAddToCatEnabled') )
{
- $link_object =& $this->Application->recallObject('l');
+ $link_object = $this->Application->recallObject('l');
$add_to_cat = (int)$listtype_object->GetDBField('OnPurchaseAddToCat');
$sql = 'DELETE FROM '.$this->Application->getUnitOption('l-ci', 'TableName').'
WHERE CategoryId = '.$add_to_cat.'
@@ -204,7 +204,7 @@
$this->UpdateLink('OnExpire', $original_values['ItemResourceId'], $original_values['ListingTypeId']);
- $listtype_object =& $this->Application->recallObject('lst');
+ $listtype_object = $this->Application->recallObject('lst');
if( $listtype_object->GetDBField('OnExpireRemoveFromCatEnabled') )
{
$remove_from_cat = $listtype_object->GetDBField('OnExpireRemoveFromCat');
@@ -219,11 +219,11 @@
function UpdateLink($action_prefix, $resource_id, $listtype_id)
{
- $link_object =& $this->Application->recallObject('l', null, Array('skip_autoload' => true));
+ $link_object = $this->Application->recallObject('l', null, Array('skip_autoload' => true));
$link_object->Load($resource_id, 'ResourceId');
// "-item", because can be called as regular after event, and just "lst" recalls list instead
- $listtype_object =& $this->Application->recallObject('lst.-item', null, Array('skip_autoload' => true));
+ $listtype_object = $this->Application->recallObject('lst.-item', null, Array('skip_autoload' => true));
$listtype_object->Load($listtype_id);
$action_fields = Array( 'EdPick' => 'EditorsPick',
@@ -280,7 +280,7 @@
list ($link_id, $link_info) = each($l_info);
$listing_type_id = $link_info['ListingTypeId'];
- $listing_type =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
+ $listing_type = $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
$listing_type->Load($listing_type_id);
if ($listing_type->GetDBField('EnableBuying')) {
@@ -375,7 +375,7 @@
}
// set expiration time for listing
- $listing_type =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
+ $listing_type = $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
$listing_type->Load($listing_type_id);
$dur_type_mapping = Array( 1 => 1,
@@ -500,7 +500,7 @@
$item_data = unserialize($fields['ItemData']);
$listing_id = $item_data['ListingId'];
- $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
$temp_handler->DeleteItems($event->Prefix, $event->Special, Array($listing_id));
}
@@ -579,7 +579,7 @@
// extend period for pending/renewal links (if owner has agreed)
if ( $event->Name == 'OnMassApprove' ) {
- $lst_object =& $this->Application->recallObject('lst', null, Array ('skip_autoload' => true));
+ $lst_object = $this->Application->recallObject('lst', null, Array ('skip_autoload' => true));
/* @var $lst_object kDBItem */
foreach ($ids as $id) {
@@ -734,7 +734,7 @@
$expired_listings = $this->Conn->GetCol($sql);
if(is_array($expired_listings) && count($expired_listings) > 0)
{
- $object =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
+ $object = $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
/* @var $object kDBItem */
foreach($expired_listings as $listing_id)
Index: in-link/units/listings/listings_tag_processor.php
===================================================================
--- in-link/units/listings/listings_tag_processor.php (revision 15111)
+++ in-link/units/listings/listings_tag_processor.php (working copy)
@@ -69,7 +69,7 @@
$object =& $this->getObject($params);
/* @var $object kDBItem */
- $listing_type =& $this->Application->recallObject( 'lst', 'lst', $params );
+ $listing_type = $this->Application->recallObject( 'lst', 'lst', $params );
/* @var $listing_type kDBItem */
$dur_type_mapping = Array (
@@ -82,7 +82,7 @@
$expiration_interval = $duration * $dur_type_mapping[$duration_type];
$expiration_date = adodb_mktime() + $expiration_interval;
- $lang =& $this->Application->recallObject('lang.current');
+ $lang = $this->Application->recallObject('lang.current');
/* @var $lang LanguagesItem */
return adodb_date($lang->GetDBField($format_field), $expiration_date);
Index: in-news/units/articles/articles_config.php
===================================================================
--- in-news/units/articles/articles_config.php (revision 15136)
+++ in-news/units/articles/articles_config.php (working copy)
@@ -116,17 +116,6 @@
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
-
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'adm',
- 'HookToSpecial' => '',
- 'HookToEvent' => Array('OnStartup'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnUpdateRSSArticles',
- ),
),
'CatalogItem' => true,
@@ -142,6 +131,9 @@
5 => 'mode',
),
+ 'ScheduledTasks' => Array(
+ 'update_rss_articles' => Array('EventName' => 'OnUpdateRSSArticles', 'RunInterval' => 60),
+ ),
'IDField' => 'NewsId',
'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
Index: in-news/units/articles/articles_event_handler.php
===================================================================
--- in-news/units/articles/articles_event_handler.php (revision 15136)
+++ in-news/units/articles/articles_event_handler.php (working copy)
@@ -60,7 +60,7 @@
/**
- * [HOOK] Deletes expired articles + update existing articles from rss feed with new data (key - article url)
+ * [CRON] Deletes expired articles + update existing articles from rss feed with new data (key - article url)
*
* @param kEvent $event
*/
@@ -129,7 +129,7 @@
(LENGTH(cd.'.$article_custom_fields['RssOriginalURL'].') > 0)';
$article_ids = $this->Conn->GetCol($sql);
if ($article_ids) {
- $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($event->Prefix, $event->Special, $article_ids);
@@ -179,7 +179,7 @@
return true;
}
- $curl_helper =& $this->Application->recallObject('CurlHelper');
+ $curl_helper = $this->Application->recallObject('CurlHelper');
/* @var $curl_helper kCurlHelper */
$curl_helper->followLocation = true;
@@ -191,7 +191,7 @@
return false;
}
- $xml_helper =& $this->Application->recallObject('kXMLHelper');
+ $xml_helper = $this->Application->recallObject('kXMLHelper');
/* @var $xml_helper kXMLHelper */
$root_node =& $xml_helper->Parse($xml_data, kXMLHelper::XML_WITH_TEXT_NODES);
@@ -236,7 +236,7 @@
*/
function _getMLFields(&$object)
{
- $ml_formatter =& $this->Application->recallObject('kMultiLanguage');
+ $ml_formatter = $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
$title_field = 'Title';
@@ -267,7 +267,7 @@
$current_node = $root_node->firstChild;
$feed_articles = $this->getFeedArticles($event);
- $object =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
+ $object = $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
/* @var $object kDBItem */
list ($title_field, $body_field) = $this->_getMLFields($object);
@@ -355,7 +355,7 @@
$current_node = $root_node->firstChild;
$feed_articles = $this->getFeedArticles($event);
- $object =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
+ $object = $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
/* @var $object kDBItem */
list ($title_field, $body_field) = $this->_getMLFields($object);
@@ -408,7 +408,7 @@
function getCustomColumns($prefix)
{
- $ml_formatter =& $this->Application->recallObject('kMultiLanguage');
+ $ml_formatter = $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
$custom_fields = array_flip($this->Application->getUnitOption($prefix, 'CustomFields'));
@@ -482,7 +482,7 @@
$excerpt_formatter = $object->GetFieldOption('Excerpt', 'formatter');
if ( $excerpt_formatter == 'kMultiLanguage' ) {
- $ml_formatter =& $this->Application->recallObject('kMultiLanguage');
+ $ml_formatter = $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
$excerpt_field = $ml_formatter->LangFieldName($excerpt_field);
removing_references_in_parent_event_core.patch [^] (3,293 bytes) 2012-03-04 02:57
[Show Content]
Index: kernel/db/dbitem.php
===================================================================
--- kernel/db/dbitem.php (revision 15137)
+++ kernel/db/dbitem.php (working copy)
@@ -948,7 +948,7 @@
$event = new kEvent($this->getPrefixSpecial() . ':' . $name, $additional_params);
if ( is_object($this->parentEvent) ) {
- $event->MasterEvent =& $this->parentEvent;
+ $event->MasterEvent = $this->parentEvent;
}
$this->Application->HandleEvent($event);
Index: kernel/kbase.php
===================================================================
--- kernel/kbase.php (revision 15137)
+++ kernel/kbase.php (working copy)
@@ -248,7 +248,7 @@
*/
public function setParentEvent($event)
{
- $this->parentEvent =& $event;
+ $this->parentEvent = $event;
}
/**
Index: kernel/utility/event.php
===================================================================
--- kernel/utility/event.php (revision 15137)
+++ kernel/utility/event.php (working copy)
@@ -272,14 +272,14 @@
public function &getObject(array $params = Array())
{
if ( !$this->Application->hasObject($this->prefixSpecial) ) {
- $top_event =& $this;
+ $top_event = $this;
// when OnSave calls OnPreSave in first line, then this would make sure OnSave is used
while ( is_object($top_event->MasterEvent) ) {
- $top_event =& $top_event->MasterEvent;
+ $top_event = $top_event->MasterEvent;
}
- $params['parent_event'] =& $top_event;
+ $params['parent_event'] = $top_event;
}
$object = $this->Application->recallObject($this->prefixSpecial, $this->pseudoClass, $params);
@@ -294,6 +294,7 @@
*
* @param string $name name of callable event (optionally could contain prefix_special as well)
* @see kEvent::MasterEvent
+ * @todo Will overwrite master event data with called event data, which makes 'parent_event' useless in most cases
*/
public function CallSubEvent($name)
{
Index: kernel/utility/temp_handler.php
===================================================================
--- kernel/utility/temp_handler.php (revision 15137)
+++ kernel/utility/temp_handler.php (working copy)
@@ -82,7 +82,7 @@
*/
public function setParentEvent($event)
{
- $this->parentEvent =& $event;
+ $this->parentEvent = $event;
}
function SetTables($tables)
@@ -275,7 +275,7 @@
$special .= '-item';
}
- $object = $this->Application->recallObject($prefix.'.'.$special, $prefix, Array('skip_autoload' => true, 'parent_event' => &$this->parentEvent));
+ $object = $this->Application->recallObject($prefix.'.'.$special, $prefix, Array('skip_autoload' => true, 'parent_event' => $this->parentEvent));
/* @var $object kCatDBItem */
$object->PopulateMultiLangFields();
@@ -388,7 +388,7 @@
//recalling by different name, because we may get kDBList, if we recall just by prefix
$recall_prefix = $prefix_special . ($special ? '' : '.') . '-item';
- $object = $this->Application->recallObject($recall_prefix, $prefix, Array ('skip_autoload' => true, 'parent_event' => &$this->parentEvent));
+ $object = $this->Application->recallObject($recall_prefix, $prefix, Array ('skip_autoload' => true, 'parent_event' => $this->parentEvent));
/* @var $object kDBItem */
foreach ($ids as $id) {
removing_references_in_event_getobject_core.patch [^] (95,682 bytes) 2012-03-04 03:03
[Show Content]
Index: kernel/db/cat_event_handler.php
===================================================================
--- kernel/db/cat_event_handler.php (revision 15137)
+++ kernel/db/cat_event_handler.php (working copy)
@@ -53,7 +53,7 @@
*/
protected function LoadItem(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$id = $this->getPassedID($event);
@@ -438,7 +438,7 @@
$search_event = $event_mapping[$type];
$this->$search_event($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$search_sql = ' FROM ' . TABLE_PREFIX . 'ses_' . $this->Application->GetSID() . '_' . TABLE_PREFIX . 'Search
@@ -595,7 +595,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
// add category filter if needed
@@ -767,7 +767,7 @@
*/
function prepareItemStatuses($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$property_map = $this->Application->getUnitOption($event->Prefix, 'ItemPropertyMappings');
if (!$property_map) {
@@ -858,7 +858,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
// update hits field
@@ -897,7 +897,7 @@
$special = substr($event->Special, -6);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
if ( $special == 'import' || $special == 'export' ) {
@@ -972,7 +972,7 @@
$this->setCustomExportColumns($event);
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
if ( !$this->Application->isAdmin ) {
@@ -1026,7 +1026,7 @@
{
parent::OnAfterItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
if ( substr($event->Special, -6) == 'import' ) {
@@ -1116,7 +1116,7 @@
$event->setPseudoClass('_List');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$this->Application->SetVar($event->getPrefixSpecial().'_Page', 1);
@@ -1406,7 +1406,7 @@
$lang = $this->Application->GetVar('m_lang');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->SetPage(1);
@@ -1815,7 +1815,7 @@
*/
protected function SetPagination(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
// get PerPage (forced -> session -> config -> 10)
@@ -1986,7 +1986,7 @@
*/
protected function restorePrimaryImage($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
$has_image_info = $object->GetDBField('ImageAlt') && ($object->GetDBField('ThumbnailImage') || $object->GetDBField('FullImage'));
@@ -2078,7 +2078,7 @@
if ( $dst_field == 'ItemCategory' ) {
// Item Edit -> Categories Tab -> New Categories
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
$category_ids = explode(',', $selected_ids['c']);
@@ -2111,7 +2111,7 @@
if ( $items_info ) {
list($id, $field_values) = each($items_info);
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
@@ -2157,7 +2157,7 @@
*/
function cacheItemOwner($event, $id_field, $cached_field)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$user_id = $object->GetDBField($id_field);
@@ -2194,7 +2194,7 @@
if ( $event->status == kEvent::erSUCCESS && $use_pending_editing ) {
// decision: clone or not clone
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
if ( $object->GetID() == 0 || $object->GetDBField('OrgId') > 0 ) {
@@ -2267,7 +2267,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$owner_field = $this->getOwnerField($event->Prefix);
@@ -2310,7 +2310,7 @@
{
parent::OnBeforeClone($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('ResourceId', 0); // this will reset it
@@ -2331,7 +2331,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
$is_admin = $this->Application->isAdminUser;
@@ -2360,7 +2360,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
$perm_helper = $this->Application->recallObject('PermissionsHelper');
@@ -2465,7 +2465,7 @@
return ;
}
- $object =& $event->getObject(Array('skip_autoload' => true));
+ $object = $event->getObject(Array('skip_autoload' => true));
/* @var $object kCatDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -2556,7 +2556,7 @@
}
// prepare redirect template
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$is_active = ($object->GetDBField('Status') == STATUS_ACTIVE);
@@ -2604,7 +2604,7 @@
return ;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kCatDBItem */
$ids = $this->StoreSelectedIDs($event);
@@ -2661,7 +2661,7 @@
*/
protected function checkItemStatus(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
@@ -2815,7 +2815,7 @@
*/
function OnDownloadFile($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
$event->status = kEvent::erSTOP;
@@ -2849,7 +2849,7 @@
$rating_helper = $this->Application->recallObject('RatingHelper');
/* @var $rating_helper RatingHelper */
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kCatDBItem */
$object->Load( $this->Application->GetVar('id') );
@@ -2941,7 +2941,7 @@
*/
protected function OnAfterItemValidate(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$resource_id = $object->GetDBField('ResourceId');
Index: kernel/db/db_event_handler.php
===================================================================
--- kernel/db/db_event_handler.php (revision 15137)
+++ kernel/db/db_event_handler.php (working copy)
@@ -508,7 +508,7 @@
$status_field = array_shift($status_fields);
if ( $status_field == 'Status' || $status_field == 'Enabled' ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
@@ -563,7 +563,7 @@
*/
protected function OnItemBuild(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->dbBuild($object, $event);
@@ -678,7 +678,7 @@
*/
protected function LoadItem(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$id = $this->getPassedID($event);
@@ -709,7 +709,7 @@
*/
protected function OnListBuild(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
/*if ( $this->Application->isDebugMode() ) {
@@ -864,7 +864,7 @@
case 'sort_by':
$event->setPseudoClass('_List');
- $object =& $event->getObject(Array ('main_list' => 1));
+ $object = $event->getObject(Array ('main_list' => 1));
/* @var $object kDBList */
if ( $list_helper->hasUserSorting($object) ) {
@@ -885,7 +885,7 @@
*/
protected function SetPagination(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
// get PerPage (forced -> session -> config -> 10)
@@ -942,7 +942,7 @@
*/
protected function getPerPage(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$per_page = $event->getEventParam('per_page');
@@ -1028,7 +1028,7 @@
{
$event->setPseudoClass('_List');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( $object->isMainList() ) {
@@ -1179,7 +1179,7 @@
*/
protected function AddFilters(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$edit_mark = rtrim($this->Application->GetSID() . '_' . $this->Application->GetTopmostWid($event->Prefix), '_');
@@ -1272,7 +1272,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$where_clause = Array (
@@ -1390,7 +1390,7 @@
$event->setPseudoClass('_List');
$this->Application->SetVar('sort_by', $field . ',' . $dir);
- $object =& $event->getObject(Array ('main_list' => 1));
+ $object = $event->getObject(Array ('main_list' => 1));
/* @var $object kDBList */
$list_helper = $this->Application->recallObject('ListHelper');
@@ -1477,7 +1477,7 @@
*/
protected function ItemPrepareQuery(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sqls = $object->getFormOption('ItemSQLs', Array ());
@@ -1500,7 +1500,7 @@
*/
protected function ListPrepareQuery(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sqls = $object->getFormOption('ListSQLs', Array ());
@@ -1532,7 +1532,7 @@
*/
protected function OnCreate(kEvent $event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -1587,7 +1587,7 @@
*/
protected function _update(kEvent $event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
@@ -1661,7 +1661,7 @@
*/
protected function OnNew(kEvent $event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->Clear(0);
@@ -1689,7 +1689,7 @@
*/
protected function OnCancel(kEvent $event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -1835,7 +1835,7 @@
$this->StoreSelectedIDs($event, $live_ids);
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->SaveLoggedChanges($changes_var_name, $object->ShouldLogChanges());
@@ -1984,7 +1984,7 @@
*/
public function isNewItemCreate(kEvent $event)
{
- $object =& $event->getObject( Array ('raise_warnings' => 0) );
+ $object = $event->getObject( Array ('raise_warnings' => 0) );
/* @var $object kDBItem */
return !$object->isLoaded();
@@ -2032,7 +2032,7 @@
$event->CallSubEvent($not_created ? 'OnCreate' : 'OnUpdate');
if ( $event->status == kEvent::erSUCCESS ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->Application->SetVar($event->getPrefixSpecial() . '_id', $object->GetID());
@@ -2113,7 +2113,7 @@
$this->clearSelectedIDs($event);
$this->Application->SetVar('m_lang', $this->Application->GetDefaultLanguageId());
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$temp_handler = $this->Application->recallObject($event->Prefix . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event));
@@ -2141,7 +2141,7 @@
*/
protected function OnPreSaveCreated(kEvent $event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$field_values = $this->getSubmittedFields($event);
@@ -2172,7 +2172,7 @@
//do nothing - should reset :)
if ( $this->isNewItemCreate($event) ) {
// just reset id to 0 in case it was create
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$object->setID(0);
@@ -2194,7 +2194,7 @@
return ;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$ids = $this->StoreSelectedIDs($event);
@@ -2297,7 +2297,7 @@
*/
protected function OnPreSavePopup(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->RemoveRequiredFields($object);
@@ -2358,7 +2358,7 @@
*/
protected function OnAfterItemCreate(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->IsTempTable() ) {
@@ -2387,7 +2387,7 @@
*/
protected function OnAfterItemUpdate(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->IsTempTable() ) {
@@ -2718,7 +2718,7 @@
{
$this->Application->SetVar('allow_translation', true);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->RemoveRequiredFields($object);
@@ -2792,7 +2792,7 @@
*/
protected function OnSelectUser(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$items_info = $this->Application->GetVar('u');
@@ -3164,7 +3164,7 @@
return;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
$options = $object->GetFieldOptions($this->Application->GetVar('field'));
$var_name = $this->_getPendingActionVariableName($event);
@@ -3191,7 +3191,7 @@
return;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$field = $this->Application->GetVar('field');
@@ -3264,7 +3264,7 @@
return;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -3319,7 +3319,7 @@
$cur_value = $this->Application->GetVar('cur_value');
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
- $object =& $event->getObject();
+ $object = $event->getObject();
if ( !$field || !$cur_value || !$object->isField($field) ) {
return;
Index: kernel/utility/event.php
===================================================================
--- kernel/utility/event.php (revision 15144)
+++ kernel/utility/event.php (working copy)
@@ -269,7 +269,7 @@
* @return kDBBase
* @access public
*/
- public function &getObject(array $params = Array())
+ public function getObject(array $params = Array())
{
if ( !$this->Application->hasObject($this->prefixSpecial) ) {
$top_event = $this;
@@ -282,9 +282,7 @@
$params['parent_event'] = $top_event;
}
- $object = $this->Application->recallObject($this->prefixSpecial, $this->pseudoClass, $params);
-
- return $object;
+ return $this->Application->recallObject($this->prefixSpecial, $this->pseudoClass, $params);
}
/**
@@ -318,10 +316,10 @@
* @param bool $inherit
* @access public
*/
- public function copyFrom(&$source_event, $inherit = false)
+ public function copyFrom($source_event, $inherit = false)
{
- if ($inherit) {
- $this->MasterEvent =& $source_event;
+ if ( $inherit ) {
+ $this->MasterEvent = $source_event;
}
else {
$this->status = $source_event->status;
Index: units/admin/admin_events_handler.php
===================================================================
--- units/admin/admin_events_handler.php (revision 15137)
+++ units/admin/admin_events_handler.php (working copy)
@@ -627,7 +627,7 @@
*/
protected function OnCSVImportBegin(kEvent $event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$field_values = $this->getSubmittedFields($event);
Index: units/categories/categories_event_handler.php
===================================================================
--- units/categories/categories_event_handler.php (revision 15137)
+++ units/categories/categories_event_handler.php (working copy)
@@ -249,7 +249,7 @@
*/
function OnProcessSelected($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$selected_ids = $this->Application->GetVar('selected_ids');
@@ -273,7 +273,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
// don't show "Content" category in advanced view
@@ -532,7 +532,7 @@
$search_event = $event_mapping[$type];
$this->$search_event($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$search_sql = ' FROM ' . TABLE_PREFIX . 'ses_' . $this->Application->GetSID() . '_' . TABLE_PREFIX . 'Search
@@ -687,7 +687,7 @@
return;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->addCalculatedField(
@@ -751,7 +751,7 @@
$id = $event->getEventParam('id');
// loading anyway, because this object is needed by "c-perm:OnBeforeDeleteFromLive" event
- $temp_object =& $event->getObject(Array ('skip_autoload' => true));
+ $temp_object = $event->getObject(Array ('skip_autoload' => true));
/* @var $temp_object CategoriesItem */
$temp_object->Load($id);
@@ -819,7 +819,7 @@
parent::OnPreCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// 2. preset template
@@ -848,7 +848,7 @@
$is_editing = implode('', $ids);
$old_statuses = $is_editing ? $this->_getCategoryStatus($ids) : Array ();
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object CategoriesItem */
parent::OnSave($event);
@@ -924,7 +924,7 @@
*/
protected function OnPreSaveCreated(kEvent $event)
{
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object CategoriesItem */
if ( $object->IsRoot() ) {
@@ -946,7 +946,7 @@
{
parent::OnAfterItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'UPDATE ' . $object->TableName . '
@@ -1051,7 +1051,7 @@
$rb->Load($recycle_bin);
- $cat =& $event->getObject(Array ('skip_autoload' => true));
+ $cat = $event->getObject(Array ('skip_autoload' => true));
/* @var $cat CategoriesItem */
foreach ($ids as $id) {
@@ -1320,7 +1320,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object CategoriesItem */
if ( $object->GetDBField('ParentId') <= 0 ) {
@@ -1391,7 +1391,7 @@
$this->_beforeItemChange($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetChangedFields() ) {
@@ -1415,7 +1415,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$cache_updater = $this->Application->makeClass('kPermCacheUpdater', Array (null, $object->GetDBField('ParentPath')));
@@ -1472,7 +1472,7 @@
$page = $this->Application->GetVar($page_var);
if ( is_numeric($page) ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->SetPage($page);
@@ -1499,7 +1499,7 @@
return;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object CategoriesItem */
$ids = $this->StoreSelectedIDs($event);
@@ -1546,7 +1546,7 @@
*/
protected function checkItemStatus(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
@@ -1662,7 +1662,7 @@
*/
function _beforeItemChange($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object CategoriesItem */
$object->checkFilename();
@@ -1771,7 +1771,7 @@
{
parent::OnBeforeItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('Protected') && !$this->Application->isDebugMode(false) ) {
@@ -2112,7 +2112,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// remove this category & it's children from dropdown
@@ -2139,7 +2139,7 @@
{
parent::OnAfterItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object CategoriesItem */
// need to update path after category is created, so category is included in that path
@@ -2292,7 +2292,7 @@
$event->setPseudoClass('_List');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$this->Application->SetVar($event->getPrefixSpecial().'_Page', 1);
@@ -2564,7 +2564,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$id = $this->getPassedID($event);
@@ -2601,7 +2601,7 @@
$actual_event_name = $event->getEventParam('actual_event');
if ( $actual_event_name == 'OnSavePriorityChanges' || $event_name == 'OnAfterItemLoad' || $event_name == 'OnAfterItemDelete' ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$constrain = 'ParentId = ' . $object->GetDBField('ParentId');
@@ -2878,7 +2878,7 @@
*/
protected function OnAfterItemValidate(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$resource_id = $object->GetDBField('ResourceId');
@@ -2900,7 +2900,7 @@
{
parent::OnBeforeClone($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('ResourceId', 0); // this will reset it
Index: units/category_items/category_items_event_handler.php
===================================================================
--- units/category_items/category_items_event_handler.php (revision 15137)
+++ units/category_items/category_items_event_handler.php (working copy)
@@ -28,7 +28,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$ml_formatter = $this->Application->recallObject('kMultiLanguage');
@@ -44,7 +44,7 @@
*/
function OnSetPrimary($event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$ids = $this->StoreSelectedIDs($event);
@@ -71,7 +71,7 @@
protected function customProcessing(kEvent $event, $type)
{
if ( $event->Name == 'OnMassDelete' ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
$table_info = $object->getLinkedInfo();
switch ($type) {
Index: units/config_search/config_search_event_handler.php
===================================================================
--- units/config_search/config_search_event_handler.php (revision 15130)
+++ units/config_search/config_search_event_handler.php (working copy)
@@ -45,7 +45,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
// show only items that belong to selected module
@@ -107,7 +107,7 @@
*/
protected function OnCreateCustomField($event)
{
- $custom_field =& $event->MasterEvent->getObject();
+ $custom_field = $event->MasterEvent->getObject();
/* @var $custom_field kDBItem */
if ( $custom_field->GetDBField('Type') == 6 || $custom_field->GetDBField('IsSystem') == 1 ) {
@@ -115,7 +115,7 @@
return ;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$custom_id = $custom_field->GetID();
Index: units/configuration/configuration_event_handler.php
===================================================================
--- units/configuration/configuration_event_handler.php (revision 15137)
+++ units/configuration/configuration_event_handler.php (working copy)
@@ -59,7 +59,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$module = $this->Application->GetVar('module');
@@ -92,7 +92,7 @@
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// ability to validate each configuration variable separately
@@ -193,7 +193,7 @@
parent::OnAfterItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('ElementType') == 'password' ) {
@@ -256,7 +256,7 @@
unset($items_info['ModuleRootCategory']);
}
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
if ( $items_info ) {
Index: units/content/content_eh.php
===================================================================
--- units/content/content_eh.php (revision 15137)
+++ units/content/content_eh.php (working copy)
@@ -81,7 +81,7 @@
*/
function saveContentBlock($event, $is_draft)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
@@ -162,7 +162,7 @@
function getContentBlockAndRevision($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
Index: units/country_states/country_state_eh.php
===================================================================
--- units/country_states/country_state_eh.php (revision 15137)
+++ units/country_states/country_state_eh.php (working copy)
@@ -46,7 +46,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( ($event->Special == 'selected') || ($event->Special == 'available') ) {
@@ -95,7 +95,7 @@
*/
function _setRequired($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$field_options = $object->GetFieldOptions('IsoCode');
@@ -123,7 +123,7 @@
{
parent::OnBeforeItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$cs_helper = $this->Application->recallObject('CountryStatesHelper');
Index: units/custom_fields/custom_fields_event_handler.php
===================================================================
--- units/custom_fields/custom_fields_event_handler.php (revision 15137)
+++ units/custom_fields/custom_fields_event_handler.php (working copy)
@@ -48,7 +48,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$item_type = $this->Application->GetVar('cf_type');
@@ -134,7 +134,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'SELECT COUNT(*)
@@ -160,7 +160,7 @@
{
parent::OnAfterItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$main_prefix = $this->getPrefixByItemType($object->GetDBField('Type'));
@@ -202,7 +202,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$main_prefix = $this->getPrefixByItemType($object->GetDBField('Type'));
@@ -245,7 +245,7 @@
{
parent::OnPreCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('Type', $this->Application->GetVar('cf_type'));
@@ -262,7 +262,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !in_array($object->GetDBField('ElementType'), $this->_getMultiElementTypes()) ) {
@@ -315,7 +315,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !in_array($object->GetDBField('ElementType'), $this->_getMultiElementTypes()) ) {
Index: units/email_events/email_events_event_handler.php
===================================================================
--- units/email_events/email_events_event_handler.php (revision 15137)
+++ units/email_events/email_events_event_handler.php (working copy)
@@ -90,7 +90,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( $event->Special == 'module' ) {
@@ -118,7 +118,7 @@
$mapping = Array ('conf' => 'VariableValue', 'site-domain' => 'DefaultEmailRecipients');
if ( isset($mapping[$event->Special]) ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$target_object = $this->Application->recallObject($event->Special);
@@ -139,7 +139,7 @@
{
parent::OnPreCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('Headers', $this->Application->ConfigValue('Smtp_DefaultHeaders'));
@@ -228,7 +228,7 @@
$name = $event->getEventParam('EmailEventName');
$type = $event->getEventParam('EmailEventType');
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
if (!$object->isLoaded() || ($object->GetDBField('Event') != $name || $object->GetDBField('Type') != $type)) {
@@ -962,7 +962,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if (!$this->Application->isDebugMode(false)) {
@@ -997,7 +997,7 @@
*/
function _itemChanged($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// validate email subject and body for parsing errors
@@ -1082,7 +1082,7 @@
*/
function _validateAddress($event, $field_prefix)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$address_type = $object->GetDBField($field_prefix . 'AddressType');
Index: units/favorites/favorites_eh.php
===================================================================
--- units/favorites/favorites_eh.php (revision 15137)
+++ units/favorites/favorites_eh.php (working copy)
@@ -56,7 +56,7 @@
WHERE (PortalUserId = '.$user_id.') AND (ResourceId = '.$parent_object->GetDBField('ResourceId').')';
$favorite_id = $this->Conn->GetOne($sql);
- $object =& $event->getObject(Array('skip_autoload' => true));
+ $object = $event->getObject(Array('skip_autoload' => true));
/* @var $object kDBItem */
if ($favorite_id) {
@@ -80,7 +80,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$user_id = $this->Application->RecallVar('user_id');
@@ -101,7 +101,7 @@
*/
function OnDeleteFavoriteItem($event)
{
- $main_object =& $event->MasterEvent->getObject();
+ $main_object = $event->MasterEvent->getObject();
$sql = 'DELETE FROM '.$this->Application->getUnitOption($event->Prefix, 'TableName').'
WHERE ResourceId = '.$main_object->GetDBField('ResourceId');
Index: units/files/file_eh.php
===================================================================
--- units/files/file_eh.php (revision 15137)
+++ units/files/file_eh.php (working copy)
@@ -45,7 +45,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
@@ -62,7 +62,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->GetDBField('FileName') ) {
@@ -82,7 +82,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( !$this->Application->isAdminUser ) {
@@ -97,7 +97,7 @@
*/
function OnDownloadFile($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$file_helper = $this->Application->recallObject('FileHelper');
Index: units/filters/item_filter_eh.php
===================================================================
--- units/filters/item_filter_eh.php (revision 15137)
+++ units/filters/item_filter_eh.php (working copy)
@@ -47,7 +47,7 @@
parent::SetCustomQuery($event);
if ( !$this->Application->isAdmin ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$prefix_info = $this->Application->processPrefix($event->getEventParam('prefix'));
@@ -91,7 +91,7 @@
{
parent::OnBeforeItemValidate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$prefix = $object->GetDBField('ItemPrefix');
@@ -133,7 +133,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !isset($cache) ) {
Index: units/forms/drafts/draft_eh.php
===================================================================
--- units/forms/drafts/draft_eh.php (revision 15137)
+++ units/forms/drafts/draft_eh.php (working copy)
@@ -27,7 +27,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$user_id = $this->Application->RecallVar('user_id');
Index: units/forms/form_fields/form_field_eh.php
===================================================================
--- units/forms/form_fields/form_field_eh.php (revision 15130)
+++ units/forms/form_fields/form_field_eh.php (working copy)
@@ -42,7 +42,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$visibility_filter = $this->getVisiblilityFilter();
Index: units/forms/form_submissions/form_submissions_eh.php
===================================================================
--- units/forms/form_submissions/form_submissions_eh.php (revision 15137)
+++ units/forms/form_submissions/form_submissions_eh.php (working copy)
@@ -185,7 +185,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->addFilter('form_filter', '%1$s.FormId = ' . (int)$this->Application->GetVar('form_id'));
@@ -229,7 +229,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// allows user to view only it's last submission
@@ -279,7 +279,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('IPAddress', $_SERVER['REMOTE_ADDR']);
@@ -320,7 +320,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->setRequired('MergeToSubmission', $object->GetDBField('IsMergeToSubmission'));
@@ -402,7 +402,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$form_id = $object->GetDBField('FormId');
@@ -496,7 +496,7 @@
parent::OnUpdate($event);
if ($event->status == kEvent::erSUCCESS) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$merge_to = $object->GetDBField('MergeToSubmission');
Index: units/forms/forms/forms_eh.php
===================================================================
--- units/forms/forms/forms_eh.php (revision 15137)
+++ units/forms/forms/forms_eh.php (working copy)
@@ -181,7 +181,7 @@
*/
protected function OnFormSubmit($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$fields = explode(',',$this->Application->GetVar('fields'));
@@ -296,7 +296,7 @@
*/
function _validatePopSettings($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$modes = Array ('Reply', 'Bounce');
@@ -356,7 +356,7 @@
*/
function _setRequired($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$required = $object->GetDBField('EnableEmailCommunication');
@@ -379,7 +379,7 @@
*/
function _disableSecurityImage($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ($object->GetDBField('RequireLogin')) {
Index: units/forms/submission_log/submission_log_eh.php
===================================================================
--- units/forms/submission_log/submission_log_eh.php (revision 15137)
+++ units/forms/submission_log/submission_log_eh.php (working copy)
@@ -75,7 +75,7 @@
{
parent::OnNew($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$form_submission = $this->Application->recallObject('formsubs');
@@ -212,7 +212,7 @@
return ;
}
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$sql = 'SELECT f.ReplyFromEmail, sl.' . $object->IDField . '
@@ -277,7 +277,7 @@
*/
function _validateRecipients($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$esender = $this->Application->recallObject('EmailSender');
@@ -414,7 +414,7 @@
{
parent::OnAfterItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->_sendEmail($object); // send email
@@ -451,7 +451,7 @@
*/
function _getLastMessageId($event, $from_client = false)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$form_submission =& $this->_getFormSubmission($object);
@@ -481,7 +481,7 @@
$this->_updateSubmission($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// send out email event to admin for bouncing
@@ -499,7 +499,7 @@
*/
function _updateStatusDates($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$now = adodb_mktime();
@@ -549,7 +549,7 @@
*/
function _updateSubmission($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$form_submission =& $this->_getFormSubmission($object);
@@ -595,7 +595,7 @@
*/
function OnSaveDraft($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$draft = $this->Application->recallObject('draft', null, Array('skip_autoload' => true));
@@ -638,7 +638,7 @@
*/
function OnUseDraft($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$draft = $this->Application->recallObject('draft', null, Array('skip_autoload' => true));
@@ -675,7 +675,7 @@
*/
function OnDeleteDraft($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$draft = $this->Application->recallObject('draft', null, Array('skip_autoload' => true));
Index: units/groups/groups_event_handler.php
===================================================================
--- units/groups/groups_event_handler.php (revision 15130)
+++ units/groups/groups_event_handler.php (working copy)
@@ -28,7 +28,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
switch ($event->Special) {
Index: units/helpers/ajax_form_helper.php
===================================================================
--- units/helpers/ajax_form_helper.php (revision 15137)
+++ units/helpers/ajax_form_helper.php (working copy)
@@ -11,7 +11,7 @@
*/
public function prepareJSONErrors($event, &$response)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$response['status'] = 'FAILED';
Index: units/helpers/brackets_helper.php
===================================================================
--- units/helpers/brackets_helper.php (revision 15137)
+++ units/helpers/brackets_helper.php (working copy)
@@ -169,7 +169,7 @@
{
$field_values = $this->getBrackets($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
foreach($field_values as $id => $record)
{
@@ -211,7 +211,7 @@
*/
function OnInfinity($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$infinite_exists = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$object->TableName.' WHERE '.$this->max_field.' = -1');
$field_values = $this->getBrackets($event);
/*if(is_array($field_values))
@@ -256,7 +256,7 @@
{
$items_info = $this->getBrackets($event);
if ($items_info) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$linked_info = $object->getLinkedInfo();
@@ -314,7 +314,7 @@
*/
function arrangeBrackets($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$temp = $this->getBrackets($event);
@@ -465,7 +465,7 @@
*/
function replaceInfinity($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField($this->max_field) == '∞' ) {
Index: units/helpers/captcha_helper.php
===================================================================
--- units/helpers/captcha_helper.php (revision 15130)
+++ units/helpers/captcha_helper.php (working copy)
@@ -167,7 +167,7 @@
}
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$valid_code = $this->Application->RecallVar($event->getPrefixSpecial() . '_captcha_code');
Index: units/helpers/cat_dbitem_export_helper.php
===================================================================
--- units/helpers/cat_dbitem_export_helper.php (revision 15137)
+++ units/helpers/cat_dbitem_export_helper.php (working copy)
@@ -158,7 +158,7 @@
function fillRequiredFields($event, &$object, $set_status = false)
{
if ( $object == $this->false ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
}
@@ -222,7 +222,7 @@
$this->fillRequiredFields($event, $this->false);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
$cross_unique_fields = Array('FieldsSeparatedBy', 'FieldsEnclosedBy');
@@ -326,7 +326,7 @@
}
else {
$check_fields = $this->exportOptions['DuplicateCheckFields'] ? explode('|', substr($this->exportOptions['DuplicateCheckFields'], 1, -1)) : Array();
- $object =& $event->getObject();
+ $object = $event->getObject();
$fields = $object->getFields();
$language_id = $this->Application->GetDefaultLanguageId();
@@ -547,7 +547,7 @@
{
$this->exportOptions = $this->loadOptions($event);
$this->exportFields = $this->exportOptions['ExportColumns'];
- $this->curItem =& $event->getObject( Array('skip_autoload' => true) );
+ $this->curItem = $event->getObject( Array('skip_autoload' => true) );
$this->customFields = $this->Application->getUnitOption($event->Prefix, 'CustomFields');
$this->openFile($event);
@@ -773,7 +773,7 @@
{
switch ($object_type) {
case IMPORT_TEMP:
- $this->curItem =& $event->getObject( Array('skip_autoload' => true) );
+ $this->curItem = $event->getObject( Array('skip_autoload' => true) );
break;
case IMPORT_LIVE:
@@ -1247,7 +1247,7 @@
*/
function prepareExportColumns($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kCatDBItem */
if ( !$object->isField('ExportColumns') ) {
@@ -1334,7 +1334,7 @@
*/
function PrepareExportPresets($event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$options = $object->GetFieldOptions('ExportPresets');
@@ -1406,7 +1406,7 @@
$import_filenames[$file] = $file . ' (' . kUtil::formatSize( $file_info->getSize() ) . ')';
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetFieldOption('ImportLocalFilename', 'options', $import_filenames);
@@ -1442,7 +1442,7 @@
list($item_id, $field_values) = each($items_info);
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
@@ -1542,7 +1542,7 @@
$required_fields['export'] = Array('ExportFormat', 'ExportFilename','ExportColumns');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ($this->_getExportSavePreset($object)) {
Index: units/helpers/controls/edit_picker_helper.php
===================================================================
--- units/helpers/controls/edit_picker_helper.php (revision 15137)
+++ units/helpers/controls/edit_picker_helper.php (working copy)
@@ -40,7 +40,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$main_object = $this->Application->recallObject($event->getEventParam('link_to_prefix'));
@@ -74,7 +74,7 @@
*/
function LoadValues($event, $store_field, $source_field)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
list ($sub_prefix, $sub_prefix_field) = explode('.', $source_field);
Index: units/helpers/controls/minput_helper.php
===================================================================
--- units/helpers/controls/minput_helper.php (revision 15137)
+++ units/helpers/controls/minput_helper.php (working copy)
@@ -79,7 +79,7 @@
*/
function OnValidateMInputFields($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -149,7 +149,7 @@
*/
function LoadValues($event, $store_field, $sub_prefix, $use_fields)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sub_item = $this->Application->recallObject($sub_prefix, null, Array('skip_autoload' => true));
Index: units/helpers/country_states_helper.php
===================================================================
--- units/helpers/country_states_helper.php (revision 15130)
+++ units/helpers/country_states_helper.php (working copy)
@@ -60,7 +60,7 @@
{
static $cache = Array ();
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$country_iso = $object->GetDBField($country_field);
@@ -157,7 +157,7 @@
*/
function CheckStateField($event, $state_field, $country_field, $auto_required = true)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$country_iso = $object->GetDBField($country_field);
Index: units/helpers/priority_helper.php
===================================================================
--- units/helpers/priority_helper.php (revision 15137)
+++ units/helpers/priority_helper.php (working copy)
@@ -27,7 +27,7 @@
*/
function preparePriorities($event, $is_new = false, $constrain = '', $joins = '')
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$field_options = $object->GetFieldOptions('Priority');
Index: units/helpers/search_helper.php
===================================================================
--- units/helpers/search_helper.php (revision 15137)
+++ units/helpers/search_helper.php (working copy)
@@ -216,7 +216,7 @@
*/
public function performSearch($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// process search keyword
@@ -251,7 +251,7 @@
$search_filter = Array();
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
foreach ($search_fields as $search_field) {
@@ -463,7 +463,7 @@
return false;
}
- $object =& $event->getObject(); // don't recall it each time in getCustomFilterSearchClause
+ $object = $event->getObject(); // don't recall it each time in getCustomFilterSearchClause
$grid_info = $this->Application->getUnitOption($event->Prefix.'.'.$grid_name, 'Grids');
foreach ($custom_filter as $field_name => $field_options) {
list ($filter_type, $field_options) = each($field_options);
@@ -793,7 +793,7 @@
}
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->addFilter('includes_filter', $includes_or_filter);
Index: units/images/image_event_handler.php
===================================================================
--- units/images/image_event_handler.php (revision 15137)
+++ units/images/image_event_handler.php (working copy)
@@ -85,7 +85,7 @@
*/
protected function customProcessing(kEvent $event, $type)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
@@ -251,7 +251,7 @@
*/
protected function OnSetPrimary($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('DefaultImg', 1);
@@ -285,7 +285,7 @@
$this->processImageStatus($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->Update();
@@ -298,7 +298,7 @@
*/
function processImageStatus($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$id = $object->GetDBField('ResourceId');
@@ -334,7 +334,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( !$this->Application->isAdminUser ) {
Index: units/languages/languages_event_handler.php
===================================================================
--- units/languages/languages_event_handler.php (revision 15137)
+++ units/languages/languages_event_handler.php (working copy)
@@ -120,7 +120,7 @@
$ids = $this->getSelectedIDs($event);
if ($ids) {
$id = array_shift($ids);
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object LanguagesItem */
$object->Load($id);
@@ -139,7 +139,7 @@
return ;
}
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object LanguagesItem */
$object->SwitchToLive();
@@ -221,7 +221,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$status_fields = $this->Application->getUnitOption($event->Prefix, 'StatusField');
@@ -244,7 +244,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( in_array($event->Special, Array ('enabled', 'selected', 'available')) ) {
@@ -279,7 +279,7 @@
{
parent::OnAfterItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$src_language = $object->GetDBField('CopyFromLanguage');
@@ -363,7 +363,7 @@
{
parent::OnPreCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('CopyLabels', 1);
@@ -596,7 +596,7 @@
{
parent::OnBeforeItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('PrimaryLang') || $object->GetDBField('AdminInterfaceLang') || $object->GetID() == $this->Application->GetVar('m_lang') ) {
@@ -615,7 +615,7 @@
{
parent::OnAfterItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// clean EmailEvents table
Index: units/logs/change_logs/change_log_eh.php
===================================================================
--- units/logs/change_logs/change_log_eh.php (revision 15130)
+++ units/logs/change_logs/change_log_eh.php (working copy)
@@ -45,7 +45,7 @@
{
parent::OnAfterItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'UPDATE ' . $this->Application->getUnitOption('session-log', 'TableName') . '
Index: units/logs/session_logs/session_log_eh.php
===================================================================
--- units/logs/session_logs/session_log_eh.php (revision 15137)
+++ units/logs/session_logs/session_log_eh.php (working copy)
@@ -111,7 +111,7 @@
{
parent::OnAfterItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'SELECT ' . $this->Application->getUnitOption('change-log', 'IDField') . '
Index: units/mailing_lists/mailing_list_eh.php
===================================================================
--- units/mailing_lists/mailing_list_eh.php (revision 15137)
+++ units/mailing_lists/mailing_list_eh.php (working copy)
@@ -54,7 +54,7 @@
$recipients = $this->Application->GetVar($recipient_type);
if ( $recipients ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$to = $recipient_type . '_' . implode(';' . $recipient_type . '_', array_keys($recipients));
@@ -103,7 +103,7 @@
$this->_deleteQueue($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// delete mailing attachments after mailing is deleted
@@ -126,7 +126,7 @@
*/
function OnCancelMailing($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$ids = $this->StoreSelectedIDs($event);
@@ -153,7 +153,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$this->Application->GetVar('mailing_recipient_type') ) {
@@ -185,7 +185,7 @@
{
parent::OnAfterItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$status = $object->GetDBField('Status');
@@ -201,7 +201,7 @@
*/
function _deleteQueue($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'DELETE FROM ' . $this->Application->getUnitOption('email-queue', 'TableName') . '
Index: units/modules/modules_event_handler.php
===================================================================
--- units/modules/modules_event_handler.php (revision 15137)
+++ units/modules/modules_event_handler.php (working copy)
@@ -43,7 +43,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( $event->Special ) {
@@ -80,7 +80,7 @@
return ;
}
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$ids = $this->StoreSelectedIDs($event);
@@ -160,7 +160,7 @@
$toolkit = new kInstallToolkit();
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
foreach ($new_modules as $module) {
Index: units/page_revisions/page_revision_eh.php
===================================================================
--- units/page_revisions/page_revision_eh.php (revision 15137)
+++ units/page_revisions/page_revision_eh.php (working copy)
@@ -62,7 +62,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$page_id = $event->getEventParam('page_id');
@@ -111,7 +111,7 @@
}
// no revisions -> create live revision
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('PageId', $page_id);
@@ -136,7 +136,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $this->Application->isAdmin ) {
@@ -158,7 +158,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('IsDraft') == 0 && $object->GetOriginalField('IsDraft') == 1 ) {
@@ -178,7 +178,7 @@
{
parent::OnAfterItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->GetDBField('FromRevisionId') ) {
@@ -210,7 +210,7 @@
{
parent::OnAfterItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$status = $object->GetDBField('Status');
@@ -257,7 +257,7 @@
$revision_id = $this->getCurrentDraftRevision($event);
if ( $revision_id ) {
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->Load($revision_id);
Index: units/permission_types/permission_type_eh.php
===================================================================
--- units/permission_types/permission_type_eh.php (revision 15130)
+++ units/permission_types/permission_type_eh.php (working copy)
@@ -27,7 +27,7 @@
{
parent::OnBeforeItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('IsSystem') ) {
Index: units/permissions/permissions_event_handler.php
===================================================================
--- units/permissions/permissions_event_handler.php (revision 15137)
+++ units/permissions/permissions_event_handler.php (working copy)
@@ -48,7 +48,7 @@
if (isset($permissions[$group_id])) {
$permissions = $permissions[$group_id];
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$permissions_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $permissions_helper kPermissionsHelper */
@@ -118,7 +118,7 @@
return ;
}
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$group_id = $this->Application->GetVar('g_id');
@@ -189,7 +189,7 @@
*/
function UpdatePermissions($event, $create_sql, $update_sql, $delete_ids)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ($delete_ids) {
Index: units/phrases/phrases_event_handler.php
===================================================================
--- units/phrases/phrases_event_handler.php (revision 15130)
+++ units/phrases/phrases_event_handler.php (working copy)
@@ -133,7 +133,7 @@
{
parent::OnPreCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->_setPhraseModule($object);
@@ -150,7 +150,7 @@
{
parent::OnNew($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$label = $this->Application->GetVar($event->getPrefixSpecial() . '_label');
@@ -212,7 +212,7 @@
protected function OnCreate(kEvent $event)
{
if ( $this->Application->GetVar($event->Prefix . '_label') ) {
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
if ( $this->Application->GetVar('m_lang') != $this->Application->GetVar('lang_id') ) {
@@ -269,7 +269,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$primary_language_id = $this->Application->GetDefaultLanguageId();
@@ -313,7 +313,7 @@
*/
function _phraseChanged($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$label = $object->GetDBField('Phrase');
Index: units/priorites/priority_eh.php
===================================================================
--- units/priorites/priority_eh.php (revision 15137)
+++ units/priorites/priority_eh.php (working copy)
@@ -185,7 +185,7 @@
return ;
}
- $object =& $event->MasterEvent->getObject();
+ $object = $event->MasterEvent->getObject();
$tmp = $this->Application->RecallVar('priority_changes'.$this->Application->GetVar('m_wid'));
$changes = $tmp ? unserialize($tmp) : array();
@@ -279,7 +279,7 @@
function OnItemCreate($event)
{
- $obj =& $event->MasterEvent->getObject();
+ $obj = $event->MasterEvent->getObject();
if ($obj->GetDBField('Priority') == 0) {
$priority_helper = $this->Application->recallObject('PriorityHelper');
/* @var $priority_helper kPriorityHelper */
Index: units/promo_block_groups/promo_block_group_eh.php
===================================================================
--- units/promo_block_groups/promo_block_group_eh.php (revision 15130)
+++ units/promo_block_groups/promo_block_group_eh.php (working copy)
@@ -51,7 +51,7 @@
*/
private function beforeItemChange($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->setRequired('TransitionEffectCustom', $object->GetDBField('TransitionEffect') == '-1');
@@ -69,7 +69,7 @@
{
parent::OnBeforeItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'SELECT BlockId
Index: units/promo_blocks/promo_block_eh.php
===================================================================
--- units/promo_blocks/promo_block_eh.php (revision 15137)
+++ units/promo_blocks/promo_block_eh.php (working copy)
@@ -68,7 +68,7 @@
{
parent::OnPreCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$promo_block_group = $this->Application->recallObject('promo-block-group');
@@ -100,7 +100,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( $this->Application->isAdmin ) {
@@ -135,7 +135,7 @@
*/
protected function OnSetSticky(kEvent $event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$ids = $this->StoreSelectedIDs($event);
@@ -194,7 +194,7 @@
*/
protected function _itemChanged(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$date_from = $object->GetDBField('ScheduleFromDate_date');
@@ -229,7 +229,7 @@
*/
protected function OnFollowLink(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->_incrementField($event, 'NumberOfClicks', false);
@@ -267,7 +267,7 @@
}
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
@@ -293,7 +293,7 @@
*/
protected function OnResetCounters(kEvent $event)
{
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$ids = $this->StoreSelectedIDs($event);
Index: units/related_searches/related_searches_event_handler.php
===================================================================
--- units/related_searches/related_searches_event_handler.php (revision 15130)
+++ units/related_searches/related_searches_event_handler.php (working copy)
@@ -27,7 +27,7 @@
{
parent::OnNew($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$table_info = $object->getLinkedInfo();
Index: units/relationship/relationship_event_handler.php
===================================================================
--- units/relationship/relationship_event_handler.php (revision 15130)
+++ units/relationship/relationship_event_handler.php (working copy)
@@ -45,7 +45,7 @@
{
parent::OnNew($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$table_info = $object->getLinkedInfo();
@@ -71,7 +71,7 @@
if ( $dst_field == 'TargetId' ) {
// prepare target_id & target_type
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
$target_id = 0;
$target_prefix = false;
@@ -136,7 +136,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'SELECT Prefix
@@ -218,7 +218,7 @@
$sql_parts['TargetName'] = str_replace('rel','%1$s',$sql_parts['TargetName']);
}
- $object =& $event->getObject();
+ $object = $event->getObject();
$vars = Array('#ITEM_NAMES#', '#ITEM_TYPES#');
$replacements = Array( implode(', ',$sql_parts['ItemName']), $sql_parts['TargetName'] );
@@ -289,7 +289,7 @@
*/
function OnDeleteForeignRelations($event)
{
- $main_object =& $event->MasterEvent->getObject();
+ $main_object = $event->MasterEvent->getObject();
/* @var $main_object kDBItem */
$sql = 'DELETE FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
Index: units/reviews/reviews_event_handler.php
===================================================================
--- units/reviews/reviews_event_handler.php (revision 15137)
+++ units/reviews/reviews_event_handler.php (working copy)
@@ -132,7 +132,7 @@
return false;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// 1. get main item resource id (use object, because of temp tables in admin)
@@ -179,7 +179,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( !$this->Application->isAdminUser ) {
@@ -269,7 +269,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_info = $object->getLinkedInfo();
@@ -318,7 +318,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$rating = $object->GetDBField('Rating');
@@ -345,7 +345,7 @@
$spam_helper = $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_info = $object->getLinkedInfo();
@@ -379,7 +379,7 @@
$this->updateSubitemCounters($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $this->Application->isAdminUser && !$object->IsTempTable() ) {
@@ -404,7 +404,7 @@
*/
function _loadMainObject($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_prefix = $this->Application->getUnitOption($event->Prefix, 'ParentPrefix');
@@ -429,7 +429,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_prefix = $this->Application->getUnitOption($event->Prefix, 'ParentPrefix');
@@ -537,7 +537,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $this->Application->GetVar('ajax') == 'yes' ) {
Index: units/scheduled_tasks/scheduled_task_eh.php
===================================================================
--- units/scheduled_tasks/scheduled_task_eh.php (revision 15137)
+++ units/scheduled_tasks/scheduled_task_eh.php (working copy)
@@ -44,7 +44,7 @@
{
$scheduled_tasks_from_cache = $this->Application->EventManager->getScheduledTasks(true);
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$processed_ids = Array ();
@@ -127,7 +127,7 @@
$ids = $this->StoreSelectedIDs($event);
if ($ids) {
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
foreach ($ids as $id) {
@@ -154,7 +154,7 @@
$ids = $this->StoreSelectedIDs($event);
if ($ids) {
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$where_clause = Array (
Index: units/selectors/selectors_event_handler.php
===================================================================
--- units/selectors/selectors_event_handler.php (revision 15130)
+++ units/selectors/selectors_event_handler.php (working copy)
@@ -52,7 +52,7 @@
$event->Init($event->Prefix, '-item');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$title_field = 'SelectorName';
@@ -105,7 +105,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
switch ($event->Special) {
@@ -205,7 +205,7 @@
*/
function SaveChanges($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -240,7 +240,7 @@
{
$this->SaveChanges($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
$this->Application->SetVar($event->getPrefixSpecial().'_id', $object->GetId() );
$this->finalizePopup($event);
@@ -257,7 +257,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$selector_data = $object->GetDBField('SelectorData');
@@ -280,7 +280,7 @@
*/
function SerializeSelectorData($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$selector_data = $object->GetDBField('SelectorData');
@@ -304,7 +304,7 @@
*/
function UnserializeSelectorData($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$selector_data = $object->GetDBField('SelectorData');
@@ -329,7 +329,7 @@
*/
function OnPrepareBaseStyles($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$parent_info = $object->getLinkedInfo();
$title_field = $this->Application->getUnitOption($event->Prefix,'TitleField');
@@ -348,7 +348,7 @@
*/
function RemoveParentProperties($event, $selector_data)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_id = $object->GetDBField('ParentId');
@@ -391,7 +391,7 @@
*/
function AddParentProperties($event, $selector_data)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_id = $object->GetDBField('ParentId');
@@ -421,7 +421,7 @@
*/
function OnResetToBase($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object SelectorsItem */
$field_values = $this->getSubmittedFields($event);
@@ -438,7 +438,7 @@
*/
function OnMassResetToBase($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object SelectorsItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
Index: units/site_domains/site_domain_eh.php
===================================================================
--- units/site_domains/site_domain_eh.php (revision 15137)
+++ units/site_domains/site_domain_eh.php (working copy)
@@ -117,7 +117,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$id = (int)$this->getPassedID($event);
@@ -268,7 +268,7 @@
*/
function _itemChanged($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$email_event_data = $this->Application->GetVar('emailevents_' . $event->Prefix);
@@ -284,7 +284,7 @@
*/
function _setRequired($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$redirect_mode = $object->GetDBField('RedirectOnIPMatch');
Index: units/skins/skin_eh.php
===================================================================
--- units/skins/skin_eh.php (revision 15137)
+++ units/skins/skin_eh.php (working copy)
@@ -98,7 +98,7 @@
{
parent::OnBeforeClone($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('IsPrimary', 0);
@@ -115,7 +115,7 @@
{
parent::OnAfterItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->IsTempTable() ) {
@@ -135,7 +135,7 @@
*/
protected function OnCompileStylesheet($event)
{
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$object->SwitchToLive();
Index: units/spam_reports/spam_report_eh.php
===================================================================
--- units/spam_reports/spam_report_eh.php (revision 15137)
+++ units/spam_reports/spam_report_eh.php (working copy)
@@ -63,7 +63,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$item_prefix = $this->Application->GetVar('item_prefix');
@@ -88,7 +88,7 @@
{
parent::OnAfterItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$item_prefix = $object->GetDBField('ItemPrefix');
@@ -126,7 +126,7 @@
$temp_handlers = Array ();
$ids = $this->StoreSelectedIDs($event);
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
foreach ($ids as $id) {
Index: units/statistics/statistics_event_handler.php
===================================================================
--- units/statistics/statistics_event_handler.php (revision 15130)
+++ units/statistics/statistics_event_handler.php (working copy)
@@ -28,7 +28,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( $event->Special == 'summary' ) {
Index: units/stylesheets/stylesheets_event_handler.php
===================================================================
--- units/stylesheets/stylesheets_event_handler.php (revision 15130)
+++ units/stylesheets/stylesheets_event_handler.php (working copy)
@@ -25,7 +25,7 @@
*/
protected function OnCompileStylesheet($event)
{
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object StylesheetsItem */
$object->SwitchToLive();
Index: units/theme_files/theme_file_eh.php
===================================================================
--- units/theme_files/theme_file_eh.php (revision 15137)
+++ units/theme_files/theme_file_eh.php (working copy)
@@ -63,7 +63,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$filename = $this->_getTemplatePath($object);
@@ -87,7 +87,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$file_data = $object->GetDBField('FileContents');
@@ -109,7 +109,7 @@
{
parent::OnAfterItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$filename = $this->_getTemplatePath($object);
@@ -158,7 +158,7 @@
{
parent::OnNew($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$template_helper = $this->Application->recallObject('TemplateHelper');
@@ -179,7 +179,7 @@
*/
function OnSaveBlock($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
Index: units/themes/themes_eh.php
===================================================================
--- units/themes/themes_eh.php (revision 15137)
+++ units/themes/themes_eh.php (working copy)
@@ -174,7 +174,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( in_array($event->Special, Array ('enabled', 'selected', 'available')) || !$this->Application->isAdminUser ) {
Index: units/thesaurus/thesaurus_eh.php
===================================================================
--- units/thesaurus/thesaurus_eh.php (revision 15130)
+++ units/thesaurus/thesaurus_eh.php (working copy)
@@ -28,7 +28,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( !$this->Application->isAdminUser ) {
Index: units/translator/translator_event_handler.php
===================================================================
--- units/translator/translator_event_handler.php (revision 15137)
+++ units/translator/translator_event_handler.php (working copy)
@@ -85,7 +85,7 @@
$object = $this->Application->recallObject($obj_prefix);
/* @var $object kDBItem */
- $translator =& $event->getObject();
+ $translator = $event->getObject();
/* @var $translator kDBItem */
$def_lang = $this->Application->GetDefaultLanguageId();
@@ -139,7 +139,7 @@
*/
protected function OnPreSave(kEvent $event)
{
- $translator =& $event->getObject();
+ $translator = $event->getObject();
/* @var $translator kDBItem */
$field_values = $this->getSubmittedFields($event);
@@ -169,7 +169,7 @@
{
$event->CallSubEvent('OnPreSave');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('Language', $object->GetDBField('SwitchLanguage'));
Index: units/user_groups/user_groups_eh.php
===================================================================
--- units/user_groups/user_groups_eh.php (revision 15137)
+++ units/user_groups/user_groups_eh.php (working copy)
@@ -121,7 +121,7 @@
$ids = $event->getEventParam('ids');
if ( $ids ) {
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
if ( $event->Prefix == 'u-ug' ) {
// allow deleting non-primary group of current user ($ids - groups)
Index: units/users/users_event_handler.php
===================================================================
--- units/users/users_event_handler.php (revision 15137)
+++ units/users/users_event_handler.php (working copy)
@@ -85,7 +85,7 @@
{
parent::OnItemBuild($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $event->Special == 'forgot' || $object->getFormName() == 'registration' ) {
@@ -105,7 +105,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( $event->Special == 'regular' ) {
@@ -280,7 +280,7 @@
*/
protected function OnLogin($event)
{
- $object =& $event->getObject( Array ('form_name' => 'login') );
+ $object = $event->getObject( Array ('form_name' => 'login') );
/* @var $object kDBItem */
$field_values = $this->getSubmittedFields($event);
@@ -419,7 +419,7 @@
return ;
}
- $object =& $event->getObject( Array('form_name' => 'registration') );
+ $object = $event->getObject( Array('form_name' => 'registration') );
/* @var $object UsersItem */
$field_values = $this->getSubmittedFields($event);
@@ -492,7 +492,7 @@
*/
function autoLoginUser($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object UsersItem */
if ( $object->GetDBField('Status') == STATUS_ACTIVE ) {
@@ -524,7 +524,7 @@
$cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object UsersItem */
if ( !$object->isSubscriberOnly() ) {
@@ -593,7 +593,7 @@
*/
protected function assignToPrimaryGroup($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$primary_group_id = $object->GetDBField('PrimaryGroupId');
@@ -623,7 +623,7 @@
*/
protected function OnAfterItemValidate(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$resource_id = $object->GetDBField('ResourceId');
@@ -640,7 +640,7 @@
*/
function OnRecommend($event)
{
- $object =& $event->getObject( Array ('form_name' => 'recommend') );
+ $object = $event->getObject( Array ('form_name' => 'recommend') );
/* @var $object kDBItem */
$field_values = $this->getSubmittedFields($event);
@@ -678,7 +678,7 @@
*/
function OnUpdateAddress($event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -710,7 +710,7 @@
*/
function OnSubscribeQuery($event)
{
- $object =& $event->getObject( Array ('form_name' => 'subscription') );
+ $object = $event->getObject( Array ('form_name' => 'subscription') );
/* @var $object UsersItem */
$field_values = $this->getSubmittedFields($event);
@@ -743,7 +743,7 @@
*/
function OnSubscribeUser($event)
{
- $object =& $event->getObject( Array ('form_name' => 'subscription') );
+ $object = $event->getObject( Array ('form_name' => 'subscription') );
/* @var $object UsersItem */
$user_email = $this->Application->GetVar('subscriber_email');
@@ -844,7 +844,7 @@
*/
function OnForgotPassword($event)
{
- $object =& $event->getObject( Array ('form_name' => 'forgot_password') );
+ $object = $event->getObject( Array ('form_name' => 'forgot_password') );
/* @var $object kDBItem */
$field_values = $this->getSubmittedFields($event);
@@ -939,7 +939,7 @@
$cs_helper->CheckStateField($event, 'State', 'Country');
$cs_helper->PopulateStates($event, 'State', 'Country');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $event->Special == 'forgot' ) {
@@ -967,7 +967,7 @@
*/
function beforeItemChanged($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object UsersItem */
if ( !$this->Application->isAdmin && $object->getFormName() == 'registration' ) {
@@ -1003,7 +1003,7 @@
{
$event->SetRedirectParam('opener', 's');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object UsersItem */
$next_template = false;
@@ -1092,7 +1092,7 @@
$item_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
list($id, $field_values) = each($item_info);
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$object->setID($id);
@@ -1206,7 +1206,7 @@
}
if ( $user_id == USER_ROOT ) {
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object UsersItem */
// put salt to user's config
@@ -1243,7 +1243,7 @@
}
}
else {
- $object =& $event->getObject();
+ $object = $event->getObject();
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
if ( !$object->Update() ) {
@@ -1298,7 +1298,7 @@
*/
protected function checkItemStatus(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
@@ -1323,7 +1323,7 @@
$this->afterItemChanged($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object UsersItem */
if ( !$this->Application->isAdmin && ($event->Special != 'email-restore') ) {
@@ -1346,7 +1346,7 @@
{
$this->saveUserImages($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object UsersItem */
if ( $object->GetDBField('EmailPassword') && $object->GetDBField('Password_plain') ) {
@@ -1406,7 +1406,7 @@
$email_passwords = unserialize($email_passwords);
if ( isset($email_passwords[$temp_id]) ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SwitchToLive();
@@ -1487,7 +1487,7 @@
*/
protected function sendEmailChangeEvent(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object UsersItem */
$new_email = $object->GetDBField('Email');
@@ -1633,7 +1633,7 @@
{
parent::OnBeforeClone($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object UsersItem */
$object->generatePassword();
@@ -1720,7 +1720,7 @@
$image_helper = $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object UsersItem */
$image_helper->LoadItemImages($object);
@@ -1760,7 +1760,7 @@
$image_helper = $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// process image upload in virtual fields
@@ -1783,7 +1783,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$user_type = $this->Application->GetVar('user_type');
@@ -1810,7 +1810,7 @@
*/
function _makePasswordRequired($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$required_fields = Array ('Password', 'Password_plain', 'VerifyPassword', 'VerifyPassword_plain');
@@ -1831,7 +1831,7 @@
if ( $id < 0 ) {
// when root, guest and so on
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->Clear($id);
@@ -1882,7 +1882,7 @@
*/
function OnResetLostPassword($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$event->CallSubEvent('OnUpdate');
Index: units/visits/visits_event_handler.php
===================================================================
--- units/visits/visits_event_handler.php (revision 15130)
+++ units/visits/visits_event_handler.php (working copy)
@@ -49,7 +49,7 @@
return ;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->SetDBField('VisitDate_date', adodb_mktime());
@@ -75,7 +75,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$types = $event->getEventParam('types');
removing_references_in_event_getobject_modules.patch [^] (84,935 bytes) 2012-03-04 03:03
[Show Content]
Index: custom/units/sections/articles/e_article_eh.php
===================================================================
--- custom/units/sections/articles/e_article_eh.php (revision 15131)
+++ custom/units/sections/articles/e_article_eh.php (working copy)
@@ -81,7 +81,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
# identifying event based on special and setting filter
Index: custom/units/sections/categories/e_category_eh.php
===================================================================
--- custom/units/sections/categories/e_category_eh.php (revision 15131)
+++ custom/units/sections/categories/e_category_eh.php (working copy)
@@ -81,7 +81,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
# identifying event based on special and setting filter
Index: custom/units/sections/links/e_link_eh.php
===================================================================
--- custom/units/sections/links/e_link_eh.php (revision 15131)
+++ custom/units/sections/links/e_link_eh.php (working copy)
@@ -81,7 +81,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
# identifying event based on special and setting filter
Index: custom/units/sections/products/e_product_eh.php
===================================================================
--- custom/units/sections/products/e_product_eh.php (revision 15131)
+++ custom/units/sections/products/e_product_eh.php (working copy)
@@ -82,7 +82,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
# identifying event based on special and setting filter
Index: custom/units/sections/users/e_user_eh.php
===================================================================
--- custom/units/sections/users/e_user_eh.php (revision 15131)
+++ custom/units/sections/users/e_user_eh.php (working copy)
@@ -81,7 +81,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
# identifying event based on special and setting filter
Index: custom/units/widgets/widget_eh.php
===================================================================
--- custom/units/widgets/widget_eh.php (revision 15138)
+++ custom/units/widgets/widget_eh.php (working copy)
@@ -54,7 +54,7 @@
*/
function OnCustomEvent($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
}
@@ -71,7 +71,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
# identifying event based on special and setting filter
Index: in-auction/units/category_listing/category_listing_eh.php
===================================================================
--- in-auction/units/category_listing/category_listing_eh.php (revision 15139)
+++ in-auction/units/category_listing/category_listing_eh.php (working copy)
@@ -96,7 +96,7 @@
function OnCategoriesPreSave($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if ($items_info) {
@@ -173,7 +173,7 @@
function ValidateCategoryField($event, $field, $is_store = 0)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$category = $object->GetDBField($field);
if ($category == 0)
@@ -240,12 +240,12 @@
return;
}
- $Category =& $event->MasterEvent->getObject();
+ $Category = $event->MasterEvent->getObject();
/* @var $Category kDBItem */
$category_id = $Category->GetID();
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$schedule_id = $object->GetDBField('ScheduleId');
@@ -343,7 +343,7 @@
*/
function OnAfterProductValidate($event)
{
- $Product =& $event->MasterEvent->getObject();
+ $Product = $event->MasterEvent->getObject();
// Get Product's primary category
Index: in-auction/units/error_log/error_log_eh.php
===================================================================
--- in-auction/units/error_log/error_log_eh.php (revision 15139)
+++ in-auction/units/error_log/error_log_eh.php (working copy)
@@ -46,7 +46,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
switch ($event->Special) {
Index: in-auction/units/listing/listing_eh.php
===================================================================
--- in-auction/units/listing/listing_eh.php (revision 15139)
+++ in-auction/units/listing/listing_eh.php (working copy)
@@ -104,7 +104,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
switch ($event->Special) {
Index: in-auction/units/product_listing/product_listing_eh.php
===================================================================
--- in-auction/units/product_listing/product_listing_eh.php (revision 15139)
+++ in-auction/units/product_listing/product_listing_eh.php (working copy)
@@ -93,7 +93,7 @@
{
parent::OnItemBuild($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$Product = $this->Application->recallObject('p');
@@ -111,7 +111,7 @@
function OnProductsPreSave($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if ($items_info) {
@@ -197,7 +197,7 @@
function ValidateCategoryField($event, $field, $is_store = 0)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$category = $object->GetDBField($field);
if ($category == 0)
@@ -265,7 +265,7 @@
// get product's resource id
- $object =& $event->MasterEvent->getObject();
+ $object = $event->MasterEvent->getObject();
$resource_id = $object->GetDBField('ResourceId');
// get image ids
Index: in-auction/units/schedule/schedule_eh.php
===================================================================
--- in-auction/units/schedule/schedule_eh.php (revision 15132)
+++ in-auction/units/schedule/schedule_eh.php (working copy)
@@ -66,7 +66,7 @@
if (!$this->Application->isAdminUser) {
return;
}
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$this->StoreSelectedIDs($event);
$ids=$this->getSelectedIDs($event);
Index: in-auction/units/sections/ebay_eh.php
===================================================================
--- in-auction/units/sections/ebay_eh.php (revision 15139)
+++ in-auction/units/sections/ebay_eh.php (working copy)
@@ -151,7 +151,7 @@
*/
function OnAfterImageAdded($event)
{
- $image =& $event->MasterEvent->getObject();
+ $image = $event->MasterEvent->getObject();
$product_table = $this->Application->getUnitOption('p', 'TableName');
if ($image->IsTempTable()) {
@@ -260,7 +260,7 @@
*/
function OnBeforeProductItemCreate($event)
{
- $object =& $event->MasterEvent->getObject();
+ $object = $event->MasterEvent->getObject();
$product_type = $object->GetDBField('Type');
if ($product_type != PRODUCT_TYPE_TANGIBLE) {
return ;
@@ -1802,7 +1802,7 @@
// $OrderItem = $this->Application->recallObject('orditems.-item');
// $order_item_id = $OrderItem->GetID();
-// $Order =& $event->getObject();
+// $Order = $event->getObject();
// $Order->Clear();
// $order_id = $this->Application->GetVar('ord_id');
@@ -2235,7 +2235,7 @@
return;
}
- $order =& $event->MasterEvent->getObject();
+ $order = $event->MasterEvent->getObject();
/* @var $order OrdersItem */
$ord_id = (int)$order->GetID();
@@ -2420,7 +2420,7 @@
*/
function OnBeforeCompleteOrder($event)
{
- $order =& $event->MasterEvent->getObject();
+ $order = $event->MasterEvent->getObject();
/* @var $order OrdersItem */
$ord_id = (int)$order->GetID();
@@ -3270,7 +3270,7 @@
function OnConfigUpdate($event)
{
// save changes in ebay shipping options, made on config template
- // $object =& $event->getObject();
+ // $object = $event->getObject();
$this->SetNewToken('Production');
$this->SetNewToken('Sandbox');
$this->SetCallCounters();
Index: in-auction/units/shipping/shipping_eh.php
===================================================================
--- in-auction/units/shipping/shipping_eh.php (revision 15139)
+++ in-auction/units/shipping/shipping_eh.php (working copy)
@@ -48,7 +48,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( $event->Special == 'domestic' ) {
@@ -100,7 +100,7 @@
return;
}
- $Parent =& $event->MasterEvent->getObject();
+ $Parent = $event->MasterEvent->getObject();
$resource_id = $Parent->GetDBField('ResourceId');
$table_name = TABLE_PREFIX.'eBayShipping';
Index: in-bulletin/units/emoticons/emoticon_eh.php
===================================================================
--- in-bulletin/units/emoticons/emoticon_eh.php (revision 15133)
+++ in-bulletin/units/emoticons/emoticon_eh.php (working copy)
@@ -27,7 +27,7 @@
{
parent::OnAfterItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
$emoticon_file = $object->GetField('EmotionImage', 'full_path');
if ( $emoticon_file ) {
Index: in-bulletin/units/poll_comments/poll_comment_eh.php
===================================================================
--- in-bulletin/units/poll_comments/poll_comment_eh.php (revision 15140)
+++ in-bulletin/units/poll_comments/poll_comment_eh.php (working copy)
@@ -71,7 +71,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->addFilter('comment_status', '%1$s.Status = ' . STATUS_ACTIVE);
@@ -87,7 +87,7 @@
protected function OnBeforeItemCreate(kEvent $event)
{
if ( !$this->Application->isAdmin ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_info = $object->getLinkedInfo($event->Special);
@@ -149,7 +149,7 @@
$spam_helper = $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$comment_settings = 'poll_CommentDelay_Value:poll_CommentDelay_Interval';
Index: in-bulletin/units/polls/poll_eh.php
===================================================================
--- in-bulletin/units/polls/poll_eh.php (revision 15133)
+++ in-bulletin/units/polls/poll_eh.php (working copy)
@@ -52,7 +52,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->addFilter('poll_range_filter', '(%1$s.StartDate <= ' . adodb_mktime() . ') AND (%1$s.EndDate >= ' . adodb_mktime() . ' OR EndDate IS NULL)');
@@ -66,7 +66,7 @@
*/
function OnResetVotes($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'DELETE FROM '.TABLE_PREFIX.'PollsStatistics
@@ -93,7 +93,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('ResourceId', $this->Application->NextResourceId());
@@ -106,7 +106,7 @@
*/
function OnMakeVote($event)
{
- $object =& $event->getObject($this->Application->GetVar('poll_id'));
+ $object = $event->getObject($this->Application->GetVar('poll_id'));
/* @var $object kDBItem */
$poll_answer_id = $this->Application->GetVar('option_id');
@@ -161,7 +161,7 @@
{
parent::OnAfterItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'DELETE FROM ' . TABLE_PREFIX . 'PollsStatistics
Index: in-bulletin/units/posts/post_eh.php
===================================================================
--- in-bulletin/units/posts/post_eh.php (revision 15140)
+++ in-bulletin/units/posts/post_eh.php (working copy)
@@ -45,7 +45,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$user_id = $this->Application->RecallVar('user_id');
@@ -91,7 +91,7 @@
*/
function checkPostPermission($event, $permissions)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'SELECT ci.CategoryId, p.CreatedById
@@ -122,7 +122,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$perm_status = $this->checkPostPermission($event, 'TOPIC.REPLY.MODIFY|TOPIC.REPLY.OWNER.MODIFY');
@@ -168,7 +168,7 @@
{
parent::OnBeforeItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$this->checkPostPermission($event, 'TOPIC.REPLY.OWNER.DELETE|TOPIC.REPLY.DELETE') ) {
@@ -187,7 +187,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$post_helper = $this->Application->recallObject('PostHelper');
@@ -213,7 +213,7 @@
{
parent::OnAfterItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_prefix = $this->Application->getUnitOption($event->Prefix, 'ParentPrefix');
@@ -274,7 +274,7 @@
*/
function updateTopicInfo($event, &$main_object)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$main_object->SetDBField('Modified_date', $object->GetDBField('Modified'));
@@ -334,7 +334,7 @@
{
parent::OnAfterItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$topic_id = $object->GetDBField('TopicId');
@@ -427,7 +427,7 @@
$reply_to = $this->Application->GetVar('reply_to');
if ( $reply_to > 0 ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$source_post = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
Index: in-bulletin/units/private_message_body/private_message_body_eh.php
===================================================================
--- in-bulletin/units/private_message_body/private_message_body_eh.php (revision 15140)
+++ in-bulletin/units/private_message_body/private_message_body_eh.php (working copy)
@@ -27,7 +27,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// set post options
@@ -54,7 +54,7 @@
{
parent::OnBeforeItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('ReferenceCount') > 0 ) {
Index: in-bulletin/units/private_messages/private_message_eh.php
===================================================================
--- in-bulletin/units/private_messages/private_message_eh.php (revision 15140)
+++ in-bulletin/units/private_messages/private_message_eh.php (working copy)
@@ -55,7 +55,7 @@
$this->Application->SetVar('folder_id', $folder_id);
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$user_id = $this->Application->RecallVar('user_id');
@@ -81,7 +81,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('FolderId') != PM_FOLDER_SENT ) {
@@ -106,7 +106,7 @@
{
parent::OnAfterItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->Application->EmailEventUser('PM.ADD', $object->GetDBField('ToId'));
@@ -149,7 +149,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$post_helper = $this->Application->recallObject('PostHelper');
@@ -192,7 +192,7 @@
{
parent::OnBeforeItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$user_id = $this->Application->RecallVar('user_id');
@@ -214,7 +214,7 @@
{
parent::OnAfterItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$body_idfield = $this->Application->getUnitOption($event->Prefix . '-body', 'IDField');
@@ -253,7 +253,7 @@
*/
protected function checkItemStatus(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
@@ -278,7 +278,7 @@
$reply_to = $this->Application->GetVar('reply_to');
$user_id = $this->Application->GetVar('user_id');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $reply_to > 0 ) {
Index: in-bulletin/units/topics/topics_event_handler.php
===================================================================
--- in-bulletin/units/topics/topics_event_handler.php (revision 15140)
+++ in-bulletin/units/topics/topics_event_handler.php (working copy)
@@ -26,7 +26,7 @@
public function CheckPermission(kEvent $event)
{
if ( $event->Name == 'OnTopicLockToggle' ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
if ( !$object->isLoaded() ) {
@@ -54,7 +54,7 @@
*/
function OnToggleLock($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$new_type = $object->GetDBField('TopicType') ? 0 : 1;
@@ -89,7 +89,7 @@
$this->cacheItemOwner($event, 'OwnerId', 'PostedBy');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
if ( !$object->GetDBField('TodayDate') ) {
@@ -118,7 +118,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$post = $this->Application->recallObject($event->Prefix . '-post', null, Array ('skip_autoload' => true));
@@ -152,7 +152,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
if ( $object->GetDBField('Posts') == 1 ) {
@@ -179,7 +179,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
if ( $object->GetDBField('Posts') > 0 || !$this->Application->isAdminUser ) {
@@ -194,7 +194,7 @@
*/
function OnTopicLockToggle($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kCatDBItem */
$topic_type = $object->GetDBField('TopicType');
Index: in-commerce/units/addresses/addresses_event_handler.php
===================================================================
--- in-commerce/units/addresses/addresses_event_handler.php (revision 15141)
+++ in-commerce/units/addresses/addresses_event_handler.php (working copy)
@@ -64,7 +64,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$user_id = $this->Application->RecallVar('user_id');
@@ -99,7 +99,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() || !$this->checkItemStatus($event) ) {
@@ -193,7 +193,7 @@
*/
protected function OnUpdateProfileAddress(kEvent $event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
if ( !$this->Application->isAdmin ) {
@@ -268,7 +268,7 @@
*/
protected function OnUpdateUserProfile(kEvent $event)
{
- $user =& $event->MasterEvent->getObject();
+ $user = $event->MasterEvent->getObject();
/* @var $user UsersItem */
$load_keys = Array ('PortalUserId' => $user->GetID(), 'IsProfileAddress' => 1);
@@ -338,7 +338,7 @@
return false;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
@@ -366,7 +366,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$this->Application->isAdmin ) {
@@ -395,7 +395,7 @@
{
parent::OnBeforeItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() || !$this->checkItemStatus($event) ) {
Index: in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php
===================================================================
--- in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php (revision 15134)
+++ in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php (working copy)
@@ -28,7 +28,7 @@
parent::SetCustomQuery($event);
if ( !$this->Application->isAdmin ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->addFilter('active', '%1$s.Status = ' . STATUS_ACTIVE);
@@ -42,7 +42,7 @@
*/
function OnSetPrimary($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('IsPrimary', 1);
@@ -85,7 +85,7 @@
*/
function itemChanged($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('IsPrimary') && $object->Validate() ) {
Index: in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php
===================================================================
--- in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php (revision 15141)
+++ in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php (working copy)
@@ -64,7 +64,7 @@
$affiliate = $this->Application->recallObject('affil');
/* @var $affiliate kDBItem */
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->SetDBField('Amount', $affiliate->GetDBField('AmountToPay'));
@@ -82,7 +82,7 @@
{
parent::OnAfterItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_info = $object->getLinkedInfo();
@@ -113,7 +113,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( $event->Special == 'log' ) {
Index: in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php
===================================================================
--- in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php (revision 15134)
+++ in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php (working copy)
@@ -28,7 +28,7 @@
parent::SetCustomQuery($event);
if ( $event->Special == 'active' ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->addFilter('active', '%1$s.Enabled = 1');
@@ -42,7 +42,7 @@
*/
function OnSetPrimary($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$object->SetDBField('IsPrimary', 1);
$object->Update();
}
@@ -82,7 +82,7 @@
*/
function itemChanged($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$live_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
Index: in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php
===================================================================
--- in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (revision 15141)
+++ in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php (working copy)
@@ -94,7 +94,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$linked_info = $object->getLinkedInfo();
Index: in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php
===================================================================
--- in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (revision 15141)
+++ in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php (working copy)
@@ -37,7 +37,7 @@
*/
function OnEntireOrder($event)
{
- $object =& $event->GetObject();
+ $object = $event->getObject();
$sql = 'DELETE FROM '.$object->TableName.' WHERE AffiliatePlanId='.$this->Application->GetVar('ap_id');
$this->Conn->Query($sql);
@@ -64,7 +64,7 @@
*/
function OnDeleteDiscountedItem($event)
{
- $main_object =& $event->MasterEvent->getObject();
+ $main_object = $event->MasterEvent->getObject();
$resource_id = $main_object->GetDBField('ResourceId');
$table = $this->Application->getUnitOption($event->Prefix,'TableName');
Index: in-commerce/units/affiliates/affiliates_event_handler.php
===================================================================
--- in-commerce/units/affiliates/affiliates_event_handler.php (revision 15141)
+++ in-commerce/units/affiliates/affiliates_event_handler.php (working copy)
@@ -121,7 +121,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('AffiliateCode', $this->generateAffiliateCode($event));
@@ -147,7 +147,7 @@
parent::OnBeforeItemUpdate($event);
if ( !$this->Application->isAdmin ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('PortalUserId', $object->GetOriginalField('PortalUserId'));
@@ -233,7 +233,7 @@
return false;
}
- $object =& $event->getObject(Array ('ship_autoload' => true));
+ $object = $event->getObject(Array ('ship_autoload' => true));
/* @var $object kDBItem */
if ( $object->Load($affiliate_id) ) {
@@ -309,7 +309,7 @@
return;
}
- $object =& $event->getObject( Array('form_name' => 'registration', 'skip_autoload' => true) );
+ $object = $event->getObject( Array('form_name' => 'registration', 'skip_autoload' => true) );
/* @var $object kDBItem */
$field_values = $this->getSubmittedFields($event);
@@ -317,7 +317,7 @@
$object->setID(0);
if ( !$object->Validate() ) {
- $user =& $event->MasterEvent->getObject();
+ $user = $event->MasterEvent->getObject();
/* @var $user kDBItem */
$user->Validate();
@@ -337,10 +337,10 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
- $user =& $event->MasterEvent->getObject();
+ $user = $event->MasterEvent->getObject();
/* @var $user UsersItem */
$object->SetDBField('PortalUserId', $user->GetID());
@@ -373,7 +373,7 @@
*/
function OnBecomeAffiliate($event)
{
- $object =& $event->getObject( Array('form_name' => 'registration', 'skip_autoload' => true) );
+ $object = $event->getObject( Array('form_name' => 'registration', 'skip_autoload' => true) );
/* @var $object UsersItem */
$event->CallSubEvent('OnCreate');
@@ -401,7 +401,7 @@
$event->CallSubEvent('OnUpdate');
if ( $event->status == kEvent::erSUCCESS ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->Application->EmailEventUser('AFFILIATE.PAYMENT.TYPE.CHANGED', $object->GetDBField('PortalUserId'));
@@ -452,7 +452,7 @@
$this->Application->EmailEventAdmin('AFFILIATE.PAYMENT');
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$passed_id = $event->getEventParam('id');
@@ -585,7 +585,7 @@
return;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$ids = $this->StoreSelectedIDs($event);
@@ -651,7 +651,7 @@
return true;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
Index: in-commerce/units/brackets/brackets_event_handler.php
===================================================================
--- in-commerce/units/brackets/brackets_event_handler.php (revision 15141)
+++ in-commerce/units/brackets/brackets_event_handler.php (working copy)
@@ -187,7 +187,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$linked_info = $object->getLinkedInfo();
Index: in-commerce/units/coupon_items/coupon_items_event_handler.php
===================================================================
--- in-commerce/units/coupon_items/coupon_items_event_handler.php (revision 15141)
+++ in-commerce/units/coupon_items/coupon_items_event_handler.php (working copy)
@@ -54,7 +54,7 @@
*/
function OnEntireOrder($event)
{
- $object =& $event->GetObject();
+ $object = $event->getObject();
$sql = 'DELETE FROM '.$object->TableName.' WHERE CouponId='.$this->Application->GetVar('coup_id');
$this->Conn->Query($sql);
@@ -81,7 +81,7 @@
*/
function OnDeleteCouponItem($event)
{
- $main_object =& $event->MasterEvent->getObject();
+ $main_object = $event->MasterEvent->getObject();
$resource_id = $main_object->GetDBField('ResourceId');
$table = $this->Application->getUnitOption($event->Prefix,'TableName');
Index: in-commerce/units/coupons/coupons_event_handler.php
===================================================================
--- in-commerce/units/coupons/coupons_event_handler.php (revision 15141)
+++ in-commerce/units/coupons/coupons_event_handler.php (working copy)
@@ -46,7 +46,7 @@
$event->CallSubEvent('OnNew');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->setCloningRequired($object);
@@ -75,7 +75,7 @@
{
parent::OnBeforeClone($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->SetNewCode($object);
@@ -96,7 +96,7 @@
return;
}
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$this->setCloningRequired($object);
@@ -178,7 +178,7 @@
{
parent::OnPreCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$exp_date = adodb_mktime();
@@ -226,7 +226,7 @@
*/
function itemChanged($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('Amount', abs($object->GetDBField('Amount')));
Index: in-commerce/units/currencies/currencies_event_handler.php
===================================================================
--- in-commerce/units/currencies/currencies_event_handler.php (revision 15141)
+++ in-commerce/units/currencies/currencies_event_handler.php (working copy)
@@ -72,7 +72,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('IsPrimary', 1);
@@ -90,7 +90,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('IsPrimary') && $object->Validate() ) {
@@ -124,7 +124,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( $event->Special == 'active' ) {
@@ -208,7 +208,7 @@
$rates->GetRatesData();
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$iso = $object->GetDBField('ISO');
@@ -241,7 +241,7 @@
$event->setEventParam('ids', $ids);
$ids = $event->getEventParam('ids');
- $object =& $event->getObject();
+ $object = $event->getObject();
if(is_array($ids) && $ids[0])
{
$sql = 'SELECT ISO FROM '.$object->TableName.' WHERE CurrencyId IN ('.implode(',', $ids).')';
Index: in-commerce/units/destinations/dst_event_handler.php
===================================================================
--- in-commerce/units/destinations/dst_event_handler.php (revision 15141)
+++ in-commerce/units/destinations/dst_event_handler.php (working copy)
@@ -24,7 +24,7 @@
*/
protected function OnCreate(kEvent $event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
// creates multiple db records from single request (OnCreate event only creates 1 record)
@@ -65,7 +65,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$events = $this->Application->GetVar('events');
@@ -89,7 +89,7 @@
*/
function OnZoneUpdate($event) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$zone_object = &$this->Application->recallObject('z');
Index: in-commerce/units/discount_items/discount_items_event_handler.php
===================================================================
--- in-commerce/units/discount_items/discount_items_event_handler.php (revision 15134)
+++ in-commerce/units/discount_items/discount_items_event_handler.php (working copy)
@@ -40,7 +40,7 @@
*/
function OnProcessSelected($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$selected_ids = $this->Application->GetVar('selected_ids');
if ($selected_ids['c'] == $this->Application->GetVar('m_cat_id')) {
@@ -104,7 +104,7 @@
*/
function OnEntireOrder($event)
{
- $object =& $event->GetObject();
+ $object = $event->getObject();
$sql = 'DELETE FROM '.$object->TableName.' WHERE DiscountId='.$this->Application->GetVar('d_id');
$this->Conn->Query($sql);
@@ -131,7 +131,7 @@
*/
function OnDeleteDiscountedItem($event)
{
- $main_object =& $event->MasterEvent->getObject();
+ $main_object = $event->MasterEvent->getObject();
$resource_id = $main_object->GetDBField('ResourceId');
$table = $this->Application->getUnitOption($event->Prefix,'TableName');
Index: in-commerce/units/discounts/discounts_event_handler.php
===================================================================
--- in-commerce/units/discounts/discounts_event_handler.php (revision 15134)
+++ in-commerce/units/discounts/discounts_event_handler.php (working copy)
@@ -50,7 +50,7 @@
*/
function itemChanged($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('Amount', abs($object->GetDBField('Amount')));
Index: in-commerce/units/files/files_event_handler.php
===================================================================
--- in-commerce/units/files/files_event_handler.php (revision 15134)
+++ in-commerce/units/files/files_event_handler.php (working copy)
@@ -43,7 +43,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
switch ($event->Special) {
@@ -80,7 +80,7 @@
$this->itemChanged($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_info = $object->getLinkedInfo($event->Special);
@@ -105,7 +105,7 @@
*/
function itemChanged($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('IsPrimary') ) {
@@ -134,7 +134,7 @@
$ids = $this->StoreSelectedIDs($event);
$id = array_shift($ids);
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$object->Load($id);
@@ -156,7 +156,7 @@
if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
$ids = $event->getEventParam('ids');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$parent_info = $object->getLinkedInfo($event->Special);
Index: in-commerce/units/gift_certificates/gift_certificates_eh.php
===================================================================
--- in-commerce/units/gift_certificates/gift_certificates_eh.php (revision 15141)
+++ in-commerce/units/gift_certificates/gift_certificates_eh.php (working copy)
@@ -46,7 +46,7 @@
{
parent::OnPreCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$exp_date = adodb_mktime();
@@ -85,7 +85,7 @@
$this->itemChanged($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('Debit', $object->GetDBField('Amount'));
@@ -98,7 +98,7 @@
*/
function itemChanged($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$amount = abs($object->GetDBField('Amount'));
@@ -151,7 +151,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// get object id by unique field Code
@@ -175,7 +175,7 @@
return ;
}
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
foreach ($ids as $id) {
Index: in-commerce/units/manufacturers/manufacturers_event_handler.php
===================================================================
--- in-commerce/units/manufacturers/manufacturers_event_handler.php (revision 15141)
+++ in-commerce/units/manufacturers/manufacturers_event_handler.php (working copy)
@@ -76,7 +76,7 @@
$manufacturers = $this->Conn->GetCol($sql);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->addFilter('category_manufacturer_filter', $manufacturers ? '%1$s.ManufacturerId IN (' . implode(',', $manufacturers) . ')' : 'FALSE');
Index: in-commerce/units/order_items/order_items_event_handler.php
===================================================================
--- in-commerce/units/order_items/order_items_event_handler.php (revision 15141)
+++ in-commerce/units/order_items/order_items_event_handler.php (working copy)
@@ -41,7 +41,7 @@
*/
function OnProcessSelected($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$selected_ids = $this->Application->GetVar('selected_ids');
$product_ids = $selected_ids['p'];
@@ -101,7 +101,7 @@
return;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$table_info = $object->getLinkedInfo();
@@ -168,7 +168,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$changed_fields = $object->GetChangedFields();
@@ -300,7 +300,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$item_info = $object->GetDBField('ItemData');
@@ -324,7 +324,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$package_num = $event->getEventParam('package_num');
@@ -351,7 +351,7 @@
return true;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
Index: in-commerce/units/orders/orders_event_handler.php
===================================================================
--- in-commerce/units/orders/orders_event_handler.php (revision 15141)
+++ in-commerce/units/orders/orders_event_handler.php (working copy)
@@ -178,7 +178,7 @@
function OnQuietPreSave($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->IgnoreValidation = true;
@@ -197,7 +197,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$shipping_address_id = $this->Application->GetVar('shipping_address_id');
@@ -322,7 +322,7 @@
$this->Conn->doUpdate($fields_hash, $table_name, $id_field . ' = ' . $order_id);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// set user id to object, since it will be used during order update from OnRecalculateItems event
@@ -441,7 +441,7 @@
$this->ReserveItems($event);
- $order =& $event->getObject();
+ $order = $event->getObject();
/* @var $order OrdersItem */
$charge_result = $this->ChargeOrder($order);
@@ -528,7 +528,7 @@
*/
function setBillingAddress($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
if ( $object->HasTangibleItems() ) {
@@ -591,7 +591,7 @@
{
$this->OnUpdateCart($event);
if ( !$event->getEventParam('RecalculateChangedCart') ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
if ( !$object->HasTangibleItems() ) {
@@ -669,7 +669,7 @@
if ( $items_info ) {
list($id, $field_values) = each($items_info);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$payment_type_id = $object->GetDBField('PaymentType');
@@ -697,7 +697,7 @@
*/
protected function OnCancelRecurring($event)
{
- $order =& $event->getObject();
+ $order = $event->getObject();
/* @var $order OrdersItem */
$order->SetDBField('IsRecurringBilling', 0);
@@ -719,7 +719,7 @@
{
parent::OnAfterItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$cvv2 = $object->GetDBField('PaymentCVV2');
@@ -755,7 +755,7 @@
}
else {
// strange: recalculate total amount on error
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$object->SetDBField('TotalAmount', $object->getTotalAmount());
@@ -773,7 +773,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$addr_list = $this->Application->recallObject('addr', 'addr_List', Array ('per_page' => -1, 'skip_counting' => true));
@@ -840,7 +840,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// 1. delete given order item by id
@@ -1046,7 +1046,7 @@
$table['p'] = $this->Application->getUnitOption('p', 'TableName');
$table['oi'] = $this->TablePrefix($event).'OrderItems';
- $object =& $event->getObject();
+ $object = $event->getObject();
$ord_id = $object->GetID();
// 2.3. check if some amount of same combination & product are not already in shopping cart
@@ -1175,7 +1175,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$coupon = $this->Application->recallObject('coup', null, Array ('skip_autoload' => true));
@@ -1240,7 +1240,7 @@
*/
function OnRemoveCoupon($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$this->RemoveCoupon($object);
@@ -1325,7 +1325,7 @@
function OnCleanupCart($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$sql = 'DELETE FROM '.TABLE_PREFIX.'OrderItems
WHERE OrderId = '.$this->getPassedID($event);
@@ -1400,7 +1400,7 @@
// if we already know, that there is no such order,
// then don't run database query, that will confirm that
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->Clear($id);
@@ -1417,7 +1417,7 @@
*/
function _createNewCart($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$this->setNextOrderNumber($event);
@@ -1511,7 +1511,7 @@
*/
function SetStepRequiredFields($event)
{
- $order =& $event->getObject();
+ $order = $event->getObject();
/* @var $order OrdersItem */
$cs_helper = $this->Application->recallObject('CountryStatesHelper');
@@ -1574,7 +1574,7 @@
return;
}
- $order =& $event->getObject();
+ $order = $event->getObject();
/* @var $order OrdersItem */
$ses_user = $this->Application->RecallVar('user_id');
@@ -1604,7 +1604,7 @@
{
parent::OnPreCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->setNextOrderNumber($event);
@@ -1626,7 +1626,7 @@
{
parent::OnBeforeClone($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
if ( substr($event->Special, 0, 9) == 'recurring' ) {
@@ -1728,7 +1728,7 @@
$from_tab = substr($event->Name, strlen('OnResetTo'));
// load values from db
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// update values from submit
@@ -1766,7 +1766,7 @@
function OnMassPlaceOrder($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$ids = $this->StoreSelectedIDs($event);
if($ids)
@@ -2242,7 +2242,7 @@
*/
function setNextOrderNumber($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$sql = 'SELECT MAX(Number)
@@ -2323,7 +2323,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// get user fields
@@ -2389,7 +2389,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$old_payment_type = $object->GetOriginalField('PaymentType');
@@ -2471,7 +2471,7 @@
*/
protected function createAccountFromOrder($event)
{
- $order =& $event->getObject();
+ $order = $event->getObject();
/* @var $order OrdersItem */
$order_helper = $this->Application->recallObject('OrderHelper');
@@ -2509,7 +2509,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$types = $event->getEventParam('types');
@@ -2601,7 +2601,7 @@
function DoPlaceOrder($event)
{
- $order =& $event->getObject();
+ $order = $event->getObject();
$table_prefix = $this->TablePrefix($event);
@@ -2617,7 +2617,7 @@
function &queryOrderItems($event, $table_prefix)
{
- $order =& $event->getObject();
+ $order = $event->getObject();
$ord_id = $order->GetId();
// TABLE_PREFIX and $table_prefix are NOT the same !!!
@@ -3062,7 +3062,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$shipping_total = $insurance_fee = 0;
@@ -3098,7 +3098,7 @@
return ;
}
- $order =& $event->getObject();
+ $order = $event->getObject();
/* @var $order OrdersItem */
if ( !$order->isLoaded() ) {
@@ -3193,7 +3193,7 @@
function UpdateShippingOption($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$shipping_option = $object->GetDBField('ShippingOption');
if($shipping_option == '') return;
@@ -3224,7 +3224,7 @@
*/
function UpdateShippingTypes($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$ord_id = $object->GetID();
@@ -3306,7 +3306,7 @@
function RecalculateTax($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) {
@@ -3318,7 +3318,7 @@
function RecalculateProcessingFee($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
// Do not reset processing fee while orders are being split (see SplitOrder)
if (preg_match("/^-sub/", $object->Special)) return;
@@ -3332,7 +3332,7 @@
function UpdateTotals($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$object->UpdateTotals();
@@ -3340,7 +3340,7 @@
/*function CalculateDiscount($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$coupon = $this->Application->recallObject('coup', null, Array('skip_autoload' => true));
if(!$coupon->Load( $object->GetDBField('CouponId'), 'CouponId' ))
@@ -3425,7 +3425,7 @@
*/
function OnResetToPending($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -3455,7 +3455,7 @@
function OnLoadSelected($event)
{
$event->setPseudoClass('_List');
- $object =& $event->getObject( Array('selected_only' => true) );
+ $object = $event->getObject( Array('selected_only' => true) );
$event->redirect = false;
}
@@ -3807,7 +3807,7 @@
return true;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
@@ -3831,7 +3831,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$gift_certificate = $this->Application->recallObject('gc', null, Array ('skip_autoload' => true));
@@ -3872,7 +3872,7 @@
*/
function OnRemoveGiftCertificate($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
$this->RemoveGiftCertificate($object);
@@ -3888,7 +3888,7 @@
function RecalculateGift($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object OrdersItem */
if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) {
@@ -3920,7 +3920,7 @@
ini_set('memory_limit', '300M');
ini_set('max_execution_time', '0');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$file = $object->GetDBField('ShippingTracking') . '.pdf';
@@ -3948,7 +3948,7 @@
$create_account = $this->Application->GetVar('create_account');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$required_fields = Array ('UserPassword', 'UserPassword_plain', 'VerifyUserPassword', 'VerifyUserPassword_plain');
Index: in-commerce/units/payment_type/payment_type_event_handler.php
===================================================================
--- in-commerce/units/payment_type/payment_type_event_handler.php (revision 15141)
+++ in-commerce/units/payment_type/payment_type_event_handler.php (working copy)
@@ -61,7 +61,7 @@
*/
function OnSetPrimary($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$this->StoreSelectedIDs($event);
$ids=$this->getSelectedIDs($event);
if($ids)
@@ -77,7 +77,7 @@
function OnMassDecline($event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$this->StoreSelectedIDs($event);
@@ -117,7 +117,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$status_field = array_shift( $this->Application->getUnitOption($event->Prefix, 'StatusField') );
@@ -154,7 +154,7 @@
protected function customProcessing(kEvent $event, $type)
{
if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$ids_ok = Array ();
@@ -215,7 +215,7 @@
*/
function convertGroups($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$selected_groups = $object->GetDBField('PortalGroups');
if ($selected_groups) {
@@ -267,7 +267,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( in_array($event->Special, Array ('enabled', 'selected', 'available')) || !$this->Application->isAdminUser ) {
Index: in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php
===================================================================
--- in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php (revision 15134)
+++ in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php (working copy)
@@ -30,7 +30,7 @@
return;
}
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$pt_id = $this->Application->GetVar('pt_id');
Index: in-commerce/units/pricing/pricing_event_handler.php
===================================================================
--- in-commerce/units/pricing/pricing_event_handler.php (revision 15141)
+++ in-commerce/units/pricing/pricing_event_handler.php (working copy)
@@ -65,7 +65,7 @@
$event->redirect=false;
$temp = $this->Application->GetVar($event->getPrefixSpecial(true));
-// $object =& $event->GetObject();
+// $object = $event->getObject();
// $formatter = $this->Application->recallObject('kFormatter');
// $temp = $formatter->TypeCastArray($temp, $object);
@@ -188,7 +188,7 @@
{
if( $this->Application->GetVar('pr_tang') ) {
- $object =& $event->GetObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$product_id = $this->Application->GetVar('p_id');
@@ -252,7 +252,7 @@
*/
protected function customProcessing(kEvent $event, $type)
{
- $bracket =& $event->getObject();
+ $bracket = $event->getObject();
/* @var $bracket kDBItem */
switch ($type) {
@@ -377,7 +377,7 @@
*/
function OnSetPrimary($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$this->StoreSelectedIDs($event);
$ids=$this->getSelectedIDs($event);
if($ids)
@@ -402,7 +402,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('IsPrimary') == 1 ) {
@@ -425,7 +425,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$table_info = $object->getLinkedInfo($event->Special);
@@ -460,7 +460,7 @@
*/
protected function SetCustomQuery(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( $this->Application->isAdminUser ) {
Index: in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php
===================================================================
--- in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (revision 15141)
+++ in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (working copy)
@@ -32,7 +32,7 @@
switch ($event->Name) {
case 'OnCreate':
case 'OnUpdate':
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$options = unserialize($object->GetDBField('Combination'));
@@ -42,7 +42,7 @@
case 'OnMassDelete':
// delete only option combinations that has no associated inventory
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$ids = $event->getEventParam('ids');
@@ -63,7 +63,7 @@
*/
function GetOptionValues($event, $option_id)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
if ($object->IsTempTable()) {
$table = $this->Application->GetTempName(TABLE_PREFIX.'ProductOptions', 'prefix:'.$event->Prefix);
}
@@ -92,7 +92,7 @@
}
if (!$recursed) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$salt = $fields['Combination'];
@@ -135,7 +135,7 @@
}
if (!$recursed) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$edit_id = $object->GetId();
@@ -166,7 +166,7 @@
*/
protected function OnCreate(kEvent $event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -198,7 +198,7 @@
*/
protected function OnUpdate(kEvent $event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
@@ -243,7 +243,7 @@
*/
protected function OnItemBuild(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->dbBuild($object, $event);
@@ -276,7 +276,7 @@
*/
protected function LoadItem(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$id = $this->getPassedID($event);
@@ -331,7 +331,7 @@
$event->Init($event->Prefix, '-item');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$options_mapping = $this->Application->GetVar('poc_mapping');
Index: in-commerce/units/product_options/product_options_event_handler.php
===================================================================
--- in-commerce/units/product_options/product_options_event_handler.php (revision 15134)
+++ in-commerce/units/product_options/product_options_event_handler.php (working copy)
@@ -30,7 +30,7 @@
$selectable_only = $event->getEventParam('selectable_only');
if ( $selectable_only ) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->addFilter('types_filter', 'OptionType IN (1,3,6)');
Index: in-commerce/units/products/products_event_handler.php
===================================================================
--- in-commerce/units/products/products_event_handler.php (revision 15141)
+++ in-commerce/units/products/products_event_handler.php (working copy)
@@ -80,7 +80,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$product_approve_events = Array (
@@ -107,7 +107,7 @@
*/
function InventoryAction($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$field_values = $this->getSubmittedFields($event);
@@ -386,7 +386,7 @@
{
parent::onPreCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('Type', $this->Application->GetVar($event->getPrefixSpecial(true) . '_new_type'));
@@ -406,7 +406,7 @@
$event->CallSubEvent('OnPreSave');
$this->LoadItem($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$from_type = $object->GetDBField('Type');
@@ -502,7 +502,7 @@
$except_types = $event->getEventParam('except');
$except_types = $except_types ? explode(',', $except_types) : Array ();
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$type_clauses = parent::getTypeClauses($event);
@@ -683,7 +683,7 @@
$event->SetRedirectParam('pass', 'all,p');
$event->redirect = $this->Application->GetVar('success_template');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$user_id = $this->Application->RecallVar('user_id');
@@ -799,7 +799,7 @@
*/
function OnSaveVirtualProduct($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$listing_type = $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
$listing_type->Load($event->MasterEvent->getEventParam('id'));
@@ -863,7 +863,7 @@
*/
function OnDeleteListingType($event)
{
- $listing_type =& $event->MasterEvent->getObject();
+ $listing_type = $event->MasterEvent->getObject();
/* @var $listing_type kDBItem */
$product_id = $listing_type->GetDBField('VirtualProductId');
@@ -1028,7 +1028,7 @@
*/
function _updateProductPrice($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$price = $object->GetDBField('Price');
@@ -1044,7 +1044,7 @@
function CheckRequiredOptions($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
if ($object->GetDBField('ProductId') == '') return ; // if product does not have ID - it's not yet created
$opt_object = $this->Application->recallObject('po', null, Array('skip_autoload' => true) );
$has_required = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$opt_object->TableName.' WHERE Required = 1 AND ProductId = '.$object->GetDBField('ProductId'));
@@ -1134,7 +1134,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object ProductsItem */
$a_pricing = $object->getPrimaryPricing();
@@ -1169,7 +1169,7 @@
}
elseif ($dst_field == 'AssignedCoupon') {
$coupon_id = $this->Application->GetVar('selected_ids');
- $object =& $event->getObject();
+ $object = $event->getObject();
$object->SetDBField('AssignedCoupon', $coupon_id);
$this->RemoveRequiredFields($object);
$object->Update();
@@ -1191,7 +1191,7 @@
// update current package content with selected products
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object ProductsItem */
$product_ids = $selected_ids['p'] ? explode(',', $selected_ids['p']) : Array();
@@ -1221,7 +1221,7 @@
{
//$this->Application->SetVar('p_mode', 't');
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object ProductsItem */
$content_ids = $object->GetPackageContentIds();
@@ -1287,7 +1287,7 @@
$this->Application->SetVar('p_mode', 't');
- $object =& $event->getObject();
+ $object = $event->getObject();
$items_info = $this->Application->GetVar('p_content');
@@ -1322,7 +1322,7 @@
{
parent::OnBeforeItemDelete($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'SELECT COUNT(*)
@@ -1363,7 +1363,7 @@
{
parent::setCustomExportColumns($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->setPrimaryPrice($object->GetID(), (double)$object->GetDBField('Price'), Array ('Cost' => (double)$object->GetDBField('Cost')));
@@ -1371,7 +1371,7 @@
function OnPreSaveAndOpenPopup($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$this->RemoveRequiredFields($object);
Index: in-commerce/units/reports/reports_event_handler.php
===================================================================
--- in-commerce/units/reports/reports_event_handler.php (revision 15141)
+++ in-commerce/units/reports/reports_event_handler.php (working copy)
@@ -48,7 +48,7 @@
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info) $field_values = array_shift($items_info);
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$object->UpdateFormattersMasterFields();
Index: in-commerce/units/shipping/shipping_event_handler.php
===================================================================
--- in-commerce/units/shipping/shipping_event_handler.php (revision 15141)
+++ in-commerce/units/shipping/shipping_event_handler.php (working copy)
@@ -49,7 +49,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$format = '%01.' . $object->GetDBField('PrecisionAfterSep') . 'f'; // %01.2f
@@ -81,7 +81,7 @@
$cost_object = $this->Application->recallObject('sc');
/* @var $cost_object kDBItem */
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$operation = $this->Application->GetVar('operation');
@@ -145,7 +145,7 @@
function OnFlip($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$aligment = $this->Application->GetLinkedVar('CostsTableAligment');
$new_align = $aligment ? 0 : 1;
$this->Application->SetVar('CostsTableAligment', $new_align);
@@ -233,7 +233,7 @@
{
parent::OnPreSaveCreated($event);
- $object =& $event->getObject( Array ('skip_autoload' => true) );
+ $object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$object->SetDBField('PortalGroups', ',' . $this->Application->ConfigValue('User_LoggedInGroup') . ',');
@@ -241,7 +241,7 @@
function UpdateGroups($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $event->Name == 'OnPreSaveCreated' ) {
Index: in-commerce/units/shipping_costs/shipping_costs_event_handler.php
===================================================================
--- in-commerce/units/shipping_costs/shipping_costs_event_handler.php (revision 15141)
+++ in-commerce/units/shipping_costs/shipping_costs_event_handler.php (working copy)
@@ -44,7 +44,7 @@
*/
protected function OnCreate(kEvent $event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$zones_object = $this->Application->recallObject('z');
@@ -91,7 +91,7 @@
{
// $this->OnCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
$shipping_object = $this->Application->recallObject('s');
@@ -170,7 +170,7 @@
*/
function OnClearAll($event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$zones_object = $this->Application->recallObject('z');
@@ -203,7 +203,7 @@
$shipping_obj = $this->Application->recallObject('s');
/* @var $shipping_obj kDBItem */
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$zero_if_empty = $shipping_obj->GetDBField('ZeroIfEmpty');
Index: in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php
===================================================================
--- in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (revision 15141)
+++ in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php (working copy)
@@ -26,7 +26,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$engine = $this->Application->recallObject($object->GetDBField('ClassName'));
@@ -93,7 +93,7 @@
{
parent::OnAfterItemLoad($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$properties = $object->GetDBField('Properties');
Index: in-commerce/units/taxes/taxes_event_handler.php
===================================================================
--- in-commerce/units/taxes/taxes_event_handler.php (revision 15141)
+++ in-commerce/units/taxes/taxes_event_handler.php (working copy)
@@ -66,7 +66,7 @@
*/
protected function customProcessing(kEvent $event, $type)
{
- $zone_object =& $event->getObject();
+ $zone_object = $event->getObject();
/* @var $zone_object kDBItem */
if ( $type == 'after' ) {
@@ -122,7 +122,7 @@
}
}
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$object->Load($item_id);
$object->SetFieldsFromHash($field_values);
@@ -214,14 +214,14 @@
$temp[$dest_record['TaxZoneDestId']]['DestValue'] = $dest_record['DestValue'];
}
$this->Application->SetVar('taxdst', $temp);
- //$object =& $event->getObject();
+ //$object = $event->getObject();
//$object->SetDBField('ShippingTypeID', $this->Application->GetVar('s_id'));
break;
case 'OnNew':
- //$object =& $event->getObject();
+ //$object = $event->getObject();
//$object->SetDBField('ShippingTypeID', $this->Application->GetVar('s_id'));
break;
Index: in-commerce/units/taxesdestinations/taxes_dst_event_handler.php
===================================================================
--- in-commerce/units/taxesdestinations/taxes_dst_event_handler.php (revision 15141)
+++ in-commerce/units/taxesdestinations/taxes_dst_event_handler.php (working copy)
@@ -22,7 +22,7 @@
*/
function OnSaveDestinations($event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -73,7 +73,7 @@
*/
protected function OnCreate(kEvent $event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
@@ -109,7 +109,7 @@
{
switch ($type) {
case 'before':
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$events = $this->Application->GetVar('events');
@@ -135,7 +135,7 @@
*/
function OnZoneUpdate($event) {
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$zone_object = &$this->Application->recallObject('tax');
Index: in-commerce/units/zones/zones_event_handler.php
===================================================================
--- in-commerce/units/zones/zones_event_handler.php (revision 15141)
+++ in-commerce/units/zones/zones_event_handler.php (working copy)
@@ -66,7 +66,7 @@
*/
protected function customProcessing(kEvent $event, $type)
{
- $zone_object =& $event->getObject();
+ $zone_object = $event->getObject();
/* @var $zone_object kDBItem */
switch ($type) {
@@ -129,7 +129,7 @@
}
}
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$object->Load($item_id);
$object->SetFieldsFromHash($field_values);
@@ -197,14 +197,14 @@
$temp[$dest_record['ZoneDestId']]['DestValue'] = $dest_record['DestValue'];
}
$this->Application->SetVar('dst', $temp);
- $object =& $event->getObject();
+ $object = $event->getObject();
$object->SetDBField('ShippingTypeID', $this->Application->GetVar('s_id'));
$this->Application->StoreVar('zone_mode'.$this->Application->GetVar('m_wid'), 'edit');
break;
/*case 'OnNew':
- $object =& $event->getObject();
+ $object = $event->getObject();
$object->SetDBField('ShippingTypeID', $this->Application->GetVar('s_id'));
break;*/
@@ -251,7 +251,7 @@
// if cancelling after create
if ( $this->Application->RecallVar('zone_mode' . $this->Application->GetVar('m_wid')) == 'create' ) {
- $zone =& $event->getObject();
+ $zone = $event->getObject();
/* @var $zone kDBItem */
$zone->Delete();
Index: in-link/units/l-visits/l-visit_eh.php
===================================================================
--- in-link/units/l-visits/l-visit_eh.php (revision 15135)
+++ in-link/units/l-visits/l-visit_eh.php (working copy)
@@ -26,7 +26,7 @@
$key_field = $event->MasterEvent->Prefix == 'u' ? 'PortalUserId' : 'ResourceId';
$table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
- $object =& $event->MasterEvent->getObject();
+ $object = $event->MasterEvent->getObject();
$sql = 'DELETE FROM '.$table_name.'
WHERE '.$key_field.' = '.$object->GetDBField($key_field);
Index: in-link/units/link_validation/link_validation_eh.php
===================================================================
--- in-link/units/link_validation/link_validation_eh.php (revision 15142)
+++ in-link/units/link_validation/link_validation_eh.php (working copy)
@@ -126,7 +126,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
$object->addFilter('primary_category_filter', 'ci.PrimaryCat = 1');
Index: in-link/units/links/links_event_handler.php
===================================================================
--- in-link/units/links/links_event_handler.php (revision 15142)
+++ in-link/units/links/links_event_handler.php (working copy)
@@ -50,7 +50,7 @@
{
parent::SetCustomQuery($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBList */
if ( !$this->Application->isAdminUser ) {
@@ -216,7 +216,7 @@
return;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
// replace 0 id in post with actual created id (used in enhancement process)
@@ -317,7 +317,7 @@
return ;
}
- $object =& $event->getObject(); // get link object
+ $object = $event->getObject(); // get link object
/* @var $object kDBItem */
$send_params = Array(
@@ -389,7 +389,7 @@
return ;
}
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ($object->GetDBField('Url') != $object->GetOriginalField('Url')) {
@@ -419,7 +419,7 @@
return;
}
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kCatDBItem */
$link_helper = $this->Application->recallObject('LinkHelper');
@@ -557,7 +557,7 @@
{
parent::OnBeforeDeleteOriginal($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$link_id = $event->getEventParam('original_id');
@@ -583,7 +583,7 @@
{
parent::OnAfterDeleteOriginal($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$old_resource_id = $this->Application->GetVar('original_resource_id');
Index: in-link/units/listing_types/listing_types_event_handler.php
===================================================================
--- in-link/units/listing_types/listing_types_event_handler.php (revision 15135)
+++ in-link/units/listing_types/listing_types_event_handler.php (working copy)
@@ -41,7 +41,7 @@
*/
function OnProcessSelected($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$selected_ids = $this->Application->GetVar('selected_ids');
$object->SetDBField($this->Application->RecallVar('dst_field'), $selected_ids['c']);
@@ -55,7 +55,7 @@
function OnPreSaveListingType($event)
{
$event->redirect = false;
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$this->RemoveRequiredFields($object);
$event->CallSubEvent('OnPreSave');
$this->Application->SetVar($event->getPrefixSpecial(true).'_id', $object->GetID());
@@ -89,7 +89,7 @@
{
parent::OnBeforeItemUpdate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$object->setRequired('ShopCartName', $object->GetDBField('EnableBuying'));
Index: in-link/units/listings/listings_event_handler.php
===================================================================
--- in-link/units/listings/listings_event_handler.php (revision 15142)
+++ in-link/units/listings/listings_event_handler.php (working copy)
@@ -44,7 +44,7 @@
*/
function OnProcessSelected($event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
$selected_ids = $this->Application->GetVar('selected_ids');
if ($selected_ids['l']) {
@@ -65,7 +65,7 @@
function OnPreSaveListing($event)
{
$event->redirect=false;
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$object->IgnoreValidation = true;
// $this->RemoveRequiredFields($object);
$event->CallSubEvent('OnPreSave');
@@ -82,7 +82,7 @@
*/
protected function OnBeforeItemUpdate(kEvent $event)
{
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->IgnoreValidation ) {
@@ -101,7 +101,7 @@
{
parent::OnBeforeItemCreate($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
if ( $object->IgnoreValidation ) {
@@ -122,7 +122,7 @@
{
parent::OnBeforeDeleteFromLive($event);
- $object =& $event->getObject();
+ $object = $event->getObject();
/* @var $object kDBItem */
$sql = 'SELECT *
@@ -308,7 +308,7 @@
$new_processing = false;
$link_id = $listing_type_id = 0;
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
switch ($event->Name) {
@@ -439,7 +439,7 @@
$this->OnListingCreate($event);
// save created listing_id back to itemdata
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$fields = $event->getEventParam('field_values');
$item_data = unserialize($fields['ItemData']);
unset($item_data['ListingTypeId']);
@@ -458,7 +458,7 @@
*/
function EnhanceLinkAfterOrderApprove($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$fields = $event->getEventParam('field_values');
@@ -495,7 +495,7 @@
*/
function EnhanceLinkAfterOrderDeny($event)
{
- $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object = $event->getObject( Array('skip_autoload' => true) );
$fields = $event->getEventParam('field_values');
$item_data = unserialize($fields['ItemData']);
$listing_id = $item_data['ListingId'];
@@ -511,7 +511,7 @@
*/
function ExpireLink($event)
{
- $object =& $event->getObject(Array ('skip_autoload' => true));
+ $object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$fields = $event->getEventParam('field_values');
@@ -543,7 +543,7 @@
*/
protected function iterateItems(kEvent $event) |