]> git.mxchange.org Git - friendica.git/blobdiff - include/Photo.php
upgrading the photo and name update
[friendica.git] / include / Photo.php
index 95ccccc88df6da1bdf9702a55d61318e0a72e79d..0f5003a6f7839b7f24f8e92a117ac5eab633bed3 100644 (file)
@@ -167,5 +167,37 @@ class Photo {
        }
 
 
+
+       public function store($uid, $cid, $rid, $filename, $album, $scale, 
+               $profile = 0, $allow_cid = '', $allow_gid = '', $deny_cid = '', $deny_gid = '') {
+
+               $r = q("INSERT INTO `photo`
+                       ( `uid`, `contact-id`, `resource-id`, `created`, `edited`, `filename`, `album`, `height`, `width`, `data`, `scale`, `profile`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` )
+                       VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, '%s', '%s', '%s', '%s' )",
+                       intval($uid),
+                       intval($cid),
+                       dbesc($rid),
+                       dbesc(datetime_convert()),
+                       dbesc(datetime_convert()),
+                       dbesc(basename($filename)),
+                       dbesc($album),
+                       intval($this->height),
+                       intval($this->width),
+                       dbesc($this->imageString()),
+                       intval($scale),
+                       intval($profile),
+                       dbesc($allow_cid),
+                       dbesc($allow_gid),
+                       dbesc($deny_cid),
+                       dbesc($deny_gid)
+               );
+               return $r;
+       }
+
+
+
+
+
 }}
 
+