aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-09 19:20:10 -0800
committerfriendica <info@friendica.com>2014-01-09 19:20:10 -0800
commita309bc0d478f5335853ed0cb7a0f0bfe41110643 (patch)
tree343ce7d473210f22020ebd9789304d7c891c5b07 /install
parent49882f2be4ef9d1b28c72f8101fe9b15d7176ff6 (diff)
downloadvolse-hubzilla-a309bc0d478f5335853ed0cb7a0f0bfe41110643.tar.gz
volse-hubzilla-a309bc0d478f5335853ed0cb7a0f0bfe41110643.tar.bz2
volse-hubzilla-a309bc0d478f5335853ed0cb7a0f0bfe41110643.zip
only let visitors remove their own files.
Diffstat (limited to 'install')
-rw-r--r--install/database.sql2
-rw-r--r--install/update.php11
2 files changed, 12 insertions, 1 deletions
diff --git a/install/database.sql b/install/database.sql
index ac8382162..d28128795 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -87,6 +87,7 @@ CREATE TABLE IF NOT EXISTS `attach` (
`aid` int(10) unsigned NOT NULL DEFAULT '0',
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`hash` char(64) NOT NULL DEFAULT '',
+ `creator` char(128) NOT NULL DEFAULT '0',
`filename` char(255) NOT NULL DEFAULT '',
`filetype` char(64) NOT NULL DEFAULT '',
`filesize` int(10) unsigned NOT NULL DEFAULT '0',
@@ -104,6 +105,7 @@ CREATE TABLE IF NOT EXISTS `attach` (
KEY `aid` (`aid`),
KEY `uid` (`uid`),
KEY `hash` (`hash`),
+ KEY `creator` (`creator`),
KEY `filename` (`filename`),
KEY `filetype` (`filetype`),
KEY `filesize` (`filesize`),
diff --git a/install/update.php b/install/update.php
index 5025222a6..3e04df51b 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1089 );
+define( 'UPDATE_VERSION' , 1090 );
/**
*
@@ -977,3 +977,12 @@ ADD `deny_gid` MEDIUMTEXT NOT NULL DEFAULT ''");
return UPDATE_FAILED;
}
+function update_r1089() {
+ $r = q("ALTER TABLE `attach` ADD `creator` CHAR( 128 ) NOT NULL DEFAULT '' AFTER `hash` ,
+ADD INDEX ( `creator` ) ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+