]> git.mxchange.org Git - friendica.git/commitdiff
Last minutes changes
authorMichael <heluecht@pirati.ca>
Sat, 7 Jan 2017 13:52:30 +0000 (13:52 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 7 Jan 2017 13:52:30 +0000 (13:52 +0000)
include/dbstructure.php
include/diaspora.php
mod/photos.php

index 8f47dc16e929ea4bb0afc697654796e4e90c35f3..e519562b490a89c1fe7b24218e1e2d51aa03238b 100644 (file)
@@ -806,7 +806,9 @@ function db_definition($charset) {
                                        ),
                        "indexes" => array(
                                        "PRIMARY" => array("id"),
-                                       "uid_gid_contactid" => array("UNIQUE", "uid","gid","contact-id"),
+                                       "cid_contactid" => array("cid", "contact-id"),
+                                       "uid_contactid" => array("uid", "contact-id"),
+                                       "uid_gid_contactid" => array("UNIQUE", "uid", "gid", "contact-id"),
                                        )
                        );
        $database["gserver"] = array(
@@ -1160,6 +1162,7 @@ function db_definition($charset) {
                                        "uid_contactid" => array("uid", "contact-id"),
                                        "uid_profile" => array("uid", "profile"),
                                        "uid_album_created" => array("uid", "album(32)", "created"),
+                                       "uid_album_resource-id_created" => array("uid", "album(32)", "resource-id(64)", "created"),
                                        "resource-id" => array("resource-id(64)"),
                                        )
                        );
index 2b9e61331f0b21e0c2269b7f87a7a14d23ab90af..54bc744541e2c50a522647ce390a4f598f5cc6c8 100644 (file)
@@ -766,7 +766,7 @@ class Diaspora {
                        intval($uid),
                        dbesc($nurl_sql)
                );
-               if(dbm::is_result($r)) {
+               if (dbm::is_result($r)) {
                        return $r[0];
                }
 
index 4b6704a719e2e8a0bd5a711459efcc86fc265013..4880e7feb76c703cea3429fa3e625f2d95418f84 100644 (file)
@@ -182,11 +182,11 @@ function photos_post(&$a) {
                        return; // NOTREACHED
                }
 
-               $r = qu("SELECT count(*) FROM `photo` WHERE `album` = '%s' AND `uid` = %d",
+               $r = qu("SELECT `album` FROM `photo` WHERE `album` = '%s' AND `uid` = %d",
                        dbesc($album),
                        intval($page_owner_uid)
                );
-               if (! dbm::is_result($r)) {
+               if (!dbm::is_result($r)) {
                        notice( t('Album not found.') . EOL);
                        goaway($_SESSION['photo_return']);
                        return; // NOTREACHED