support for OS files and add directory support to file/attach object
This commit is contained in:
parent
b41106f2fb
commit
4ae5445e03
7
boot.php
7
boot.php
@ -16,7 +16,7 @@ require_once('include/features.php');
|
||||
define ( 'FRIENDICA_PLATFORM', 'Friendica Red');
|
||||
define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||
define ( 'ZOT_REVISION', 1 );
|
||||
define ( 'DB_UPDATE_VERSION', 1025 );
|
||||
define ( 'DB_UPDATE_VERSION', 1026 );
|
||||
|
||||
define ( 'EOL', '<br />' . "\r\n" );
|
||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||
@ -223,6 +223,11 @@ define ( 'MAIL_ISREPLY', 0x0004);
|
||||
define ( 'MAIL_SEEN', 0x0008);
|
||||
|
||||
|
||||
define ( 'ATTACH_FLAG_DIR', 0x0001);
|
||||
define ( 'ATTACH_FLAG_OS', 0x0002);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Maximum number of "people who like (or don't like) this" that we will list by name
|
||||
*/
|
||||
|
@ -74,7 +74,7 @@ CREATE TABLE IF NOT EXISTS `addon` (
|
||||
KEY `hidden` (`hidden`),
|
||||
KEY `name` (`name`),
|
||||
KEY `installed` (`installed`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `attach` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
@ -85,6 +85,8 @@ CREATE TABLE IF NOT EXISTS `attach` (
|
||||
`filetype` char(64) NOT NULL DEFAULT '',
|
||||
`filesize` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`revision` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`folder` char(64) NOT NULL DEFAULT '',
|
||||
`flags` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`data` longblob NOT NULL,
|
||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
@ -101,12 +103,9 @@ CREATE TABLE IF NOT EXISTS `attach` (
|
||||
KEY `filesize` (`filesize`),
|
||||
KEY `created` (`created`),
|
||||
KEY `edited` (`edited`),
|
||||
KEY `filename_2` (`filename`),
|
||||
KEY `filetype_2` (`filetype`),
|
||||
KEY `filesize_2` (`filesize`),
|
||||
KEY `created_2` (`created`),
|
||||
KEY `edited_2` (`edited`),
|
||||
KEY `revision` (`revision`)
|
||||
KEY `revision` (`revision`),
|
||||
KEY `folder` (`folder`),
|
||||
KEY `flags` (`flags`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `auth_codes` (
|
||||
@ -391,7 +390,7 @@ CREATE TABLE IF NOT EXISTS `hook` (
|
||||
`priority` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `hook` (`hook`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `hubloc` (
|
||||
`hubloc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1025 );
|
||||
define( 'UPDATE_VERSION' , 1026 );
|
||||
|
||||
/**
|
||||
*
|
||||
@ -325,3 +325,10 @@ ADD INDEX ( `revision` ) ");
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
||||
function update_r1025() {
|
||||
$r = q("ALTER TABLE `attach` ADD `folder` CHAR( 64 ) NOT NULL DEFAULT '' AFTER `revision` ,
|
||||
ADD `flags` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `folder` , add index ( folder ), add index ( flags )");
|
||||
if($r)
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
2013-02-02.219
|
||||
2013-02-03.220
|
||||
|
Reference in New Issue
Block a user