Browse Source

Fixed Notice: Undefined variable: postTitle

pecesama 16 years ago
parent
commit
720d8a7644
1 changed files with 7 additions and 5 deletions
  1. 7 5
      index.php

+ 7 - 5
index.php View File

279
 					$username = $user->getUserByID($register["id_user"]);
279
 					$username = $user->getUserByID($register["id_user"]);
280
 
280
 
281
 					$row['User'] = $username["name"];
281
 					$row['User'] = $username["name"];
282
-
283
-					$textile = new Textile();
282
+					
284
 					if (empty($register["title"])) {
283
 					if (empty($register["title"])) {
285
 						if (!empty($register["description"])) {
284
 						if (!empty($register["description"])) {
286
 							if (strlen($register["description"]) > 30) {
285
 							if (strlen($register["description"]) > 30) {
287
 								$postTitle = substr($register["description"], 0, 30)."...";
286
 								$postTitle = substr($register["description"], 0, 30)."...";
287
+							} else {
288
+								$postTitle = $register["description"];
288
 							}
289
 							}
290
+						} else {
291
+							$postTitle =  type2Text($register["type"]);
289
 						}
292
 						}
290
 					} else {
293
 					} else {
291
 						$postTitle = $register["title"];
294
 						$postTitle = $register["title"];
292
-					}
293
-					$postTitle = strip_tags($textile->TextileThis($postTitle));
295
+					}					
294
 
296
 
295
-					$row['Post_Title'] = $postTitle;
297
+					$row['Post_Title'] = strip_tags($postTitle);
296
 					$row['Comments_Number'] = $comment->countComments($register["id_post"]);
298
 					$row['Comments_Number'] = $comment->countComments($register["id_post"]);
297
 
299
 
298
 					$rows[] = $row;
300
 					$rows[] = $row;