Index: branches/unlabeled/unlabeled-1.2.2/kernel/units/reviews/reviews_tag_processor.php
===================================================================
diff -u -r4332 -r5428
--- branches/unlabeled/unlabeled-1.2.2/kernel/units/reviews/reviews_tag_processor.php (.../reviews_tag_processor.php) (revision 4332)
+++ branches/unlabeled/unlabeled-1.2.2/kernel/units/reviews/reviews_tag_processor.php (.../reviews_tag_processor.php) (revision 5428)
@@ -55,8 +55,7 @@
function AlreadyReviewed($params)
{
$user_id = ($this->Application->GetVar('u_id') == 0) ? -2 : $this->Application->GetVar('u_id');
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $this->Application->recallObject($this->getPrefixSpecial());
+ $object =& $this->getObject( Array('skip_autoload' => true) );
$product_info = $object->getLinkedInfo();
$sql = ' SELECT * FROM '.TABLE_PREFIX.'SpamControl
Index: branches/unlabeled/unlabeled-1.19.2/core/units/languages/import_xml.php
===================================================================
diff -u -r4881 -r5428
--- branches/unlabeled/unlabeled-1.19.2/core/units/languages/import_xml.php (.../import_xml.php) (revision 4881)
+++ branches/unlabeled/unlabeled-1.19.2/core/units/languages/import_xml.php (.../import_xml.php) (revision 5428)
@@ -80,8 +80,7 @@
$this->Application->SetVar('lang_mode', 't');
$this->tables['lang'] = $this->prepareTempTable('lang');
- $this->Application->setUnitOption('lang','AutoLoad',false);
- $this->lang_object =& $this->Application->recallObject('lang.imp');
+ $this->lang_object =& $this->Application->recallObject('lang.imp', null, Array('skip_autoload' => true));
$this->tables['phrases'] = $this->prepareTempTable('phrases');
$this->tables['emailmessages'] = $this->prepareTempTable('emailmessages');
Index: branches/unlabeled/unlabeled-1.8.22/kernel/units/phrases/phrases_event_handler.php
===================================================================
diff -u -r3285 -r5428
--- branches/unlabeled/unlabeled-1.8.22/kernel/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 3285)
+++ branches/unlabeled/unlabeled-1.8.22/kernel/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 5428)
@@ -11,11 +11,9 @@
{
parent::OnNew($event);
$label = $this->Application->GetVar('phrases_label');
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject( $label ? Array('live_table'=>true) : Array() );
- if($label)
- {
+ $object =& $event->getObject( $label ? Array('live_table'=>true, 'skip_autoload' => true) : Array('skip_autoload' => true) );
+ if ($label) {
$object->SetDBField('Phrase',$label);
$object->SetDBField('LanguageId', $this->Application->GetVar('m_lang') );
$object->SetDBField('PhraseType',1);
@@ -46,12 +44,9 @@
function OnBeforePhraseCreate(&$event)
{
$edit_direct = $this->Application->GetVar($event->Prefix.'_label');
- if($edit_direct)
- {
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
- if( $this->Application->GetVar('m_lang') != $this->Application->GetVar('lang_id') )
- {
+ if ($edit_direct) {
+ $object =& $event->getObject( Array('skip_autoload' => true) );
+ if ($this->Application->GetVar('m_lang') != $this->Application->GetVar('lang_id')) {
$object->SwitchToLive();
}
}
Index: branches/unlabeled/unlabeled-1.53.2/core/units/general/cat_event_handler.php
===================================================================
diff -u -r4844 -r5428
--- branches/unlabeled/unlabeled-1.53.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 4844)
+++ branches/unlabeled/unlabeled-1.53.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5428)
@@ -120,10 +120,8 @@
$ids_sql = 'SELECT '.$id_field.' FROM '.$table.' WHERE ResourceId IN (%s)';
$resource_ids_sql = 'SELECT ItemResourceId FROM '.TABLE_PREFIX.'CategoryItems WHERE CategoryId = %s AND PrimaryCat = 1';
+ $object =& $this->Application->recallObject($event->Prefix.'.item', $event->Prefix, Array('skip_autoload' => true));
- $this->Application->setUnitOption($event->Prefix,'AutoLoad', false);
- $object =& $this->Application->recallObject($event->Prefix.'.item', $event->Prefix);
-
foreach($cat_ids as $source_cat => $dest_cat)
{
$item_resource_ids = $this->Conn->GetCol( sprintf($resource_ids_sql, $source_cat) );
@@ -135,7 +133,7 @@
$temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
if($item_ids) $temp->CloneItems($event->Prefix, $event->Special, $item_ids);
}
- $this->Application->setUnitOption($event->Prefix,'AutoLoad', true);
+
$this->Application->SetVar('m_cat_id', $saved_cat_id);
}
}
Index: branches/unlabeled/unlabeled-1.55.2/core/kernel/utility/unit_config_reader.php
===================================================================
diff -u -r5397 -r5428
--- branches/unlabeled/unlabeled-1.55.2/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 5397)
+++ branches/unlabeled/unlabeled-1.55.2/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 5428)
@@ -623,11 +623,9 @@
*/
function prefixRegistred($prefix)
{
- return isset($this->configData[$prefix]) ? true : false;
+ return isset($this->prefixFiles[$prefix]) ? true : false;
}
-
-
}
Index: branches/unlabeled/unlabeled-1.3.2/kernel/units/statistics/statistics_tag_processor.php
===================================================================
diff -u -r5010 -r5428
--- branches/unlabeled/unlabeled-1.3.2/kernel/units/statistics/statistics_tag_processor.php (.../statistics_tag_processor.php) (revision 5010)
+++ branches/unlabeled/unlabeled-1.3.2/kernel/units/statistics/statistics_tag_processor.php (.../statistics_tag_processor.php) (revision 5428)
@@ -214,10 +214,7 @@
function GetTotalPending()
{
- $sql = 'SELECT Prefix
- FROM '.TABLE_PREFIX.'ItemTypes
- WHERE LENGTH(ClassName) > 0';
- $prefixes = $this->Conn->GetCol($sql);
+ $prefixes = $this->getPendingPrefixes();
$sum = 0;
foreach ($prefixes as $prefix) {
@@ -226,12 +223,18 @@
return $sum;
}
- function PrintPendingStatistics($params)
+ function getPendingPrefixes()
{
$sql = 'SELECT Prefix
- FROM '.TABLE_PREFIX.'ItemTypes
- WHERE LENGTH(ClassName) > 0';
- $check_prefixes = $this->Conn->GetCol($sql);
+ FROM '.TABLE_PREFIX.'ItemTypes it
+ LEFT JOIN '.TABLE_PREFIX.'Modules m ON m.Name = it.Module
+ WHERE (m.Loaded = 1) AND (LENGTH(it.ClassName) > 0)';
+ return $this->Conn->GetCol($sql);
+ }
+
+ function PrintPendingStatistics($params)
+ {
+ $check_prefixes = $this->getPendingPrefixes();
if (!$check_prefixes) {
return '';
}
Index: branches/unlabeled/unlabeled-1.10.2/core/units/selectors/selectors_event_handler.php
===================================================================
diff -u -r5297 -r5428
--- branches/unlabeled/unlabeled-1.10.2/core/units/selectors/selectors_event_handler.php (.../selectors_event_handler.php) (revision 5297)
+++ branches/unlabeled/unlabeled-1.10.2/core/units/selectors/selectors_event_handler.php (.../selectors_event_handler.php) (revision 5428)
@@ -158,8 +158,7 @@
*/
function SaveChanges(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
@@ -352,8 +351,7 @@
*/
function OnMassResetToBase(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
Index: branches/unlabeled/unlabeled-1.8.2/kernel/units/general/inp_db_event_handler.php
===================================================================
diff -u -r4944 -r5428
--- branches/unlabeled/unlabeled-1.8.2/kernel/units/general/inp_db_event_handler.php (.../inp_db_event_handler.php) (revision 4944)
+++ branches/unlabeled/unlabeled-1.8.2/kernel/units/general/inp_db_event_handler.php (.../inp_db_event_handler.php) (revision 5428)
@@ -26,9 +26,8 @@
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
return;
}
-
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$this->StoreSelectedIDs($event);
$ids=$this->getSelectedIDs($event);
Index: branches/unlabeled/unlabeled-1.69.2/core/kernel/db/db_event_handler.php
===================================================================
diff -u -r5097 -r5428
--- branches/unlabeled/unlabeled-1.69.2/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 5097)
+++ branches/unlabeled/unlabeled-1.69.2/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 5428)
@@ -787,8 +787,7 @@
*/
function OnCreate(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
@@ -824,8 +823,7 @@
*/
function OnUpdate(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
@@ -859,8 +857,7 @@
*/
function OnDelete(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$object->ID = $this->getPassedID($event);
if( $object->Delete() )
{
@@ -881,15 +878,13 @@
*/
function OnNew(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$object->setID(0);
$this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate');
$table_info = $object->getLinkedInfo();
$object->SetDBField($table_info['ForeignKey'], $table_info['ParentId']);
-
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',true);
+
$event->redirect = false;
}
@@ -1046,10 +1041,9 @@
}
return;
}
+
+ $object =& $event->getObject( Array('skip_autoload' => true) );
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
-
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if ($items_info) {
foreach ($items_info as $id => $field_values) {
@@ -1125,10 +1119,8 @@
function OnPreCreate(&$event)
{
$this->clearSelectedIDs($event);
+ $object =& $event->getObject( Array('skip_autoload' => true) );
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
-
$temp =& $this->Application->recallObject($event->Prefix.'_TempHandler', 'kTempTablesHandler');
$temp->PrepareEdit();
@@ -1145,12 +1137,10 @@
*/
function OnPreSaveCreated(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
-
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info) $field_values = array_shift($items_info);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$object->SetFieldsFromHash($field_values);
$this->customProcessing($event, 'before');
Index: branches/unlabeled/unlabeled-1.60.2/kernel/units/users/users_event_handler.php
===================================================================
diff -u -r5414 -r5428
--- branches/unlabeled/unlabeled-1.60.2/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 5414)
+++ branches/unlabeled/unlabeled-1.60.2/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 5428)
@@ -104,8 +104,7 @@
*/
function OnLogin(&$event)
{
- $this->Application->setUnitOption($event->Prefix, 'AutoLoad', false);
- $object =& $this->Application->recallObject('u');
+ $object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true));
$password = $this->Application->GetVar('password');
if(!$password)
@@ -451,7 +450,6 @@
$object =& $event->getObject( Array('skip_autoload' => true) );
$this->Application->SetVar('u_id', $object->getID() );
- $this->Application->setUnitOption('u', 'AutoLoad', true);
$this->setNextTemplate($event);
@@ -470,8 +468,7 @@
*/
function setUserStatus(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$new_users_allowed = $this->Application->ConfigValue('User_Allow_New');
// 1 - Instant, 2 - Not Allowed, 3 - Pending
@@ -587,8 +584,7 @@
*/
function OnUpdateAddress(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
@@ -607,10 +603,9 @@
$user_email = $this->Application->GetVar('subscriber_email');
if ( preg_match("/^[_a-zA-Z0-9-\.]+@[a-zA-Z0-9-\.]+\.[a-z]{2,4}$/", $user_email) ){
+
+ $object = &$this->Application->recallObject($this->Prefix.'.subscriber', null, Array('skip_autoload' => true));
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object = &$this->Application->recallObject($this->Prefix.'.subscriber');
-
$this->Application->StoreVar('SubscriberEmail', $user_email);
if( $object->Load(array('Email'=>$user_email)) ){
@@ -643,8 +638,7 @@
function OnSubscribeUser(&$event){
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object = &$this->Application->recallObject($this->Prefix.'.subscriber');
+ $object = &$this->Application->recallObject($this->Prefix.'.subscriber', Array('skip_autoload' => true));
$user_email = $this->Application->RecallVar('SubscriberEmail');
@@ -735,8 +729,7 @@
function OnForgotPassword(&$event){
- $this->Application->setUnitOption('u', 'AutoLoad', false);
- $user_object = &$this->Application->recallObject('u.forgot');
+ $user_object = &$this->Application->recallObject('u.forgot', null, Array('skip_autoload' => true));
$user_current_object = &$this->Application->recallObject('u');
$username = $this->Application->GetVar('username');
Index: branches/unlabeled/unlabeled-1.3.52/kernel/units/stylesheets/stylesheets_event_handler.php
===================================================================
diff -u -r1719 -r5428
--- branches/unlabeled/unlabeled-1.3.52/kernel/units/stylesheets/stylesheets_event_handler.php (.../stylesheets_event_handler.php) (revision 1719)
+++ branches/unlabeled/unlabeled-1.3.52/kernel/units/stylesheets/stylesheets_event_handler.php (.../stylesheets_event_handler.php) (revision 5428)
@@ -10,8 +10,7 @@
*/
function OnCompileStylesheet(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$object->SwitchToLive();
$ids = explode(',', $event->MasterEvent->getEventParam('ids') );
Index: branches/unlabeled/unlabeled-1.4.2/core/units/reviews/reviews_event_handler.php
===================================================================
diff -u -r4935 -r5428
--- branches/unlabeled/unlabeled-1.4.2/core/units/reviews/reviews_event_handler.php (.../reviews_event_handler.php) (revision 4935)
+++ branches/unlabeled/unlabeled-1.4.2/core/units/reviews/reviews_event_handler.php (.../reviews_event_handler.php) (revision 5428)
@@ -73,8 +73,7 @@
{
$user_id = $this->Application->GetVar('u_id') ? $this->Application->GetVar('u_id') : -2;
$ip = $_SERVER['REMOTE_ADDR'];
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$product_info = $object->getLinkedInfo();
$object->addFilter('current_item', '%1$s.ItemId = '.$product_info['ParentId']);
$object->addFilter('current_user', '%1$s.CreatedById = '.$user_id);
@@ -92,9 +91,8 @@
{
$user_id = ($this->Application->GetVar('u_id') == 0) ? -2 : $this->Application->GetVar('u_id');
$event->redirect_params = Array('pass' => 'all,p');
-
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$item_info = $this->Application->GetVar('rev_product');
$product_info = $object->getLinkedInfo();
Index: branches/unlabeled/unlabeled-1.1.4/core/units/images/image_tag_processor.php
===================================================================
diff -u -r4304 -r5428
--- branches/unlabeled/unlabeled-1.1.4/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 4304)
+++ branches/unlabeled/unlabeled-1.1.4/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 5428)
@@ -49,10 +49,8 @@
function LoadItemImage($params)
{
$parent_item =& $this->Application->recallObject($params['PrefixSpecial']);
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null, Array('skip_autoload' => true));
- $this->Application->setUnitOption($this->Prefix,'AutoLoad',false);
- $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
-
// if we need primary thumbnail which is preloaded with products list
$object->Clear();
Index: branches/unlabeled/unlabeled-1.5.14/kernel/units/stylesheets/stylesheets_item.php
===================================================================
diff -u -r3560 -r5428
--- branches/unlabeled/unlabeled-1.5.14/kernel/units/stylesheets/stylesheets_item.php (.../stylesheets_item.php) (revision 3560)
+++ branches/unlabeled/unlabeled-1.5.14/kernel/units/stylesheets/stylesheets_item.php (.../stylesheets_item.php) (revision 5428)
@@ -4,8 +4,7 @@
{
function Compile()
{
- $this->Application->setUnitOption('selectors', 'AutoLoad', false);
- $selector_item =& $this->Application->recallObject('selectors.item', 'selectors', Array('live_table'=>true) );
+ $selector_item =& $this->Application->recallObject('selectors.item', 'selectors', Array('live_table'=>true, 'skip_autoload' => true) );
$parent_field = $this->Application->getUnitOption($selector_item->Prefix, 'ForeignKey');
$sql_template = 'SELECT '.$selector_item->IDField.' FROM '.$selector_item->TableName.' WHERE '.$parent_field.' = %s ORDER BY SelectorName ASC';
Index: branches/unlabeled/unlabeled-1.6.2/kernel/units/category_items/category_items_event_handler.php
===================================================================
diff -u -r4315 -r5428
--- branches/unlabeled/unlabeled-1.6.2/kernel/units/category_items/category_items_event_handler.php (.../category_items_event_handler.php) (revision 4315)
+++ branches/unlabeled/unlabeled-1.6.2/kernel/units/category_items/category_items_event_handler.php (.../category_items_event_handler.php) (revision 5428)
@@ -9,8 +9,7 @@
*/
function OnSetPrimary(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$this->StoreSelectedIDs($event);
$ids=$this->getSelectedIDs($event);
if($ids)
@@ -88,8 +87,7 @@
if(!$category_ids) return false;
$item_prefix = $event->getEventParam('item_prefix');
- $this->Application->setUnitOption($item_prefix, 'AutoLoad', false);
- $item =& $this->Application->recallObject($item_prefix.'.-item');
+ $item =& $this->Application->recallObject($item_prefix.'.-item', null, Array('skip_autoload' => true));
$ci_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
$item_table = $this->Application->getUnitOption($item_prefix, 'TableName');
Index: branches/unlabeled/unlabeled-1.22.2/core/kernel/utility/temp_handler.php
===================================================================
diff -u -r5056 -r5428
--- branches/unlabeled/unlabeled-1.22.2/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 5056)
+++ branches/unlabeled/unlabeled-1.22.2/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 5428)
@@ -281,8 +281,7 @@
//recalling by different name, because we may get kDBList, if we recall just by prefix
$recall_prefix = $prefix_special.($special ? '' : '.').'-item';
- $this->Application->setUnitOption($prefix,'AutoLoad',false);
- $object =& $this->Application->recallObject($recall_prefix, $prefix);
+ $object =& $this->Application->recallObject($recall_prefix, $prefix, Array('skip_autoload' => true));
foreach ($ids as $id)
{
Index: branches/unlabeled/unlabeled-1.4.2/core/units/relationship/relationship_event_handler.php
===================================================================
diff -u -r4935 -r5428
--- branches/unlabeled/unlabeled-1.4.2/core/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 4935)
+++ branches/unlabeled/unlabeled-1.4.2/core/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 5428)
@@ -22,8 +22,7 @@
*/
function OnAddRelation(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$table_info = $object->getLinkedInfo();
$main_item_type = $this->Application->getUnitOption($table_info['ParentPrefix'],'ItemType');
Index: branches/unlabeled/unlabeled-1.22.2/core/units/email_events/email_events_event_handler.php
===================================================================
diff -u -r5362 -r5428
--- branches/unlabeled/unlabeled-1.22.2/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 5362)
+++ branches/unlabeled/unlabeled-1.22.2/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 5428)
@@ -120,10 +120,8 @@
$to_user_id = $event->getEventParam('EmailEventToUserId');
$email_event_type = $event->getEventParam('EmailEventType');
-
- $this->Application->setUnitOption('emailmessages', 'AutoLoad', false);
- $message_object = &$this->Application->recallObject('emailmessages');
-
+
+ $message_object = &$this->Application->recallObject('emailmessages', null, Array('skip_autoload' => true));
$event_table = $this->Application->getUnitOption('emailevents', 'TableName');
$event_object = &$event->getObject();
@@ -167,10 +165,7 @@
$message_template = $message_object->GetDBField('Template')."\r\n".$footer;
// add footer: end
- $old_autoload = $this->Application->getUnitOption('u', 'AutoLoad');
- $this->Application->setUnitOption('u', 'AutoLoad', false);
-
- $from_user_object = &$this->Application->recallObject('u.-email'.$from_user_id);
+ $from_user_object = &$this->Application->recallObject('u.-email'.$from_user_id, null, Array('skip_autoload' => true));
$from_user_object->Load($from_user_id);
// here if we don't have from_user loaded, it takes a default user from config values
if ( $from_user_object->IsLoaded() ) {
@@ -181,13 +176,11 @@
$from_user_email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
}
- $to_user_object = &$this->Application->recallObject('u.-email'.$to_user_id);
+ $to_user_object = &$this->Application->recallObject('u.-email'.$to_user_id, null, Array('skip_autoload' => true));
$to_user_object->Load($to_user_id);
$to_user_email = $to_user_object->GetDBField('Email');
$to_user_name = trim($to_user_object->GetDBField('FirstName').' '.$to_user_object->GetDBField('LastName'));
- $this->Application->setUnitOption('u', 'AutoLoad', $old_autoload);
-
if($direct_send_params){
$to_user_email = ( $direct_send_params['to_email'] ? $direct_send_params['to_email'] : $to_user_email );
$to_user_name = ( $direct_send_params['to_name'] ? $direct_send_params['to_name'] : $to_user_name );
Index: branches/unlabeled/unlabeled-1.34.2/core/kernel/event_manager.php
===================================================================
diff -u -r4847 -r5428
--- branches/unlabeled/unlabeled-1.34.2/core/kernel/event_manager.php (.../event_manager.php) (revision 4847)
+++ branches/unlabeled/unlabeled-1.34.2/core/kernel/event_manager.php (.../event_manager.php) (revision 5428)
@@ -334,10 +334,9 @@
function registerHook($hookto_prefix, $hookto_special, $hookto_event, $mode, $do_prefix, $do_special, $do_event, $conditional)
{
- if( !$this->Application->getUnitOptions($hookto_prefix) )
+ if( !$this->Application->prefixRegistred($hookto_prefix) )
{
- if($this->Application->isDebugMode())
- {
+ if ($this->Application->isDebugMode()) {
trigger_error('Prefix '.$hookto_prefix.' doesn\'t exist when trying to hook from '.$do_prefix.':'.$do_event.'', E_USER_WARNING);
}
return;
Index: branches/unlabeled/unlabeled-1.53.2/kernel/units/general/cat_event_handler.php
===================================================================
diff -u -r4844 -r5428
--- branches/unlabeled/unlabeled-1.53.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 4844)
+++ branches/unlabeled/unlabeled-1.53.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5428)
@@ -120,10 +120,8 @@
$ids_sql = 'SELECT '.$id_field.' FROM '.$table.' WHERE ResourceId IN (%s)';
$resource_ids_sql = 'SELECT ItemResourceId FROM '.TABLE_PREFIX.'CategoryItems WHERE CategoryId = %s AND PrimaryCat = 1';
+ $object =& $this->Application->recallObject($event->Prefix.'.item', $event->Prefix, Array('skip_autoload' => true));
- $this->Application->setUnitOption($event->Prefix,'AutoLoad', false);
- $object =& $this->Application->recallObject($event->Prefix.'.item', $event->Prefix);
-
foreach($cat_ids as $source_cat => $dest_cat)
{
$item_resource_ids = $this->Conn->GetCol( sprintf($resource_ids_sql, $source_cat) );
@@ -135,7 +133,7 @@
$temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
if($item_ids) $temp->CloneItems($event->Prefix, $event->Special, $item_ids);
}
- $this->Application->setUnitOption($event->Prefix,'AutoLoad', true);
+
$this->Application->SetVar('m_cat_id', $saved_cat_id);
}
}
Index: branches/unlabeled/unlabeled-1.5.2/kernel/include/modlist.php
===================================================================
diff -u -r4254 -r5428
--- branches/unlabeled/unlabeled-1.5.2/kernel/include/modlist.php (.../modlist.php) (revision 4254)
+++ branches/unlabeled/unlabeled-1.5.2/kernel/include/modlist.php (.../modlist.php) (revision 5428)
@@ -39,7 +39,7 @@
function LoadModules()
{
$this->Clear();
- return $this->Query_Item("SELECT * FROM ".$this->SourceTable);
+ return $this->Query_Item('SELECT * FROM '.$this->SourceTable.' WHERE Loaded = 1');
}
function &FindModule($fieldname, $value)
Index: branches/unlabeled/unlabeled-1.2.2/core/units/reviews/reviews_tag_processor.php
===================================================================
diff -u -r4332 -r5428
--- branches/unlabeled/unlabeled-1.2.2/core/units/reviews/reviews_tag_processor.php (.../reviews_tag_processor.php) (revision 4332)
+++ branches/unlabeled/unlabeled-1.2.2/core/units/reviews/reviews_tag_processor.php (.../reviews_tag_processor.php) (revision 5428)
@@ -55,8 +55,7 @@
function AlreadyReviewed($params)
{
$user_id = ($this->Application->GetVar('u_id') == 0) ? -2 : $this->Application->GetVar('u_id');
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $this->Application->recallObject($this->getPrefixSpecial());
+ $object =& $this->getObject( Array('skip_autoload' => true) );
$product_info = $object->getLinkedInfo();
$sql = ' SELECT * FROM '.TABLE_PREFIX.'SpamControl
Index: branches/unlabeled/unlabeled-1.19.2/kernel/units/languages/import_xml.php
===================================================================
diff -u -r4881 -r5428
--- branches/unlabeled/unlabeled-1.19.2/kernel/units/languages/import_xml.php (.../import_xml.php) (revision 4881)
+++ branches/unlabeled/unlabeled-1.19.2/kernel/units/languages/import_xml.php (.../import_xml.php) (revision 5428)
@@ -80,8 +80,7 @@
$this->Application->SetVar('lang_mode', 't');
$this->tables['lang'] = $this->prepareTempTable('lang');
- $this->Application->setUnitOption('lang','AutoLoad',false);
- $this->lang_object =& $this->Application->recallObject('lang.imp');
+ $this->lang_object =& $this->Application->recallObject('lang.imp', null, Array('skip_autoload' => true));
$this->tables['phrases'] = $this->prepareTempTable('phrases');
$this->tables['emailmessages'] = $this->prepareTempTable('emailmessages');
Index: branches/unlabeled/unlabeled-1.8.22/core/units/phrases/phrases_event_handler.php
===================================================================
diff -u -r3285 -r5428
--- branches/unlabeled/unlabeled-1.8.22/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 3285)
+++ branches/unlabeled/unlabeled-1.8.22/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 5428)
@@ -11,11 +11,9 @@
{
parent::OnNew($event);
$label = $this->Application->GetVar('phrases_label');
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject( $label ? Array('live_table'=>true) : Array() );
- if($label)
- {
+ $object =& $event->getObject( $label ? Array('live_table'=>true, 'skip_autoload' => true) : Array('skip_autoload' => true) );
+ if ($label) {
$object->SetDBField('Phrase',$label);
$object->SetDBField('LanguageId', $this->Application->GetVar('m_lang') );
$object->SetDBField('PhraseType',1);
@@ -46,12 +44,9 @@
function OnBeforePhraseCreate(&$event)
{
$edit_direct = $this->Application->GetVar($event->Prefix.'_label');
- if($edit_direct)
- {
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
- if( $this->Application->GetVar('m_lang') != $this->Application->GetVar('lang_id') )
- {
+ if ($edit_direct) {
+ $object =& $event->getObject( Array('skip_autoload' => true) );
+ if ($this->Application->GetVar('m_lang') != $this->Application->GetVar('lang_id')) {
$object->SwitchToLive();
}
}
Index: branches/unlabeled/unlabeled-1.10.2/kernel/units/selectors/selectors_event_handler.php
===================================================================
diff -u -r5297 -r5428
--- branches/unlabeled/unlabeled-1.10.2/kernel/units/selectors/selectors_event_handler.php (.../selectors_event_handler.php) (revision 5297)
+++ branches/unlabeled/unlabeled-1.10.2/kernel/units/selectors/selectors_event_handler.php (.../selectors_event_handler.php) (revision 5428)
@@ -158,8 +158,7 @@
*/
function SaveChanges(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
@@ -352,8 +351,7 @@
*/
function OnMassResetToBase(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
Index: branches/unlabeled/unlabeled-1.3.2/core/units/statistics/statistics_tag_processor.php
===================================================================
diff -u -r5010 -r5428
--- branches/unlabeled/unlabeled-1.3.2/core/units/statistics/statistics_tag_processor.php (.../statistics_tag_processor.php) (revision 5010)
+++ branches/unlabeled/unlabeled-1.3.2/core/units/statistics/statistics_tag_processor.php (.../statistics_tag_processor.php) (revision 5428)
@@ -214,10 +214,7 @@
function GetTotalPending()
{
- $sql = 'SELECT Prefix
- FROM '.TABLE_PREFIX.'ItemTypes
- WHERE LENGTH(ClassName) > 0';
- $prefixes = $this->Conn->GetCol($sql);
+ $prefixes = $this->getPendingPrefixes();
$sum = 0;
foreach ($prefixes as $prefix) {
@@ -226,12 +223,18 @@
return $sum;
}
- function PrintPendingStatistics($params)
+ function getPendingPrefixes()
{
$sql = 'SELECT Prefix
- FROM '.TABLE_PREFIX.'ItemTypes
- WHERE LENGTH(ClassName) > 0';
- $check_prefixes = $this->Conn->GetCol($sql);
+ FROM '.TABLE_PREFIX.'ItemTypes it
+ LEFT JOIN '.TABLE_PREFIX.'Modules m ON m.Name = it.Module
+ WHERE (m.Loaded = 1) AND (LENGTH(it.ClassName) > 0)';
+ return $this->Conn->GetCol($sql);
+ }
+
+ function PrintPendingStatistics($params)
+ {
+ $check_prefixes = $this->getPendingPrefixes();
if (!$check_prefixes) {
return '';
}
Index: branches/unlabeled/unlabeled-1.8.2/core/units/general/inp_db_event_handler.php
===================================================================
diff -u -r4944 -r5428
--- branches/unlabeled/unlabeled-1.8.2/core/units/general/inp_db_event_handler.php (.../inp_db_event_handler.php) (revision 4944)
+++ branches/unlabeled/unlabeled-1.8.2/core/units/general/inp_db_event_handler.php (.../inp_db_event_handler.php) (revision 5428)
@@ -26,9 +26,8 @@
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
return;
}
-
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$this->StoreSelectedIDs($event);
$ids=$this->getSelectedIDs($event);
Index: branches/unlabeled/unlabeled-1.54.2/core/kernel/db/db_tag_processor.php
===================================================================
diff -u -r4962 -r5428
--- branches/unlabeled/unlabeled-1.54.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 4962)
+++ branches/unlabeled/unlabeled-1.54.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 5428)
@@ -475,8 +475,7 @@
function AddCurrencySymbol($value, $iso)
{
- $this->Application->setUnitOption('curr', 'AutoLoad', false);
- $currency =& $this->Application->recallObject('curr.-'.$iso);
+ $currency =& $this->Application->recallObject('curr.-'.$iso, null, Array('skip_autoload' => true));
if( !$currency->isLoaded() ) $currency->Load($iso, 'ISO');
$symbol = $currency->GetDBField('Symbol');
Index: branches/unlabeled/unlabeled-1.105.2/admin/install.php
===================================================================
diff -u -r5332 -r5428
--- branches/unlabeled/unlabeled-1.105.2/admin/install.php (.../install.php) (revision 5332)
+++ branches/unlabeled/unlabeled-1.105.2/admin/install.php (.../install.php) (revision 5428)
@@ -709,8 +709,7 @@
$objThemes->CreateMissingThemes(false);
$css_hash = $application->Conn->GetCol('SELECT LOWER(Name) AS Name, StylesheetId FROM '.TABLE_PREFIX.'Stylesheets', 'StylesheetId');
-
- $application->setUnitOption('css', 'AutoLoad', false);
+
$css_table = $application->getUnitOption('css','TableName');
$css_idfield = $application->getUnitOption('css','IDField');
@@ -720,7 +719,7 @@
$theme_update_sql = 'UPDATE '.$theme_table.' SET '.$css_idfield.' = %s WHERE LOWER(Name) = %s';
foreach($css_hash as $stylesheet_id => $theme_name)
{
- $css_item =& $application->recallObject('css');
+ $css_item =& $application->recallObject('css', null, Array('skip_autoload' => true));
$css_item->Load($stylesheet_id);
$css_item->Compile();
$application->Conn->Query( sprintf($theme_update_sql, $stylesheet_id, $application->Conn->qstr( getArrayValue($css_hash,$stylesheet_id) ) ) );
Index: branches/unlabeled/unlabeled-1.4.2/kernel/units/reviews/reviews_event_handler.php
===================================================================
diff -u -r4935 -r5428
--- branches/unlabeled/unlabeled-1.4.2/kernel/units/reviews/reviews_event_handler.php (.../reviews_event_handler.php) (revision 4935)
+++ branches/unlabeled/unlabeled-1.4.2/kernel/units/reviews/reviews_event_handler.php (.../reviews_event_handler.php) (revision 5428)
@@ -73,8 +73,7 @@
{
$user_id = $this->Application->GetVar('u_id') ? $this->Application->GetVar('u_id') : -2;
$ip = $_SERVER['REMOTE_ADDR'];
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$product_info = $object->getLinkedInfo();
$object->addFilter('current_item', '%1$s.ItemId = '.$product_info['ParentId']);
$object->addFilter('current_user', '%1$s.CreatedById = '.$user_id);
@@ -92,9 +91,8 @@
{
$user_id = ($this->Application->GetVar('u_id') == 0) ? -2 : $this->Application->GetVar('u_id');
$event->redirect_params = Array('pass' => 'all,p');
-
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$item_info = $this->Application->GetVar('rev_product');
$product_info = $object->getLinkedInfo();
Index: branches/unlabeled/unlabeled-1.60.2/core/units/users/users_event_handler.php
===================================================================
diff -u -r5414 -r5428
--- branches/unlabeled/unlabeled-1.60.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 5414)
+++ branches/unlabeled/unlabeled-1.60.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 5428)
@@ -104,8 +104,7 @@
*/
function OnLogin(&$event)
{
- $this->Application->setUnitOption($event->Prefix, 'AutoLoad', false);
- $object =& $this->Application->recallObject('u');
+ $object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true));
$password = $this->Application->GetVar('password');
if(!$password)
@@ -451,7 +450,6 @@
$object =& $event->getObject( Array('skip_autoload' => true) );
$this->Application->SetVar('u_id', $object->getID() );
- $this->Application->setUnitOption('u', 'AutoLoad', true);
$this->setNextTemplate($event);
@@ -470,8 +468,7 @@
*/
function setUserStatus(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$new_users_allowed = $this->Application->ConfigValue('User_Allow_New');
// 1 - Instant, 2 - Not Allowed, 3 - Pending
@@ -587,8 +584,7 @@
*/
function OnUpdateAddress(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
@@ -607,10 +603,9 @@
$user_email = $this->Application->GetVar('subscriber_email');
if ( preg_match("/^[_a-zA-Z0-9-\.]+@[a-zA-Z0-9-\.]+\.[a-z]{2,4}$/", $user_email) ){
+
+ $object = &$this->Application->recallObject($this->Prefix.'.subscriber', null, Array('skip_autoload' => true));
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object = &$this->Application->recallObject($this->Prefix.'.subscriber');
-
$this->Application->StoreVar('SubscriberEmail', $user_email);
if( $object->Load(array('Email'=>$user_email)) ){
@@ -643,8 +638,7 @@
function OnSubscribeUser(&$event){
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object = &$this->Application->recallObject($this->Prefix.'.subscriber');
+ $object = &$this->Application->recallObject($this->Prefix.'.subscriber', Array('skip_autoload' => true));
$user_email = $this->Application->RecallVar('SubscriberEmail');
@@ -735,8 +729,7 @@
function OnForgotPassword(&$event){
- $this->Application->setUnitOption('u', 'AutoLoad', false);
- $user_object = &$this->Application->recallObject('u.forgot');
+ $user_object = &$this->Application->recallObject('u.forgot', null, Array('skip_autoload' => true));
$user_current_object = &$this->Application->recallObject('u');
$username = $this->Application->GetVar('username');
Index: branches/unlabeled/unlabeled-1.3.52/core/units/stylesheets/stylesheets_event_handler.php
===================================================================
diff -u -r1719 -r5428
--- branches/unlabeled/unlabeled-1.3.52/core/units/stylesheets/stylesheets_event_handler.php (.../stylesheets_event_handler.php) (revision 1719)
+++ branches/unlabeled/unlabeled-1.3.52/core/units/stylesheets/stylesheets_event_handler.php (.../stylesheets_event_handler.php) (revision 5428)
@@ -10,8 +10,7 @@
*/
function OnCompileStylesheet(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$object->SwitchToLive();
$ids = explode(',', $event->MasterEvent->getEventParam('ids') );
Index: branches/unlabeled/unlabeled-1.5.14/core/units/stylesheets/stylesheets_item.php
===================================================================
diff -u -r3560 -r5428
--- branches/unlabeled/unlabeled-1.5.14/core/units/stylesheets/stylesheets_item.php (.../stylesheets_item.php) (revision 3560)
+++ branches/unlabeled/unlabeled-1.5.14/core/units/stylesheets/stylesheets_item.php (.../stylesheets_item.php) (revision 5428)
@@ -4,8 +4,7 @@
{
function Compile()
{
- $this->Application->setUnitOption('selectors', 'AutoLoad', false);
- $selector_item =& $this->Application->recallObject('selectors.item', 'selectors', Array('live_table'=>true) );
+ $selector_item =& $this->Application->recallObject('selectors.item', 'selectors', Array('live_table'=>true, 'skip_autoload' => true) );
$parent_field = $this->Application->getUnitOption($selector_item->Prefix, 'ForeignKey');
$sql_template = 'SELECT '.$selector_item->IDField.' FROM '.$selector_item->TableName.' WHERE '.$parent_field.' = %s ORDER BY SelectorName ASC';
Index: branches/unlabeled/unlabeled-1.1.4/kernel/units/images/image_tag_processor.php
===================================================================
diff -u -r4304 -r5428
--- branches/unlabeled/unlabeled-1.1.4/kernel/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 4304)
+++ branches/unlabeled/unlabeled-1.1.4/kernel/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 5428)
@@ -49,10 +49,8 @@
function LoadItemImage($params)
{
$parent_item =& $this->Application->recallObject($params['PrefixSpecial']);
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null, Array('skip_autoload' => true));
- $this->Application->setUnitOption($this->Prefix,'AutoLoad',false);
- $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
-
// if we need primary thumbnail which is preloaded with products list
$object->Clear();
Index: branches/unlabeled/unlabeled-1.4.2/kernel/units/relationship/relationship_event_handler.php
===================================================================
diff -u -r4935 -r5428
--- branches/unlabeled/unlabeled-1.4.2/kernel/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 4935)
+++ branches/unlabeled/unlabeled-1.4.2/kernel/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 5428)
@@ -22,8 +22,7 @@
*/
function OnAddRelation(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$table_info = $object->getLinkedInfo();
$main_item_type = $this->Application->getUnitOption($table_info['ParentPrefix'],'ItemType');
Index: branches/unlabeled/unlabeled-1.6.2/core/units/category_items/category_items_event_handler.php
===================================================================
diff -u -r4315 -r5428
--- branches/unlabeled/unlabeled-1.6.2/core/units/category_items/category_items_event_handler.php (.../category_items_event_handler.php) (revision 4315)
+++ branches/unlabeled/unlabeled-1.6.2/core/units/category_items/category_items_event_handler.php (.../category_items_event_handler.php) (revision 5428)
@@ -9,8 +9,7 @@
*/
function OnSetPrimary(&$event)
{
- $this->Application->setUnitOption($event->Prefix,'AutoLoad',false);
- $object =& $event->getObject();
+ $object =& $event->getObject( Array('skip_autoload' => true) );
$this->StoreSelectedIDs($event);
$ids=$this->getSelectedIDs($event);
if($ids)
@@ -88,8 +87,7 @@
if(!$category_ids) return false;
$item_prefix = $event->getEventParam('item_prefix');
- $this->Application->setUnitOption($item_prefix, 'AutoLoad', false);
- $item =& $this->Application->recallObject($item_prefix.'.-item');
+ $item =& $this->Application->recallObject($item_prefix.'.-item', null, Array('skip_autoload' => true));
$ci_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
$item_table = $this->Application->getUnitOption($item_prefix, 'TableName');
Index: branches/unlabeled/unlabeled-1.22.2/kernel/units/email_events/email_events_event_handler.php
===================================================================
diff -u -r5362 -r5428
--- branches/unlabeled/unlabeled-1.22.2/kernel/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 5362)
+++ branches/unlabeled/unlabeled-1.22.2/kernel/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 5428)
@@ -120,10 +120,8 @@
$to_user_id = $event->getEventParam('EmailEventToUserId');
$email_event_type = $event->getEventParam('EmailEventType');
-
- $this->Application->setUnitOption('emailmessages', 'AutoLoad', false);
- $message_object = &$this->Application->recallObject('emailmessages');
-
+
+ $message_object = &$this->Application->recallObject('emailmessages', null, Array('skip_autoload' => true));
$event_table = $this->Application->getUnitOption('emailevents', 'TableName');
$event_object = &$event->getObject();
@@ -167,10 +165,7 @@
$message_template = $message_object->GetDBField('Template')."\r\n".$footer;
// add footer: end
- $old_autoload = $this->Application->getUnitOption('u', 'AutoLoad');
- $this->Application->setUnitOption('u', 'AutoLoad', false);
-
- $from_user_object = &$this->Application->recallObject('u.-email'.$from_user_id);
+ $from_user_object = &$this->Application->recallObject('u.-email'.$from_user_id, null, Array('skip_autoload' => true));
$from_user_object->Load($from_user_id);
// here if we don't have from_user loaded, it takes a default user from config values
if ( $from_user_object->IsLoaded() ) {
@@ -181,13 +176,11 @@
$from_user_email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
}
- $to_user_object = &$this->Application->recallObject('u.-email'.$to_user_id);
+ $to_user_object = &$this->Application->recallObject('u.-email'.$to_user_id, null, Array('skip_autoload' => true));
$to_user_object->Load($to_user_id);
$to_user_email = $to_user_object->GetDBField('Email');
$to_user_name = trim($to_user_object->GetDBField('FirstName').' '.$to_user_object->GetDBField('LastName'));
- $this->Application->setUnitOption('u', 'AutoLoad', $old_autoload);
-
if($direct_send_params){
$to_user_email = ( $direct_send_params['to_email'] ? $direct_send_params['to_email'] : $to_user_email );
$to_user_name = ( $direct_send_params['to_name'] ? $direct_send_params['to_name'] : $to_user_name );