Plugin Directory

Changeset 1440822


Ignore:
Timestamp:
06/21/2016 10:35:21 AM (10 years ago)
Author:
reviewbuilder
Message:

Minor bug fixed

File:
1 edited

Legend:

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

    r1440780 r1440822  
    3232    {
    3333        global $sgrb;
    34        
     34
    3535        $attributes = shortcode_atts(array(
    3636            'id' => '1',
     
    9494                    return;
    9595                }
    96                
     96
    9797            }
    9898
     
    100100
    101101            $tempId = $review->getTemplate_id();
    102            
     102
    103103            if ($tempId) {
    104104                $template = new Template($tempName,$tempId);
     
    195195                exit();
    196196            }
    197            
     197
    198198            $review->save();
    199199
     
    258258
    259259            $sgrbDataArray = array();
    260            
     260
    261261            $fields = SGRB_CategoryModel::finder()->findAll('review_id = %d', $sgrbId);
    262262            $sgrbOptions = $sgrbRev->getOptions();
     
    283283
    284284            $options = $sgrbRev->getOptions();
    285             $options = json_decode($options, true);         
     285            $options = json_decode($options, true);
    286286
    287287            $sgrbDataArray['title'] = $title;
    288             $sgrbDataArray['notify'] = $options["notify"];
    289             $sgrbDataArray['required-title-checkbox'] = $options["required-title-checkbox"];
    290             $sgrbDataArray['required-email-checkbox'] = $options["required-email-checkbox"];
    291             $sgrbDataArray['auto-approve-checkbox'] = $options["auto-approve-checkbox"];
    292             $sgrbDataArray['sgrb-google-search-on'] = $options["sgrb-google-search-on"];
    293             $sgrbDataArray['total-rate'] = $options["total-rate"];
    294             $sgrbDataArray['total-rate-background-color'] = $options["total-rate-background-color"];
    295             $sgrbDataArray['rate-type'] = $options["rate-type"];
    296             $sgrbDataArray['skin-color'] = $options["skin-color"];
    297             $sgrbDataArray['rate-text-color'] = $options["rate-text-color"];
    298             $sgrbDataArray['template-font'] = $options["template-font"];
    299             $sgrbDataArray['template-background-color'] = $options["template-background-color"];
    300             $sgrbDataArray['template-text-color'] = $options["template-text-color"];
     288            $sgrbDataArray['notify'] = @$options["notify"];
     289            $sgrbDataArray['required-title-checkbox'] = @$options["required-title-checkbox"];
     290            $sgrbDataArray['required-email-checkbox'] = @$options["required-email-checkbox"];
     291            $sgrbDataArray['auto-approve-checkbox'] = @$options["auto-approve-checkbox"];
     292            $sgrbDataArray['sgrb-google-search-on'] = @$options["sgrb-google-search-on"];
     293            $sgrbDataArray['total-rate'] = @$options["total-rate"];
     294            $sgrbDataArray['total-rate-background-color'] = @$options["total-rate-background-color"];
     295            $sgrbDataArray['rate-type'] = @$options["rate-type"];
     296            $sgrbDataArray['skin-color'] = @$options["skin-color"];
     297            $sgrbDataArray['rate-text-color'] = @$options["rate-text-color"];
     298            $sgrbDataArray['template-font'] = @$options["template-font"];
     299            $sgrbDataArray['template-background-color'] = @$options["template-background-color"];
     300            $sgrbDataArray['template-text-color'] = @$options["template-text-color"];
    301301
    302302            if ($options['template-field-shadow-on']) {
    303                 $sgrbDataArray['template-field-shadow-on'] = $options['template-field-shadow-on'];
    304                 $sgrbDataArray['shadow-left-right'] = $options["shadow-left-right"];
    305                 $sgrbDataArray['shadow-top-bottom'] = $options["shadow-top-bottom"];
    306                 $sgrbDataArray['template-shadow-color'] = $options["template-shadow-color"];
    307                 $sgrbDataArray['shadow-blur'] = $options["shadow-blur"];
     303                $sgrbDataArray['template-field-shadow-on'] = @$options['template-field-shadow-on'];
     304                $sgrbDataArray['shadow-left-right'] = @$options["shadow-left-right"];
     305                $sgrbDataArray['shadow-top-bottom'] = @$options["shadow-top-bottom"];
     306                $sgrbDataArray['template-shadow-color'] = @$options["template-shadow-color"];
     307                $sgrbDataArray['shadow-blur'] = @$options["shadow-blur"];
    308308            }
    309309
     
    374374        $sgrb->includeScript('core/scripts/sgrbRequestHandler');
    375375
    376         $html = ''; 
     376        $html = '';
    377377        $commentForm = '';
    378378        $ratedHtml = false;
     
    392392            $review[0]['options']['rate-text-color'] = '#4c4c4c';
    393393        }
    394        
     394
    395395        if ($review[0]['options']['total-rate'] == 1 || SGRB_PRO_VERSION) {
    396396            $countRates = 0;
     
    414414            }
    415415            else {
    416                 $totalRate = floor($rating / $countRates); 
    417             }
    418            
     416                $totalRate = floor($rating / $countRates);
     417            }
     418
    419419        }
    420420
     
    574574        $html .= '<input class="sgrb-rate-text-color" type="hidden" value="'.esc_attr($review[0]['options']['rate-text-color']).'">';
    575575        $html .= '<input class="sgrb-rate-background-color" type="hidden" value="'.esc_attr($review[0]['options']['total-rate-background-color']).'">';
    576        
     576
    577577        $totalRateHtml = '<div class="sgrb-total-rate-wrapper" style="background-color:'.esc_attr($review[0]['options']['total-rate-background-color']).';color: '.$review[0]['options']['rate-text-color'].';">
    578578                    <div class="sgrb-total-rate-title">
     
    582582
    583583        $mainStyles = '';
    584        
     584
    585585        if ($review[0]['options']['rate-type'] == SGRB_RATE_TYPE_STAR) {
    586586            $sgrb->includeScript('core/scripts/jquery.rateyo');
     
    699699        $ratedFields['fields'] = $_POST['field'];
    700700        $ratedFields['rates'] = $_POST['rate'];
    701        
     701
    702702        $reviewId = $_POST['reviewId'];
    703703        $currentReview = SGRB_ReviewModel::finder()->findByPk($reviewId);
     
    743743                $currentUser = wp_get_current_user();
    744744                $currentUserName = $currentUser->user_nicename;
    745                 $subject = 'Review Builder Wordpress plugin.'; 
     745                $subject = 'Review Builder Wordpress plugin.';
    746746                $blogName = get_option('blogname');
    747747                $editUrl = $sgrb->adminUrl('Comment/index').'sgrb_allComms&id='.$reviewId;
     
    756756                $currentUser = wp_get_current_user();
    757757                $currentUserName = $currentUser->user_nicename;
    758                 $subject = 'Review Builder Wordpress plugin.'; 
     758                $subject = 'Review Builder Wordpress plugin.';
    759759                $blogName = get_option('blogname');
    760760                $editUrl = $sgrb->adminUrl('Comment/index').'sgrb_allComms&id='.$reviewId;
     
    810810        $start = $_POST['itemsRangeStart'];
    811811        $perPage = $_POST['perPage'];
    812        
     812
    813813        $approvedComments = SGRB_CommentModel::finder()->findAll('review_id = %d && approved = %d GROUP BY cdate DESC LIMIT '.$start.', '.$perPage.' ' , array($_POST['review'], 1));
    814814
Note: See TracChangeset for help on using the changeset viewer.