Plugin Directory

Changeset 1508612


Ignore:
Timestamp:
10/05/2016 09:17:33 AM (9 years ago)
Author:
reviewbuilder
Message:

Minor issue fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • review-builder/trunk/com/controllers/Review.php

    r1508588 r1508612  
    3636    {
    3737        global $sgrb;
    38        
     38
    3939        $attributes = shortcode_atts(array(
    4040            'id' => '1',
     
    6969        global $sgrb;
    7070        $sgrb->includeCore('Template');
    71        
     71
    7272        $tempOptions = array();
    7373        $options = array();
     
    9292            $review = new SGRB_ReviewModel();
    9393            $isUpdate = false;
    94            
     94
    9595            if ($reviewId) {
    9696                $isUpdate = true;
     
    105105
    106106            $tempId = $review->getTemplate_id();
    107            
     107
    108108            if ($tempId) {
    109109                $template = new Template($tempName,$tempId);
     
    207207                    $options['captcha-on'] = $captchaOn;
    208208                }
    209                 $options['tags'] = json_encode($tagsArray);
    210             }
     209            }
     210            $options['tags'] = json_encode($tagsArray);
    211211            if ($disableWPcomments) {
    212212                $options['disableWPcomments'] = 1;
     
    271271                wp_create_tag($tags);
    272272            }
    273            
     273
    274274            $review->save();
    275275
     
    338338
    339339            $sgrbDataArray = array();
    340            
     340
    341341            $fields = SGRB_CategoryModel::finder()->findAll('review_id = %d', $sgrbId);
    342342            $sgrbOptions = $sgrbRev->getOptions();
     
    364364
    365365            $options = $sgrbRev->getOptions();
    366             $options = json_decode($options, true);         
     366            $options = json_decode($options, true);
    367367
    368368            $sgrbDataArray['title'] = $title;
     
    497497            $html .= $this->createReviewHtml($sgrbDataArray, true);
    498498        }
    499        
     499
    500500        return $html;
    501501    }
     
    580580            $sgrbWidgetWrapper = 'sgrb-widget-wrapper';
    581581        }
    582        
     582
    583583        if ($review[0]['options']['total-rate'] == 1 || SGRB_PRO_VERSION) {
    584584            $countRates = 0;
     
    612612                $totalRate = round($rating / $countRates);
    613613            }
    614            
     614
    615615        }
    616616        $commentsArray = array();
     
    626626                $approvedComments = SGRB_CommentModel::finder()->findAll('review_id = %d && approved = %d', array($review[0]['id'], 1));
    627627            }
    628            
     628
    629629            $commentsArray = $approvedComments;
    630630        }
     
    772772        }
    773773        $sgrbEachEditableRate = array();
    774        
     774
    775775        if ($currentCommentId) {
    776776            $hideForm = false;
     
    897897
    898898        $mainStyles = '';
    899        
     899
    900900        if ($review[0]['options']['rate-type'] == SGRB_RATE_TYPE_STAR) {
    901901            $sgrb->includeScript('core/scripts/jquery.rateyo');
     
    938938                    }
    939939                    $html .= '<div class="sgrb-rate-each-skin-wrapper"><input class="sgrb-each-category-total" name="" type="hidden" value="'.$eachCategoryRate.'"><div class="rateYoTotal"></div><div class="sgrb-counter"></div></div></div>';
    940                    
     940
    941941                    $categoriesToRate .= '<input class="sgrb-fieldId" name="field[]" type="hidden" value="'.esc_attr($category->getId()).'">';
    942942                    $categoriesToRate .= '<div class="sgrb-row-category" '.$eachCategoryHide.'>
     
    11311131            }
    11321132        }
    1133        
     1133
    11341134        $commentForm = '<div class="sgrb-user-comment-wrapper" style="background-color: '.@$review[0]['options']['total-rate-background-color'].';color: '.$review[0]['options']['rate-text-color'].';">
    11351135                            <div class="sgrb-hide-show-wrapper">
     
    12011201                    </div>';
    12021202
    1203        
     1203
    12041204        if ($isWidget) {
    12051205            $commentForm = '';
     
    12121212        $sgrbTags = array();
    12131213        $sgrbTags = json_decode(@$review[0]['options']['tags']);
    1214         if (SGRB_PRO_VERSION && !empty($sgrbTags)) {
     1214        if (!empty($sgrbTags)) {
    12151215            $commentForm .= '<div id="sgrb-review-tags-'.@$review[0]['id'].'" class="sgrb-tags-wrapper"><strong>Tags: </strong>';
    12161216            $tagIndex = 0;
     
    13061306                $currentUser = wp_get_current_user();
    13071307                $currentUserName = $currentUser->user_nicename;
    1308                 $subject = 'Review Builder Wordpress plugin.'; 
     1308                $subject = 'Review Builder Wordpress plugin.';
    13091309                $blogName = get_option('blogname');
    13101310                $editUrl = $sgrb->adminUrl('Comment/index').'sgrb_allComms&id='.$reviewId;
     
    13191319                $currentUser = wp_get_current_user();
    13201320                $currentUserName = $currentUser->user_nicename;
    1321                 $subject = 'Review Builder Wordpress plugin.'; 
     1321                $subject = 'Review Builder Wordpress plugin.';
    13221322                $blogName = get_option('blogname');
    13231323                $editUrl = $sgrb->adminUrl('Comment/index').'sgrb_allComms&id='.$reviewId;
     
    13611361                }
    13621362            }
    1363            
     1363
    13641364            // if new insert, save the rater
    13651365            if ($lastComId) {
Note: See TracChangeset for help on using the changeset viewer.