Przeglądaj źródła

Fixed bug on URL type post without Title

vbracco 18 lat temu
rodzic
commit
7598eed6bd
2 zmienionych plików z 6 dodań i 2 usunięć
  1. 2 0
      admin/index.php
  2. 4 2
      index.php

+ 2 - 0
admin/index.php Wyświetl plik

261
 									$template->mostrarPlantilla();
261
 									$template->mostrarPlantilla();
262
 									break;
262
 									break;
263
 								case "url":
263
 								case "url":
264
+									
264
 									$input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editUrl}", "{editBody}");
265
 									$input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editUrl}", "{editBody}");
265
 									$output = array("4", $date, $_SESSION['user_id'], $title, $url, $body);
266
 									$output = array("4", $date, $_SESSION['user_id'], $title, $url, $body);
266
 									
267
 									
390
 									$template->mostrarPlantilla();
391
 									$template->mostrarPlantilla();
391
 									break;
392
 									break;
392
 								case "4":
393
 								case "4":
394
+									$register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
393
 									$input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
395
 									$input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
394
 									$output = array($register["id_post"], $formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
396
 									$output = array($register["id_post"], $formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
395
 									
397
 									

+ 4 - 2
index.php Wyświetl plik

129
                                                 $template->mostrarPlantilla();
129
                                                 $template->mostrarPlantilla();
130
                                                 break;
130
                                                 break;
131
                                         case "4":
131
                                         case "4":
132
-                                                $input = array("{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
132
+                                                $register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
133
+												$input = array("{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
133
                                                 $output = array($formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
134
                                                 $output = array($formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
134
                                                 
135
                                                 
135
                                                 $template->cargarPlantilla($input, $output, "template_url");
136
                                                 $template->cargarPlantilla($input, $output, "template_url");
223
                                 $template->mostrarPlantilla();
224
                                 $template->mostrarPlantilla();
224
                                 break;
225
                                 break;
225
                         case "4":
226
                         case "4":
226
-                                $input = array("{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
227
+                                $register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
228
+								$input = array("{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
227
                                 $output = array($formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
229
                                 $output = array($formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
228
                                 
230
                                 
229
                                 $template->cargarPlantilla($input, $output, "template_url");
231
                                 $template->cargarPlantilla($input, $output, "template_url");