Completed
Push — master ( c97259...614dac )
by Nazar
04:31
created
components/modules/Comments/Comments.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -216,12 +216,12 @@  discard block
 block discarded – undo
216 216
 	 * @return false|array
217 217
 	 */
218 218
 	function tree_data ($item, $module, $parent = 0) {
219
-		$Cache	= $this->cache;
220
-		$L		= Language::instance();
219
+		$Cache = $this->cache;
220
+		$L = Language::instance();
221 221
 		if (($comments = $Cache->{"$module/$item/$L->clang"}) === false) {
222
-			$item		= (int)$item;
223
-			$parent		= (int)$parent;
224
-			$comments	= $this->db()->qfa(
222
+			$item = (int)$item;
223
+			$parent = (int)$parent;
224
+			$comments = $this->db()->qfa(
225 225
 				"SELECT
226 226
 					`id`,
227 227
 					`parent`,
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 			 * Cache only root tree data
249 249
 			 */
250 250
 			if ($parent == 0) {
251
-				$Cache->{"$module/$item/$L->clang"}	= $comments;
251
+				$Cache->{"$module/$item/$L->clang"} = $comments;
252 252
 			}
253 253
 		}
254 254
 		return $comments;
@@ -261,15 +261,15 @@  discard block
 block discarded – undo
261 261
 	 * @return string
262 262
 	 */
263 263
 	function tree_html ($comments) {
264
-		$L			= Language::instance();
265
-		$User		= User::instance();
264
+		$L = Language::instance();
265
+		$User = User::instance();
266 266
 		if (!is_array($comments) || !$comments) {
267 267
 			return '';
268 268
 		}
269
-		$content	= '';
269
+		$content = '';
270 270
 		foreach ($comments as $comment) {
271
-			$uniqid		= uniqid('comment_', true);
272
-			$content	.= str_replace($uniqid, $comment['text'], h::{'article.cs-comments-comment'}(
271
+			$uniqid = uniqid('comment_', true);
272
+			$content .= str_replace($uniqid, $comment['text'], h::{'article.cs-comments-comment'}(
273 273
 				h::{'img.cs-comments-comment-avatar'}([
274 274
 					'src'	=> $User->avatar($this->avatar_size, $comment['user']),
275 275
 					'alt'	=> $User->username($comment['user']),
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 	 * @return string
327 327
 	 */
328 328
 	function block ($item, $module) {
329
-		$L	= Language::prefix('comments_');
329
+		$L = Language::prefix('comments_');
330 330
 		return h::{'section#comments.cs-comments-comments'}(
331 331
 			$L->comments.':'.
332 332
 			(
Please login to merge, or discard this patch.