Index: branches/unlabeled/unlabeled-1.79.4/core/kernel/db/db_event_handler.php =================================================================== diff -u -r6878 -r6881 --- branches/unlabeled/unlabeled-1.79.4/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 6878) +++ branches/unlabeled/unlabeled-1.79.4/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 6881) @@ -713,7 +713,7 @@ } } } - + /** * Add filters found in session * @@ -732,7 +732,7 @@ $object->addFilter($filter_field, $filter_params['value'], $filter_type, FLT_SEARCH); } } - + // add custom filter $view_name = $this->Application->RecallVar($event->getPrefixSpecial().'_current_view'); $custom_filters = $this->Application->RecallPersistentVar($event->getPrefixSpecial().'_custom_filter.'.$view_name); @@ -1594,7 +1594,7 @@ $this->Application->StoreVar('opener_stack', serialize($opener_stack));*/ } - + /** * Create search filters based on search query * @@ -1604,7 +1604,7 @@ function OnSearch(&$event) { $event->setPseudoClass('_List'); - + $search_helper =& $this->Application->recallObject('SearchHelper'); $search_helper->performSearch($event); } @@ -1932,6 +1932,7 @@ function OnExportBegin(&$event) { $export_helper =& $this->Application->recallObject('CatItemExportHelper'); + /* @var $export_helper kCatDBItemExportHelper */ $export_helper->OnExportBegin($event); } Index: branches/unlabeled/unlabeled-1.1.98/themes/default/misc/right_recommend.tpl =================================================================== diff -u -r15 -r6881 --- branches/unlabeled/unlabeled-1.1.98/themes/default/misc/right_recommend.tpl (.../right_recommend.tpl) (revision 15) +++ branches/unlabeled/unlabeled-1.1.98/themes/default/misc/right_recommend.tpl (.../right_recommend.tpl) (revision 6881) @@ -5,7 +5,7 @@ - "> + "> Index: branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php =================================================================== diff -u -r6826 -r6881 --- branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 6826) +++ branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 6881) @@ -935,4 +935,14 @@ $email_object->attachFile($path); } } + + function CaptchaImage($params){ + $captcha_helper =& $this->Application->recallObject('CaptchaHelper'); + $captcha_helper->GenerateCaptchaImage( + $this->Application->RecallVar($this->Application->GetVar('var')), + $this->Application->GetVar('w'), + $this->Application->GetVar('h'), + true + ); + } } Index: branches/unlabeled/unlabeled-1.15.2/core/units/general/cat_tag_processor.php =================================================================== diff -u -r6730 -r6881 --- branches/unlabeled/unlabeled-1.15.2/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 6730) +++ branches/unlabeled/unlabeled-1.15.2/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 6881) @@ -102,6 +102,7 @@ function ExportStatus($params) { $export_object =& $this->Application->recallObject('CatItemExportHelper'); + /* @var $export_object kCatDBItemExportHelper */ $event = new kEvent($this->getPrefixSpecial().':OnDummy'); Index: branches/unlabeled/unlabeled-1.3.2/core/units/general/helpers/helpers_config.php =================================================================== diff -u -r6859 -r6881 --- branches/unlabeled/unlabeled-1.3.2/core/units/general/helpers/helpers_config.php (.../helpers_config.php) (revision 6859) +++ branches/unlabeled/unlabeled-1.3.2/core/units/general/helpers/helpers_config.php (.../helpers_config.php) (revision 6881) @@ -16,5 +16,6 @@ Array('pseudo'=>'ClipboardHelper','class'=>'kClipboardHelper','file'=>'clipboard_helper.php','build_event'=>'','require_classes'=>'kHelper'), Array('pseudo'=>'ColumnPickerHelper','class'=>'kColumnPickerHelper','file'=>'col_picker_helper.php','build_event'=>'','require_classes'=>'kHelper'), Array('pseudo'=>'ThemesHelper','class'=>'kThemesHelper','file'=>'themes_helper.php','build_event'=>'','require_classes'=>'kHelper'), + Array('pseudo'=>'CaptchaHelper','class'=>'kCaptchaHelper','file'=>'captcha_helper.php','build_event'=>'','require_classes'=>'kHelper'), ), ); \ No newline at end of file Index: branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php =================================================================== diff -u -r6873 -r6881 --- branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php (.../application.php) (revision 6873) +++ branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php (.../application.php) (revision 6881) @@ -604,7 +604,7 @@ if (file_exists(KERNEL_PATH.'/constants.php')) { k4_include_once(KERNEL_PATH.'/constants.php'); } - + if (!$this->ModuleInfo) return false; foreach($this->ModuleInfo as $module_name => $module_info) { @@ -847,7 +847,7 @@ { return $this->Session->RemovePersistentVar($var); } - + /** * Restores Session variable to it's db version * @@ -878,7 +878,7 @@ { return $this->Session->RecallPersistentVar($var, $default); } - + /** * Stores variable $val in session under name $var * @@ -898,7 +898,7 @@ { $this->Session->StorePersistentVar($var, $val); } - + function StoreVarDefault($var, $val) { $session =& $this->recallObject('Session'); @@ -1574,16 +1574,16 @@ $user_id = $session->GetField('PortalUserId'); if (!$user_id && $user_id != -1) $user_id = -2; $this->SetVar('u.current_id', $user_id); - + if (!$this->IsAdmin()) { // needed for "profile edit", "registration" forms ON FRONT ONLY $this->SetVar('u_id', $user_id); } - + $this->StoreVar('user_id', $user_id); if ($this->GetVar('expired') == 1) { - // this parameter is set only from admin + // this parameter is set only from admin $user =& $this->recallObject('u.current'); $user->SetError('ValidateLogin', 'session_expired', 'la_text_sess_expired'); } @@ -1592,7 +1592,7 @@ $http_query =& $this->recallObject('HTTPQuery'); $http_query->writeRequestLog(DBG_REQUREST_LOG); } - + if ($user_id != -2) { // normal users + root $this->LoadPersistentVars(); @@ -1607,7 +1607,7 @@ { $this->Session->LoadPersistentVars(); } - + function LoadCache() { $cache_key = $this->GetVar('t').$this->GetVar('m_theme').$this->GetVar('m_lang').$this->IsAdmin(); $query = sprintf("SELECT PhraseList, ConfigVariables FROM %s WHERE Template = %s", Index: branches/unlabeled/unlabeled-1.5.50/themes/default/search_results/cat_search_results.tpl =================================================================== diff -u -r1572 -r6881 --- branches/unlabeled/unlabeled-1.5.50/themes/default/search_results/cat_search_results.tpl (.../cat_search_results.tpl) (revision 1572) +++ branches/unlabeled/unlabeled-1.5.50/themes/default/search_results/cat_search_results.tpl (.../cat_search_results.tpl) (revision 6881) @@ -20,8 +20,8 @@
@@ -17,7 +17,7 @@ - +
" class="button">

-

"> > - "> > + "> > + "> >
@@ -109,7 +109,7 @@ - + @@ -135,7 +135,7 @@
- + Index: branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r6878 -r6881 --- branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 6878) +++ branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 6881) @@ -747,7 +747,7 @@ $object->SetDBField($field, $this->SearchField($params)); $view_name = $this->Application->RecallVar($this->getPrefixSpecial().'_current_view'); $custom_filter = $this->Application->RecallPersistentVar($this->getPrefixSpecial().'_custom_filter.'.$view_name); - + $ret = $this->PredefinedOptions($params); $object->SetDBField($field, $saved_value); return $ret; @@ -1657,6 +1657,12 @@ return $ret; } + function FieldTotal($params) + { + $list =& $this->GetList($params); + + return $list->getTotal($this->SelectParam($params, 'field,name'), $params['function']); + } } ?> \ No newline at end of file Index: branches/unlabeled/unlabeled-1.102.2/kernel/parser.php =================================================================== diff -u -r6838 -r6881 --- branches/unlabeled/unlabeled-1.102.2/kernel/parser.php (.../parser.php) (revision 6838) +++ branches/unlabeled/unlabeled-1.102.2/kernel/parser.php (.../parser.php) (revision 6881) @@ -613,11 +613,11 @@ $sql = 'SELECT ValueList FROM '.GetTablePrefix().'CustomField WHERE FieldName = %s AND Type = %s'; $values = $application->Conn->GetOne( sprintf($sql, $application->DB->qstr($field), $item_type ) ); - + // 2. replace any sqls found there $objConfigDummy = new clsConfigAdminItem(); $values = $objConfigDummy->replace_sql($values); - + if(!$values) return ''; if( GetVar($field) ) @@ -964,9 +964,10 @@ if( getArrayValue($attribs, '_confirmtemplate') ) { $url_params['Confirm'] = $attribs['_confirmtemplate']; - $url_params['DestTemplate'] = $var_list['t']; + $url_params['DestTemplate'] = $_REQUEST['DestTemplate'] ? $_REQUEST['DestTemplate'] : $var_list['t']; } if( getArrayValue($attribs, '_errortemplate') ) $url_params['Error'] = $attribs['_errortemplate']; + if( getArrayValue($attribs, '_captchatemplate') ) $url_params['Captcha'] = $attribs['_captchatemplate']; } break; @@ -977,7 +978,7 @@ } else { - $var_list_update['t'] = getArrayValue($_GET, 'DestTemplate') ? $_GET['DestTemplate'] : 'index'; + $var_list_update['t'] = getArrayValue($_GET, 'DestTemplate') ? $_GET['DestTemplate'] : 'index'; } break; @@ -3590,8 +3591,10 @@ */ function m_sitemap($attribs = array()) { - global $objModules, $objConfig, $objCatList; + global $objModules, $objConfig, $objCatList, $m_var_list; + $backup_m_var_list = $m_var_list; + $html_attribs = ExtraAttributes($attribs); $mod_name = getArrayValue($attribs, "_modulename"); @@ -3760,6 +3763,8 @@ $ret.= "\n\n"; } + $m_var_list = $backup_m_var_list; + return $ret; } Index: branches/unlabeled/unlabeled-1.76.2/kernel/frontaction.php =================================================================== diff -u -r6145 -r6881 --- branches/unlabeled/unlabeled-1.76.2/kernel/frontaction.php (.../frontaction.php) (revision 6145) +++ branches/unlabeled/unlabeled-1.76.2/kernel/frontaction.php (.../frontaction.php) (revision 6881) @@ -852,27 +852,56 @@ } else { - $Event =& $objMessageList->GetEmailEventObject("USER.SUGGEST"); - if(is_object($Event)) - { - if($Event->Get("Enabled")=="1") - { - $Event->Item = null; - $Event->SendToAddress($email); + $application =& kApplication::Instance(); + $got_string = $application->GetVar('captcha_string'); + if ($objConfig->Get("Suggest_Captcha") && !$application->GetVar('check_captcha')) { + $captcha_helper = $application->recallObject('CaptchaHelper'); + $captcha_code = $captcha_helper->GenerateCaptchaCode(); + $objSession->SetVariable('suggest_captcha_code', $captcha_code); + $application->StoreVar('suggest_email', $email); - $sql = "INSERT INTO ".GetTablePrefix()."SuggestMail (email,sent) VALUES ('".$email."','".adodb_mktime()."')"; - - $rs = $adodbConnection->Execute($sql); - $objSession->SetVariable('suggest_result', language("lu_suggest_success")." ".$email); - } + if ($var_list["DestTemplate"] != $_GET["Captcha"]) { + $var_list["DestTemplate"] = $var_list["t"]; + } + $var_list["t"] = $_GET["Captcha"]; } - $e =& $objMessageList->GetEmailEventObject("USER.SUGGEST",1); + else { + // if no captcha or captcha Ok + if (!$objConfig->Get("Suggest_Captcha") || $got_string == $application->RecallVar('suggest_captcha_code')) { + $Event =& $objMessageList->GetEmailEventObject("USER.SUGGEST"); + if(is_object($Event)) + { + if($Event->Get("Enabled")=="1") + { + $Event->Item = null; + $Event->SendToAddress($email); - if($e->Get("Enabled")==1) - $e->SendAdmin(); + $sql = "INSERT INTO ".GetTablePrefix()."SuggestMail (email,sent) VALUES ('".$email."','".adodb_mktime()."')"; - if(strlen($_GET["Confirm"])>0) - $var_list["t"] = $_GET["Confirm"]; + $rs = $adodbConnection->Execute($sql); + $objSession->SetVariable('suggest_result', language("lu_suggest_success")." ".$email); + } + } + $e =& $objMessageList->GetEmailEventObject("USER.SUGGEST",1); + + if($e->Get("Enabled")==1) + $e->SendAdmin(); + + if(strlen($_GET["Confirm"])>0) + $var_list["t"] = $_GET["Confirm"]; + + $application->RemoveVar('suggest_captcha_code'); + $application->RemoveVar('suggest_email'); + } + elseif ($got_string != $application->RecallVar('suggest_captcha_code')) { + // generate new captcha code in case of error + $captcha_helper = $application->recallObject('CaptchaHelper'); + $captcha_code = $captcha_helper->GenerateCaptchaCode(); + $objSession->SetVariable('suggest_captcha_code', $captcha_code); + + $objSession->SetVariable('suggest_result', language("lu_invalid_captcha")); + } + } } } else Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/grid_blocks.tpl =================================================================== diff -u -r6857 -r6881 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 6857) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 6881) @@ -161,8 +161,8 @@ - - + + "> @@ -323,7 +323,7 @@ - + - " id="" value="" tabindex="" size="" class="" datepickerIcon="admin/images/ddarrow.gif"> + " id="" value="" tabindex="" size="" class="" datepickerIcon="core/admin_templates/img/calendar_icon.gif"> ()