Project

General

Profile

Bug #3016 ยป 3016.patch

krileon, 21 November 2011 21:08

View differences:

components/com_comprofiler/plugin/user/plug_ratingfield/ratingfield.php
;
/* Load Necessary AJAX/Javascript */
if ( $_CB_framework->getUi() == 2 ) {
$ajaxUrl = $live_site . '/administrator/index3.php';
} else {
$ajaxUrl = $live_site . '/index2.php';
}
$ajaxUrl = cbSef( 'index.php?option=com_comprofiler&task=fieldclass&field=' . str_replace( 'Self', '', $inputName ) . '&function=savevalue&user=' . $userid . '&reason=profile', false, 'raw' );
$options = ( $mandatory ? "required:true, " : "" );
$options .= "cancel: '" . addslashes( CBTxt::T('Cancel Rating') ) . "'";
if ( $mode == 3 ) {
$options .= ", callback: ".
" function(value, link){ ".
" $.ajax( { type: 'POST',".
" url: '$ajaxUrl?option=com_comprofiler&task=fieldclass&field='+encodeURIComponent('".str_replace("Self","",$inputName)."')+'&function=savevalue&user=$userid&no_html=1&format=raw&reason=profile', ".
" url: '$ajaxUrl', ".
" data: '".str_replace("Self","",$inputName)."=' + encodeURIComponent( value ) + '&$cbSpoofField=' + encodeURIComponent('$cbSpoofString') + '&$regAntiSpamFieldName=' + encodeURIComponent('$regAntiSpZ')+ '&uid=$userid', ".
" success: function(response) { ".
" $('#".$containerPrefix."HOVER').html(response); ".
    (1-1/1)