@@ -120,7 +120,8 @@ |
||
| 120 | 120 | sprintf($messages[1], $messages[3].' '.$this->versions['php']), |
| 121 | 121 | sprintf($messages[2], PHP_VERSION).'</p><p>'.$rollbackMessage |
| 122 | 122 | ); |
| 123 | - } elseif (!$this->isWpValid()) { |
|
| 123 | + } |
|
| 124 | + elseif (!$this->isWpValid()) { |
|
| 124 | 125 | printf($noticeTemplate, |
| 125 | 126 | sprintf($messages[0], $pluginName), |
| 126 | 127 | sprintf($messages[1], $messages[4].' '.$this->versions['wordpress']), |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * @return int|false |
| 21 | 21 | */ |
| 22 | 22 | public function deleteAllSessions($sessionCookiePrefix) |
| 23 | - { |
|
| 23 | + { |
|
| 24 | 24 | return $this->db->query(" |
| 25 | 25 | DELETE |
| 26 | 26 | FROM {$this->db->options} |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @return int|false |
| 34 | 34 | */ |
| 35 | 35 | public function deleteExpiredSessions($expiredSessions) |
| 36 | - { |
|
| 36 | + { |
|
| 37 | 37 | return $this->db->query(" |
| 38 | 38 | DELETE |
| 39 | 39 | FROM {$this->db->options} |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * @return array |
| 48 | 48 | */ |
| 49 | 49 | public function getExpiredSessions($sessionCookiePrefix, $limit) |
| 50 | - { |
|
| 50 | + { |
|
| 51 | 51 | return (array) $this->db->get_results(" |
| 52 | 52 | SELECT option_name AS name, option_value AS expiration |
| 53 | 53 | FROM {$this->db->options} |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * @return int |
| 63 | 63 | */ |
| 64 | 64 | public function getPostIdFromReviewId($metaReviewId) |
| 65 | - { |
|
| 65 | + { |
|
| 66 | 66 | $postId = $this->db->get_var(" |
| 67 | 67 | SELECT p.ID |
| 68 | 68 | FROM {$this->db->posts} AS p |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | * @return array |
| 81 | 81 | */ |
| 82 | 82 | public function getReviewCounts(array $args, $lastPostId = 0, $limit = 500) |
| 83 | - { |
|
| 83 | + { |
|
| 84 | 84 | return (array) $this->db->get_results(" |
| 85 | 85 | SELECT DISTINCT p.ID, m1.meta_value AS rating, m2.meta_value AS type |
| 86 | 86 | FROM {$this->db->posts} AS p |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @return array |
| 105 | 105 | */ |
| 106 | 106 | public function getReviewCountsFor($metaKey) |
| 107 | - { |
|
| 107 | + { |
|
| 108 | 108 | return (array) $this->db->get_results(" |
| 109 | 109 | SELECT DISTINCT m.meta_value AS name, COUNT(*) num_posts |
| 110 | 110 | FROM {$this->db->posts} AS p |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | * @return array |
| 122 | 122 | */ |
| 123 | 123 | public function getReviewIdsByType($reviewType) |
| 124 | - { |
|
| 124 | + { |
|
| 125 | 125 | $results = $this->db->get_col(" |
| 126 | 126 | SELECT DISTINCT m1.meta_value AS review_id |
| 127 | 127 | FROM {$this->db->posts} AS p |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | * @return array |
| 142 | 142 | */ |
| 143 | 143 | public function getReviewRatingsFromIds(array $postIds, $greaterThanId = 0, $limit = 100) |
| 144 | - { |
|
| 144 | + { |
|
| 145 | 145 | sort($postIds); |
| 146 | 146 | $postIds = array_slice($postIds, intval(array_search($greaterThanId, $postIds)), $limit); |
| 147 | 147 | $postIds = implode(',', $postIds); |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | * @return array |
| 167 | 167 | */ |
| 168 | 168 | public function getReviewsMeta($key, $status = 'publish') |
| 169 | - { |
|
| 169 | + { |
|
| 170 | 170 | $values = $this->db->get_col(" |
| 171 | 171 | SELECT DISTINCT m.meta_value |
| 172 | 172 | FROM {$this->db->postmeta} m |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | * @return string |
| 188 | 188 | */ |
| 189 | 189 | protected function getAndForCounts(array $args, $and = '') |
| 190 | - { |
|
| 190 | + { |
|
| 191 | 191 | $postIds = implode(',', array_filter(glsr_get($args, 'post_ids'))); |
| 192 | 192 | $termIds = implode(',', array_filter(glsr_get($args, 'term_ids'))); |
| 193 | 193 | if (!empty($args['type'])) { |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | * @return string |
| 208 | 208 | */ |
| 209 | 209 | protected function getInnerJoinForCounts(array $args, $innerJoin = '') |
| 210 | - { |
|
| 210 | + { |
|
| 211 | 211 | if (!empty(glsr_get($args, 'post_ids'))) { |
| 212 | 212 | $innerJoin.= "INNER JOIN {$this->db->postmeta} AS m3 ON p.ID = m3.post_id "; |
| 213 | 213 | } |
@@ -100,7 +100,8 @@ |
||
| 100 | 100 | if (1 == count($vars)) { |
| 101 | 101 | $value = htmlspecialchars(print_r($vars[0], true), ENT_QUOTES, 'UTF-8'); |
| 102 | 102 | printf('<div class="glsr-debug"><pre>%s</pre></div>', $value); |
| 103 | - } else { |
|
| 103 | + } |
|
| 104 | + else { |
|
| 104 | 105 | echo '<div class="glsr-debug-group">'; |
| 105 | 106 | foreach ($vars as $var) { |
| 106 | 107 | glsr_debug($var); |