Index: branches/unlabeled/unlabeled-1.62.2/core/kernel/db/db_tag_processor.php
===================================================================
diff -u -r5883 -r5911
--- branches/unlabeled/unlabeled-1.62.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 5883)
+++ branches/unlabeled/unlabeled-1.62.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 5911)
@@ -416,8 +416,8 @@
function NotLastItem($params)
{
- $object =& $this->getObject($params); // maybe we should use $this->GetList($params) instead
- return ($object->CurrentIndex < min($object->PerPage, $object->RecordsCount) - 1);
+ $object =& $this->getList($params); // maybe we should use $this->GetList($params) instead
+ return ($object->CurrentIndex < min($object->PerPage == -1 ? $object->RecordsCount : $object->PerPage, $object->RecordsCount) - 1);
}
function PageLink($params)
Index: branches/unlabeled/unlabeled-1.14.2/core/kernel/utility/email.php
===================================================================
diff -u -r5653 -r5911
--- branches/unlabeled/unlabeled-1.14.2/core/kernel/utility/email.php (.../email.php) (revision 5653)
+++ branches/unlabeled/unlabeled-1.14.2/core/kernel/utility/email.php (.../email.php) (revision 5911)
@@ -273,7 +273,7 @@
$content_type .= $this->LF('multipart/alternative; boundary="----='.$this->EmailBoundary.'"');
}else{
$content_type .= $this->LF('text/plain;');
- $content_type .= $this->LF(" ".'charset='.$this->Charset);
+ $content_type .= $this->LF(" ".'charset='.$this->Charset);
}
return $content_type;
Index: branches/unlabeled/unlabeled-1.63.2/kernel/units/users/users_event_handler.php
===================================================================
diff -u -r5883 -r5911
--- branches/unlabeled/unlabeled-1.63.2/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 5883)
+++ branches/unlabeled/unlabeled-1.63.2/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 5911)
@@ -730,87 +730,84 @@
function OnForgotPassword(&$event){
- $user_object = &$this->Application->recallObject('u.forgot', null, Array('skip_autoload' => true));
- $user_current_object = &$this->Application->recallObject('u');
+ $user_object = &$this->Application->recallObject('u.forgot', null, Array('skip_autoload' => true));
+ $user_current_object = &$this->Application->recallObject('u');
- $username = $this->Application->GetVar('username');
- $email = $this->Application->GetVar('email');
- $found = false;
- $allow_reset = true;
+ $username = $this->Application->GetVar('username');
+ $email = $this->Application->GetVar('email');
+ $found = false;
+ $allow_reset = true;
- if( strlen($username) )
- {
- if( $user_object->Load(array('Login'=>$username)) )
- $found = ($user_object->GetDBField("Login")==$username && $user_object->GetDBField("Status")==1) && strlen($user_object->GetDBField("Password"));
- }
- else if( strlen($email) )
- {
- if( $user_object->Load(array('Email'=>$email)) )
- $found = ($user_object->GetDBField("Email")==$email && $user_object->GetDBField("Status")==1) && strlen($user_object->GetDBField("Password"));
- }
+ if( strlen($username) )
+ {
+ if( $user_object->Load(array('Login'=>$username)) )
+ $found = ($user_object->GetDBField("Login")==$username && $user_object->GetDBField("Status")==1) && strlen($user_object->GetDBField("Password"));
+ }
+ else if( strlen($email) )
+ {
+ if( $user_object->Load(array('Email'=>$email)) )
+ $found = ($user_object->GetDBField("Email")==$email && $user_object->GetDBField("Status")==1) && strlen($user_object->GetDBField("Password"));
+ }
- if( $user_object->isLoaded() )
- {
- $PwResetConfirm = $user_object->GetDBField('PwResetConfirm');
- $PwRequestTime = $user_object->GetDBField('PwRequestTime');
- $PassResetTime = $user_object->GetDBField('PassResetTime');
- //$MinPwResetDelay = $user_object->GetDBField('MinPwResetDelay');
- $MinPwResetDelay = $this->Application->ConfigValue('Users_AllowReset');
+ if( $user_object->isLoaded() )
+ {
+ $PwResetConfirm = $user_object->GetDBField('PwResetConfirm');
+ $PwRequestTime = $user_object->GetDBField('PwRequestTime');
+ $PassResetTime = $user_object->GetDBField('PassResetTime');
+ //$MinPwResetDelay = $user_object->GetDBField('MinPwResetDelay');
+ $MinPwResetDelay = $this->Application->ConfigValue('Users_AllowReset');
- $allow_reset = (strlen($PwResetConfirm) ?
- adodb_mktime() > $PwRequestTime + $MinPwResetDelay :
- adodb_mktime() > $PassResetTime + $MinPwResetDelay);
- }
+ $allow_reset = (strlen($PwResetConfirm) ?
+ adodb_mktime() > $PwRequestTime + $MinPwResetDelay :
+ adodb_mktime() > $PassResetTime + $MinPwResetDelay);
+ }
- if($found && $allow_reset)
- {
- $this->Application->StoreVar('tmp_user_id', $user_object->GetDBField("PortalUserId"));
- $this->Application->StoreVar('tmp_email', $user_object->GetDBField("Email"));
- $this->Application->EmailEventUser('INCOMMERCEUSER.PSWDC', $user_object->GetDBField("PortalUserId"));
+ if($found && $allow_reset)
+ {
+ $this->Application->StoreVar('tmp_user_id', $user_object->GetDBField("PortalUserId"));
+ $this->Application->StoreVar('tmp_email', $user_object->GetDBField("Email"));
+ $this->Application->EmailEventUser('INCOMMERCEUSER.PSWDC', $user_object->GetDBField("PortalUserId"));
+ $event->redirect = $this->Application->GetVar('template_success');
+ }
+ else
+ {
+ if(!strlen($username) && !strlen($email))
+ {
+ $user_current_object->ErrorMsgs['forgotpw_nodata'] = $this->Application->Phrase('lu_ferror_forgotpw_nodata');
+ $user_current_object->FieldErrors['Login']['pseudo'] = 'forgotpw_nodata';
+ $user_current_object->FieldErrors['Email']['pseudo'] = 'forgotpw_nodata';
+ }
+ else
+ {
+ if($allow_reset)
+ {
+ if( strlen($username) ){
+ $user_current_object->ErrorMsgs['unknown_username'] = $this->Application->Phrase('lu_ferror_unknown_username');
+ $user_current_object->FieldErrors['Login']['pseudo']='unknown_username';
+ }
+ if( strlen($email) ){
+ $user_current_object->ErrorMsgs['unknown_email'] = $this->Application->Phrase('lu_ferror_unknown_email');
+ $user_current_object->FieldErrors['Email']['pseudo']='unknown_email';
+ }
+ }
+ else
+ {
+ $user_current_object->ErrorMsgs['reset_denied'] = $this->Application->Phrase('lu_ferror_reset_denied');
+ if( strlen($username) ){
+ $user_current_object->FieldErrors['Login']['pseudo']='reset_denied';
+ }
+ if( strlen($email) ){
+ $user_current_object->FieldErrors['Email']['pseudo']='reset_denied';
+ }
+ }
+ }
- $event->redirect = $this->Application->GetVar('template_success');
+ if($user_current_object->FieldErrors){
+ $event->redirect = false;
+ }
+ }
- }
- else
- {
- if(!strlen($username) && !strlen($email))
- {
- $user_current_object->ErrorMsgs['forgotpw_nodata'] = $this->Application->Phrase('lu_ferror_forgotpw_nodata');
- $user_current_object->FieldErrors['Login']['pseudo'] = 'lu_ferror_forgotpw_nodata';
- }
- else
- {
-
- if($allow_reset)
- {
- if( strlen($username) ){
- $user_current_object->ErrorMsgs['unknown_username'] = $this->Application->Phrase('lu_ferror_unknown_username');
- $user_current_object->FieldErrors['Login']['pseudo']='unknown_username';
- }
- if( strlen($email) ){
- $user_current_object->ErrorMsgs['unknown_email'] = $this->Application->Phrase('lu_ferror_unknown_email');
- $user_current_object->FieldErrors['Email']['pseudo']='unknown_email';
- }
- }
- else
- {
- $user_current_object->ErrorMsgs['reset_denied'] = $this->Application->Phrase('lu_ferror_reset_denied');
- if( strlen($username) ){
- $user_current_object->FieldErrors['Login']['pseudo']='reset_denied';
- }
- if( strlen($email) ){
- $user_current_object->FieldErrors['Email']['pseudo']='reset_denied';
- }
- }
-
- }
-
- if($user_current_object->FieldErrors){
- $event->redirect = false;
- }
- }
-
}
/**
Index: branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php
===================================================================
diff -u -r5908 -r5911
--- branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php (.../application.php) (revision 5908)
+++ branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php (.../application.php) (revision 5911)
@@ -522,10 +522,10 @@
$sql = 'SELECT Filename FROM '.TABLE_PREFIX.'CategoryItems WHERE ItemResourceId = '.$resource_id.' AND CategoryId = '.$category_id;
$filename = $this->Conn->GetOne($sql);
- if (!$filename) {
+ /*if (!$filename) {
$sql = 'SELECT Filename FROM '.TABLE_PREFIX.'CategoryItems WHERE ItemResourceId = '.$resource_id.' AND PrimaryCat = 1';
$filename = $this->Conn->GetOne($sql);
- }
+ }*/
/*$sql = 'SELECT Filename
FROM '.$table.'
@@ -1416,24 +1416,24 @@
function Redirect($t='', $params=null, $prefix='', $index_file=null)
{
- if ($t == '' || $t === true) $t = $this->GetVar('t');
-
- // pass prefixes and special from previous url
$js_redirect = getArrayValue($params, 'js_redirect');
- if( isset($params['js_redirect']) ) unset($params['js_redirect']);
-
- if (!isset($params['pass'])) $params['pass'] = 'all';
- if ($this->GetVar('ajax') == 'yes' && $t == $this->GetVar('t')) {
- // redirects to the same template as current
- $params['ajax'] = 'yes';
+ if (preg_match("/external:(.*)/", $t, $rets)) {
+ $location = $rets[1];
}
+ else {
+ if ($t == '' || $t === true) $t = $this->GetVar('t');
- $params['__URLENCODE__'] = 1;
- $location = $this->HREF($t, $prefix, $params, $index_file);
+ // pass prefixes and special from previous url
+ if( isset($params['js_redirect']) ) unset($params['js_redirect']);
+ if (!isset($params['pass'])) $params['pass'] = 'all';
+ $params['__URLENCODE__'] = 1;
+ $location = $this->HREF($t, $prefix, $params, $index_file);
+ //echo " location : $location
";
+ }
+
$a_location = $location;
$location = "Location: $location";
- //echo " location : $location
";
if ($this->isDebugMode() && constOn('DBG_REDIRECT')) {
Index: branches/unlabeled/unlabeled-1.63.2/core/units/users/users_event_handler.php
===================================================================
diff -u -r5883 -r5911
--- branches/unlabeled/unlabeled-1.63.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 5883)
+++ branches/unlabeled/unlabeled-1.63.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 5911)
@@ -730,87 +730,84 @@
function OnForgotPassword(&$event){
- $user_object = &$this->Application->recallObject('u.forgot', null, Array('skip_autoload' => true));
- $user_current_object = &$this->Application->recallObject('u');
+ $user_object = &$this->Application->recallObject('u.forgot', null, Array('skip_autoload' => true));
+ $user_current_object = &$this->Application->recallObject('u');
- $username = $this->Application->GetVar('username');
- $email = $this->Application->GetVar('email');
- $found = false;
- $allow_reset = true;
+ $username = $this->Application->GetVar('username');
+ $email = $this->Application->GetVar('email');
+ $found = false;
+ $allow_reset = true;
- if( strlen($username) )
- {
- if( $user_object->Load(array('Login'=>$username)) )
- $found = ($user_object->GetDBField("Login")==$username && $user_object->GetDBField("Status")==1) && strlen($user_object->GetDBField("Password"));
- }
- else if( strlen($email) )
- {
- if( $user_object->Load(array('Email'=>$email)) )
- $found = ($user_object->GetDBField("Email")==$email && $user_object->GetDBField("Status")==1) && strlen($user_object->GetDBField("Password"));
- }
+ if( strlen($username) )
+ {
+ if( $user_object->Load(array('Login'=>$username)) )
+ $found = ($user_object->GetDBField("Login")==$username && $user_object->GetDBField("Status")==1) && strlen($user_object->GetDBField("Password"));
+ }
+ else if( strlen($email) )
+ {
+ if( $user_object->Load(array('Email'=>$email)) )
+ $found = ($user_object->GetDBField("Email")==$email && $user_object->GetDBField("Status")==1) && strlen($user_object->GetDBField("Password"));
+ }
- if( $user_object->isLoaded() )
- {
- $PwResetConfirm = $user_object->GetDBField('PwResetConfirm');
- $PwRequestTime = $user_object->GetDBField('PwRequestTime');
- $PassResetTime = $user_object->GetDBField('PassResetTime');
- //$MinPwResetDelay = $user_object->GetDBField('MinPwResetDelay');
- $MinPwResetDelay = $this->Application->ConfigValue('Users_AllowReset');
+ if( $user_object->isLoaded() )
+ {
+ $PwResetConfirm = $user_object->GetDBField('PwResetConfirm');
+ $PwRequestTime = $user_object->GetDBField('PwRequestTime');
+ $PassResetTime = $user_object->GetDBField('PassResetTime');
+ //$MinPwResetDelay = $user_object->GetDBField('MinPwResetDelay');
+ $MinPwResetDelay = $this->Application->ConfigValue('Users_AllowReset');
- $allow_reset = (strlen($PwResetConfirm) ?
- adodb_mktime() > $PwRequestTime + $MinPwResetDelay :
- adodb_mktime() > $PassResetTime + $MinPwResetDelay);
- }
+ $allow_reset = (strlen($PwResetConfirm) ?
+ adodb_mktime() > $PwRequestTime + $MinPwResetDelay :
+ adodb_mktime() > $PassResetTime + $MinPwResetDelay);
+ }
- if($found && $allow_reset)
- {
- $this->Application->StoreVar('tmp_user_id', $user_object->GetDBField("PortalUserId"));
- $this->Application->StoreVar('tmp_email', $user_object->GetDBField("Email"));
- $this->Application->EmailEventUser('INCOMMERCEUSER.PSWDC', $user_object->GetDBField("PortalUserId"));
+ if($found && $allow_reset)
+ {
+ $this->Application->StoreVar('tmp_user_id', $user_object->GetDBField("PortalUserId"));
+ $this->Application->StoreVar('tmp_email', $user_object->GetDBField("Email"));
+ $this->Application->EmailEventUser('INCOMMERCEUSER.PSWDC', $user_object->GetDBField("PortalUserId"));
+ $event->redirect = $this->Application->GetVar('template_success');
+ }
+ else
+ {
+ if(!strlen($username) && !strlen($email))
+ {
+ $user_current_object->ErrorMsgs['forgotpw_nodata'] = $this->Application->Phrase('lu_ferror_forgotpw_nodata');
+ $user_current_object->FieldErrors['Login']['pseudo'] = 'forgotpw_nodata';
+ $user_current_object->FieldErrors['Email']['pseudo'] = 'forgotpw_nodata';
+ }
+ else
+ {
+ if($allow_reset)
+ {
+ if( strlen($username) ){
+ $user_current_object->ErrorMsgs['unknown_username'] = $this->Application->Phrase('lu_ferror_unknown_username');
+ $user_current_object->FieldErrors['Login']['pseudo']='unknown_username';
+ }
+ if( strlen($email) ){
+ $user_current_object->ErrorMsgs['unknown_email'] = $this->Application->Phrase('lu_ferror_unknown_email');
+ $user_current_object->FieldErrors['Email']['pseudo']='unknown_email';
+ }
+ }
+ else
+ {
+ $user_current_object->ErrorMsgs['reset_denied'] = $this->Application->Phrase('lu_ferror_reset_denied');
+ if( strlen($username) ){
+ $user_current_object->FieldErrors['Login']['pseudo']='reset_denied';
+ }
+ if( strlen($email) ){
+ $user_current_object->FieldErrors['Email']['pseudo']='reset_denied';
+ }
+ }
+ }
- $event->redirect = $this->Application->GetVar('template_success');
+ if($user_current_object->FieldErrors){
+ $event->redirect = false;
+ }
+ }
- }
- else
- {
- if(!strlen($username) && !strlen($email))
- {
- $user_current_object->ErrorMsgs['forgotpw_nodata'] = $this->Application->Phrase('lu_ferror_forgotpw_nodata');
- $user_current_object->FieldErrors['Login']['pseudo'] = 'lu_ferror_forgotpw_nodata';
- }
- else
- {
-
- if($allow_reset)
- {
- if( strlen($username) ){
- $user_current_object->ErrorMsgs['unknown_username'] = $this->Application->Phrase('lu_ferror_unknown_username');
- $user_current_object->FieldErrors['Login']['pseudo']='unknown_username';
- }
- if( strlen($email) ){
- $user_current_object->ErrorMsgs['unknown_email'] = $this->Application->Phrase('lu_ferror_unknown_email');
- $user_current_object->FieldErrors['Email']['pseudo']='unknown_email';
- }
- }
- else
- {
- $user_current_object->ErrorMsgs['reset_denied'] = $this->Application->Phrase('lu_ferror_reset_denied');
- if( strlen($username) ){
- $user_current_object->FieldErrors['Login']['pseudo']='reset_denied';
- }
- if( strlen($email) ){
- $user_current_object->FieldErrors['Email']['pseudo']='reset_denied';
- }
- }
-
- }
-
- if($user_current_object->FieldErrors){
- $event->redirect = false;
- }
- }
-
}
/**
Index: branches/unlabeled/unlabeled-1.61.2/core/kernel/processors/main_processor.php
===================================================================
diff -u -r5903 -r5911
--- branches/unlabeled/unlabeled-1.61.2/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 5903)
+++ branches/unlabeled/unlabeled-1.61.2/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 5911)
@@ -906,6 +906,3 @@
}
}
}
-
-
-?>