Index: trunk/core/units/general/helpers/mod_rewrite_helper.php =================================================================== diff -u -N -r6428 -r6791 --- trunk/core/units/general/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 6428) +++ trunk/core/units/general/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 6791) @@ -429,6 +429,19 @@ } if ( $this->ProcessPage($url_parts, $vars) ) { + if (count($passed) == 1) {// passed contains only 1 value which is 'm' + // this may be search results page, so we need to find out the module, especially for old in-portal + foreach ($this->Application->ModuleInfo as $module_name => $module_data) + { + if (!$module_data['TemplatePath']) continue; + if( preg_match('/^'.preg_quote($module_data['TemplatePath'], '/').'/i', $vars['t']) ) + { + $module_prefix = $module_data['Var']; + break; + } + } + $passed[] = $module_prefix; + } return $vars; } Index: trunk/core/units/email_events/email_events_event_handler.php =================================================================== diff -u -N -r6625 -r6791 --- trunk/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 6625) +++ trunk/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 6791) @@ -196,6 +196,8 @@ $parser_params = $this->Application->Parser->Params; $direct_send_params['message_text'] = $message_body_additional; $this->Application->Parser->Params = array_merge_recursive2($this->Application->Parser->Params, $direct_send_params); + $message_template = str_replace('Application->Parser->Parse($message_template, 'email_template', 0); $this->Application->Parser->Params = $parser_params; Index: trunk/core/units/users/users_event_handler.php =================================================================== diff -u -N -r6625 -r6791 --- trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 6625) +++ trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 6791) @@ -357,7 +357,7 @@ $object =& $event->getObject(); $this->Application->SetVar('u_id', $object->GetID() ); - if($object->GetDBField('Status') == STATUS_ACTIVE) + if($object->GetDBField('Status') == STATUS_ACTIVE && !$this->Application->ConfigValue('User_Password_Auto')) { $email_as_login = $this->Application->ConfigValue('Email_As_Login'); list($login_field, $submit_field) = $email_as_login ? Array('Email', 'email') : Array('Login', 'login'); @@ -448,9 +448,15 @@ $cs_helper =& $this->Application->recallObject('CountryStatesHelper'); $cs_helper->CheckStateField($event, 'State', 'Country'); + $object =& $event->getObject( Array('skip_autoload' => true) ); + if ($this->Application->ConfigValue('User_Password_Auto')) { + $pass = makepassword4(rand(5,8)); + $object->SetField('Password', $pass); + $object->SetField('VerifyPassword', $pass); + $this->Application->SetVar('user_password',$pass); + } parent::OnCreate($event); - $object =& $event->getObject( Array('skip_autoload' => true) ); $this->Application->SetVar('u_id', $object->getID() ); Index: trunk/core/units/users/users_item.php =================================================================== diff -u -N -r6583 -r6791 --- trunk/core/units/users/users_item.php (.../users_item.php) (revision 6583) +++ trunk/core/units/users/users_item.php (.../users_item.php) (revision 6791) @@ -81,8 +81,14 @@ switch( $this->GetDBField('Status') ) { case 1: + if ($this->Application->ConfigValue('User_Password_Auto')) { + $this->Application->EmailEventAdmin('USER.VALIDATE', $this->GetID() ); + $this->Application->EmailEventUser('USER.VALIDATE', $this->GetID() ); + } + else { $this->Application->EmailEventAdmin('USER.ADD', $this->GetID() ); $this->Application->EmailEventUser('USER.ADD', $this->GetID() ); + } break; case 2: Index: trunk/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r6583 -r6791 --- trunk/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 6583) +++ trunk/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 6791) @@ -373,6 +373,7 @@ //'StylesXmlPath' => '../../inp_styles.xml', // 'Debug' => 1, 'Admin' => 1, + 'K4' => 1, ); return $oFCKeditor->CreateHtml(); @@ -487,6 +488,22 @@ return $timestamp; } + function CheckPermCache($params) + { + if ($this->Conn->GetOne('SELECT Data FROM '.TABLE_PREFIX.'Cache WHERE VarName = \'ForcePermCacheUpdate\'')) { + $this->Application->Redirect($params['cache_update_t'], array('continue' => 1)); + } + } + /** + * Checks if current protocol is SSL + * + * @param Array $params + * @return int + */ + function IsSSL($params) + { + return (PROTOCOL == 'https://')? 1 : 0; + } } ?> \ No newline at end of file Index: trunk/core/units/categories/cache_updater.php =================================================================== diff -u -N -r6093 -r6791 --- trunk/core/units/categories/cache_updater.php (.../cache_updater.php) (revision 6093) +++ trunk/core/units/categories/cache_updater.php (.../cache_updater.php) (revision 6791) @@ -223,6 +223,7 @@ function clearData() { $this->Conn->Query('DROP TABLE IF EXISTS '.$this->table); + $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName = \'ForcePermCacheUpdate\''); } function DoTheJob()