]> git.mxchange.org Git - friendica.git/commitdiff
Get rid of the "guid" table. We don't need it anymore.
authorMichael Vogel <icarus@dabo.de>
Tue, 9 Feb 2016 09:21:10 +0000 (10:21 +0100)
committerMichael Vogel <icarus@dabo.de>
Tue, 9 Feb 2016 09:21:10 +0000 (10:21 +0100)
doc/database.md
doc/database/db_guid.md [deleted file]
include/dbstructure.php
include/items.php
mod/item.php

index a0b28f4e84dbf331300cadeec7498bb1a57c1fa7..e37df05e099e51bc65e3b2cec14964399c152923 100644 (file)
@@ -27,7 +27,6 @@ Database Tables
 | [group](help/database/db_group)                      | privacy groups, group info                       |
 | [group_member](help/database/db_group_member)        | privacy groups, member info                      |
 | [gserver](help/database/db_gserver)                  |                                                  |
-| [guid](help/database/db_guid)                        |                                                  |
 | [hook](help/database/db_hook)                        | plugin hook registry                             |
 | [intro](help/database/db_intro)                      |                                                  |
 | [item](help/database/db_item)                        | all posts                                        |
diff --git a/doc/database/db_guid.md b/doc/database/db_guid.md
deleted file mode 100644 (file)
index f607597..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Table guid
-==========
-
-| Field   | Description      | Type             | Null | Key | Default | Extra          |
-|---------|------------------|------------------|------|-----|---------|----------------|
-| id      | sequential ID    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
-| guid    |                  | varchar(255)     | NO   | MUL |         |                |
-| plink   |                  | varchar(255)     | NO   | MUL |         |                |
-| uri     |                  | varchar(255)     | NO   | MUL |         |                |
-| network |                  | varchar(32)      | NO   |     |         |                |
-
-Return to [database documentation](help/database)
index 96d18cd78959fcd01e5a6091c3faa033cd2dbf2f..ddf036f2c1cbe7edfedae0361d99e7523a9fecae 100644 (file)
@@ -748,21 +748,6 @@ function db_definition() {
                                        "nurl" => array("nurl"),
                                        )
                        );
-       $database["guid"] = array(
-                       "fields" => array(
-                                       "id" => array("type" => "int(10) unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
-                                       "guid" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "plink" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "uri" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "network" => array("type" => "varchar(32)", "not null" => "1", "default" => ""),
-                                       ),
-                       "indexes" => array(
-                                       "PRIMARY" => array("id"),
-                                       "guid" => array("guid"),
-                                       "plink" => array("plink"),
-                                       "uri" => array("uri"),
-                                       )
-                       );
        $database["hook"] = array(
                        "fields" => array(
                                        "id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
index 90c39a98897ad5cf1227b0bc0c230781074447d2..1af6fe1b522686e7cbe8285a62b3644e5c364bf2 100644 (file)
@@ -291,16 +291,6 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
        return $body;
 }
 
-function add_guid($item) {
-       $r = q("SELECT `guid` FROM `guid` WHERE `guid` = '%s' LIMIT 1", dbesc($item["guid"]));
-       if ($r)
-               return;
-
-       q("INSERT INTO `guid` (`guid`,`plink`,`uri`,`network`) VALUES ('%s','%s','%s','%s')",
-               dbesc($item["guid"]), dbesc($item["plink"]),
-               dbesc($item["uri"]), dbesc($item["network"]));
-}
-
 /**
  * Adds a "lang" specification in a "postopts" element of given $arr,
  * if possible and not already present.
@@ -778,9 +768,6 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                return 0;
        } elseif(count($r)) {
 
-               // Store the guid and other relevant data
-               add_guid($arr);
-
                $current_post = $r[0]['id'];
                logger('item_store: created item ' . $current_post);
 
index 8c5a479646ec992c98bd0b701e2a3cbdc51d012a..7e575a17e4f7e1d30c0949ddaf8ff9ae26f1fc3e 100644 (file)
@@ -844,9 +844,6 @@ function item_post(&$a) {
                // NOTREACHED
        }
 
-       // Store the guid and other relevant data
-       add_guid($datarray);
-
        $post_id = $r[0]['id'];
        logger('mod_item: saved item ' . $post_id);