]> git.mxchange.org Git - friendica.git/blobdiff - mod/parse_url.php
Merge pull request #2261 from tobiasd/20160118-admin
[friendica.git] / mod / parse_url.php
index 97eebb89ab630ae2b9aa5a8417733baaa5fb4d43..28869b4c128d7ecd3d1f5b8436297b8b11aad5c5 100644 (file)
@@ -1,16 +1,20 @@
 <?php
-/* To-Do
-https://developers.google.com/+/plugins/snippet/
-
-<meta itemprop="name" content="Toller Titel">
-<meta itemprop="description" content="Eine tolle Beschreibung">
-<meta itemprop="image" content="http://maple.libertreeproject.org/images/tree-icon.png">
-
-<body itemscope itemtype="http://schema.org/Product">
-  <h1 itemprop="name">Shiny Trinket</h1>
-  <img itemprop="image" src="{image-url}" />
-  <p itemprop="description">Shiny trinkets are shiny.</p>
-</body>
+/** 
+ * @file mod/parse_url.php
+ * 
+ * @todo https://developers.google.com/+/plugins/snippet/
+ * 
+ * @verbatim
+ * <meta itemprop="name" content="Toller Titel">
+ * <meta itemprop="description" content="Eine tolle Beschreibung">
+ * <meta itemprop="image" content="http://maple.libertreeproject.org/images/tree-icon.png">
+ * 
+ * <body itemscope itemtype="http://schema.org/Product">
+ *   <h1 itemprop="name">Shiny Trinket</h1>
+ *   <img itemprop="image" src="{image-url}" />
+ *   <p itemprop="description">Shiny trinkets are shiny.</p>
+ * </body>
+ * @endverbatim
 */
 
 if(!function_exists('deletenode')) {
@@ -280,7 +284,8 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
        if (isset($keywords)) {
                $siteinfo["keywords"] = array();
                foreach ($keywords as $keyword)
-                       $siteinfo["keywords"][] = trim($keyword);
+                       if (!in_array(trim($keyword), $siteinfo["keywords"]))
+                               $siteinfo["keywords"][] = trim($keyword);
        }
 
        //$list = $xpath->query("head/meta[@property]");