Quellcode durchsuchen

Fixed bug on URL type post without Title

vbracco vor 16 Jahren
Ursprung
Commit
7598eed6bd
2 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
  1. 2 0
      admin/index.php
  2. 4 2
      index.php

+ 2 - 0
admin/index.php Datei anzeigen

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

+ 4 - 2
index.php Datei anzeigen

@@ -129,7 +129,8 @@ $template = new plantillas($conf->template);
129 129
                                                 $template->mostrarPlantilla();
130 130
                                                 break;
131 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 134
                                                 $output = array($formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
134 135
                                                 
135 136
                                                 $template->cargarPlantilla($input, $output, "template_url");
@@ -223,7 +224,8 @@ $template = new plantillas($conf->template);
223 224
                                 $template->mostrarPlantilla();
224 225
                                 break;
225 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 229
                                 $output = array($formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
228 230
                                 
229 231
                                 $template->cargarPlantilla($input, $output, "template_url");