]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
add link: in case of empty URL (self-post), prepend "Note: " to the title 30/head
authornodiscc <nodiscc@gmail.com>
Mon, 20 Oct 2014 17:14:52 +0000 (19:14 +0200)
committernodiscc <nodiscc@gmail.com>
Tue, 21 Oct 2014 14:18:25 +0000 (16:18 +0200)
 * Thanks to qwertygc (https://github.com/shaarli/Shaarli/pull/23)
 * Fix small typo

index.php

index 294600d0e001a5464395d190ad9014e8cdf082b0..01872f4df1d3ce78a056ab1a32f8a6650d2b2629 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1587,7 +1587,11 @@ function renderPage()
                                                }
                                        }
             }
-            if ($url=='') $url='?'.smallHash($linkdate); // In case of empty URL, this is just a text (with a link that point to itself)
+            if ($url=='') // In case of empty URL, this is just a text (with a link that points to itself)
+            {
+                $url='?'.smallHash($linkdate);
+                $title='Note: ';
+            }
             $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>$private);
         }