From b69fca14e76a2f5db0cd0924fe5e7056e94771b1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 26 Feb 2013 15:49:37 -0800 Subject: initial doco --- doc/html/include_2attach_8php.html | 361 +++++++++++++++++++++++++++++++++++++ 1 file changed, 361 insertions(+) create mode 100644 doc/html/include_2attach_8php.html (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html new file mode 100644 index 000000000..254918105 --- /dev/null +++ b/doc/html/include_2attach_8php.html @@ -0,0 +1,361 @@ + + + + + + +The Red Project: include/attach.php File Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
The Red Project +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
attach.php File Reference
+
+
+ + + + + + + + + + + + + + +

+Functions

 z_mime_content_type ($filename)
 
 attach_count_files ($channel_id, $observer, $hash= '', $filename= '', $filetype= '')
 
 attach_list_files ($channel_id, $observer, $hash= '', $filename= '', $filetype= '', $orderby= 'created desc', $start=0, $entries=0)
 
 attach_by_hash ($hash, $rev=0)
 
 attach_by_hash_nodata ($hash, $rev=0)
 
 attach_store ($channel, $observer_hash, $options= '', $arr=null)
 
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
attach_by_hash ( $hash,
 $rev = 0 
)
+
+ +

Referenced by attach_init().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
attach_by_hash_nodata ( $hash,
 $rev = 0 
)
+
+ +

Referenced by item_post().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
attach_count_files ( $channel_id,
 $observer,
 $hash = '',
 $filename = '',
 $filetype = '' 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
attach_list_files ( $channel_id,
 $observer,
 $hash = '',
 $filename = '',
 $filetype = '',
 $orderby = 'created desc',
 $start = 0,
 $entries = 0 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
attach_store ( $channel,
 $observer_hash,
 $options = '',
 $arr = null 
)
+
+
+ +
+
+ + + + + + + + +
z_mime_content_type ( $filename)
+
+ +

Referenced by attach_store().

+ +
+
+
+
+ + + + -- cgit v1.2.3 From 0ee1e83a3c6bb48064789a622f5eb7331733cb64 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 26 Feb 2013 16:04:28 -0800 Subject: small doco update --- doc/html/include_2attach_8php.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index 254918105..b4cf9f697 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -352,7 +352,7 @@ Functions - - - - + -- cgit v1.2.3 From 4cfbdfa6dbed878565bab5172efaf67c8fda0886 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 3 Mar 2013 23:38:08 -0800 Subject: cleanup affinity tool --- doc/html/include_2attach_8php.html | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index 7de978bcd..fad0d2ee1 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -124,6 +124,8 @@ Functions    attach_store ($channel, $observer_hash, $options= '', $arr=null)   + z_readdir ($channel_id, $observer_hash, $pathname, $parent_hash= '') + 

Function Documentation

@@ -344,6 +346,55 @@ Functions

Referenced by attach_store().

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
z_readdir ( $channel_id,
 $observer_hash,
 $pathname,
 $parent_hash = '' 
)
+
+

Read a virtual directory and return contents, checking permissions of all parent components. z_readdir

+
Parameters
+ + + + + +
integer$channel_id
string$observer_hash
string$pathname
string$parent_hash(optional)
+
+
+
Returns
array $ret $ret['success'] = boolean true or false $ret['message'] = error message if success is false $ret['data'] = array of attach DB entries without data component
+
-- cgit v1.2.3 From 9e22ec928b9534ea9db0d18bf685fb0d357fbad2 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 18 Apr 2013 21:06:31 -0700 Subject: more umbilical cutting --- doc/html/include_2attach_8php.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index fad0d2ee1..a6765b829 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -28,7 +28,7 @@ - + -- cgit v1.2.3 From 5e4b9d7766ceffd19785f14443cc1b4d4f675d4e Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 14 May 2013 21:25:58 -0700 Subject: disable pcss when installing since modules don't yet work and pcss uses the view module, plus weekly doc update --- doc/html/include_2attach_8php.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index e50f8f6f7..886ea944b 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -28,7 +28,7 @@
The Red Project
-- cgit v1.2.3 From 34526e82531c67995e25cf04abce0d927ce22ffd Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 10 May 2013 03:59:11 -0700 Subject: doc cleanup --- doc/html/include_2attach_8php.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index a6765b829..e50f8f6f7 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -4,7 +4,7 @@ -The Red Project: include/attach.php File Reference +The Red Matrix: include/attach.php File Reference @@ -30,7 +30,7 @@
-
The Red Project +
The Red Matrix
- +
The Red Matrix
-- cgit v1.2.3 From 381f457c3fae5dea1c76883837f18a70a55e6bb8 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 24 Aug 2013 16:52:38 -0700 Subject: fix xchans more completely after a URL change --- doc/html/include_2attach_8php.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index 886ea944b..31955e83b 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -180,7 +180,7 @@ Functions
-

Referenced by item_post().

+

Referenced by item_post(), and send_message().

@@ -326,7 +326,7 @@ Functions -- cgit v1.2.3 From 97a109eed4e034d587b0d64d0f70f6b8a9380217 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 9 Nov 2013 12:15:34 -0800 Subject: doc update --- doc/html/include_2attach_8php.html | 50 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index 31955e83b..338bbb45d 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -126,6 +126,8 @@ Functions    z_readdir ($channel_id, $observer_hash, $pathname, $parent_hash= '')   + attach_mkdir ($channel, $observer_hash, $arr=null) + 

Function Documentation

@@ -180,7 +182,7 @@ Functions
-

Referenced by item_post(), and send_message().

+

Referenced by item_post(), and send_message().

@@ -288,6 +290,50 @@ Functions
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
attach_mkdir ( $channel,
 $observer_hash,
 $arr = null 
)
+
+

attach_mkdir($channel,$observer_hash,$arr);

+

Create directory

+
Parameters
+ + + + +
$channelchannel array of owner
$observer_hashhash of current observer
$arrparameter array to fulfil request
+
+
+

Required: $arr['filename'] $arr['folder'] // hash of parent directory, empty string for root directory

+

Optional: $arr['hash'] // precumputed hash for this node $arr['allow_cid'] $arr['allow_gid'] $arr['deny_cid'] $arr['deny_gid']

+
@@ -326,7 +372,7 @@ Functions -- cgit v1.2.3 From 8cd9a2c3a944e804c72ef461df801116c6b44ac7 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 28 Nov 2013 19:37:39 -0800 Subject: doc updates --- doc/html/include_2attach_8php.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index 338bbb45d..1a69949ee 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -28,7 +28,7 @@ - +
The Red Matrix
-- cgit v1.2.3 From d2d071029f38942496aa52e42048ae53c5d04d48 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 3 Jan 2014 01:41:55 -0800 Subject: doc updates --- doc/html/include_2attach_8php.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index 1a69949ee..f2dbb41ac 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -390,7 +390,7 @@ Functions
-

Referenced by attach_store().

+

Referenced by attach_store(), and RedDirectory\createFile().

-- cgit v1.2.3 From 3298768d957421743eaa56dec5381141ab094d53 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 10 Jan 2014 00:47:40 -0800 Subject: directory creation error, display localtimes on cloud webpage, doc updates --- doc/html/include_2attach_8php.html | 140 +++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index f2dbb41ac..dcc1bd61a 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -128,6 +128,14 @@ Functions    attach_mkdir ($channel, $observer_hash, $arr=null)   + attach_change_permissions ($channel_id, $resource, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $recurse=false) +  + attach_delete ($channel_id, $resource) +  + get_cloudpath ($arr) +  + pipe_streams ($in, $out) + 

Function Documentation

@@ -184,6 +192,64 @@ Functions

Referenced by item_post(), and send_message().

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
attach_change_permissions ( $channel_id,
 $resource,
 $allow_cid,
 $allow_gid,
 $deny_cid,
 $deny_gid,
 $recurse = false 
)
+
+ +

Referenced by filestorage_post().

+
@@ -228,6 +294,34 @@ Functions
+
+ + +
+
+ + + + + + + + + + + + + + + + + + +
attach_delete ( $channel_id,
 $resource 
)
+
@@ -334,6 +428,8 @@ Functions

Required: $arr['filename'] $arr['folder'] // hash of parent directory, empty string for root directory

Optional: $arr['hash'] // precumputed hash for this node $arr['allow_cid'] $arr['allow_gid'] $arr['deny_cid'] $arr['deny_gid']

+

Referenced by RedDirectory\createDirectory().

+ @@ -374,6 +470,50 @@ Functions

Referenced by fix_attached_file_permissions(), send_message(), and wall_attach_post().

+ + + +
+
+ + + + + + + + +
get_cloudpath ( $arr)
+
+ +

Referenced by filestorage_content().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
pipe_streams ( $in,
 $out 
)
+
+
-- cgit v1.2.3 From db67f08d3c3ae3925479844e0f9b25bab13dabdc Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 18 Jan 2014 21:45:42 -0800 Subject: some more bookmark infrastructure plus a doc update --- doc/html/include_2attach_8php.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index dcc1bd61a..21215feb6 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -514,6 +514,8 @@ Functions
+

Referenced by attach_init().

+
-- cgit v1.2.3 From 0501bab7dc5982f94924e19192c1d523a45085aa Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 21 Feb 2014 23:51:43 -0800 Subject: doc update --- doc/html/include_2attach_8php.html | 135 +++++++++++++++++++++++++++++++++++-- 1 file changed, 129 insertions(+), 6 deletions(-) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index 21215feb6..b0d008ed3 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -109,35 +109,50 @@ $(document).ready(function(){initNavTree('include_2attach_8php.html','');});
attach.php File Reference
+ +

File/attach API with the potential for revision control. +More...

+ + + + + + + + +

Functions

 z_mime_content_type ($filename)
 Guess the mimetype from file ending. More...
 
 attach_count_files ($channel_id, $observer, $hash= '', $filename= '', $filetype= '')
 Count files/attachments. More...
 
 attach_list_files ($channel_id, $observer, $hash= '', $filename= '', $filetype= '', $orderby= 'created desc', $start=0, $entries=0)
 Returns a list of files/attachments. More...
 
 attach_by_hash ($hash, $rev=0)
 Find an attachment by hash and revision. More...
 
 attach_by_hash_nodata ($hash, $rev=0)
 Find an attachment by hash and revision. More...
 
 attach_store ($channel, $observer_hash, $options= '', $arr=null)
 
 z_readdir ($channel_id, $observer_hash, $pathname, $parent_hash= '')
 
 attach_mkdir ($channel, $observer_hash, $arr=null)
 Create directory. More...
 
 attach_change_permissions ($channel_id, $resource, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $recurse=false)
 Changes permissions of a file. More...
 
 attach_delete ($channel_id, $resource)
 Delete a file. More...
 
 get_cloudpath ($arr)
 Returns path to file in cloud/. More...
 
 pipe_streams ($in, $out)
 
-

Function Documentation

+

Detailed Description

+

File/attach API with the potential for revision control.

+

TODO: a filesystem storage abstraction which maintains security (and 'data' contains a system filename which is inaccessible from the web). This could get around PHP storage limits and store videos and larger items, using fread or OS methods or native code to read/write or chunk it through. Also an 'append' option to the storage function might be a useful addition.

+

Function Documentation

@@ -162,6 +177,17 @@ Functions
+

Find an attachment by hash and revision.

+

Returns the entire attach structure including data.

+

This could exhaust memory so most useful only when immediately sending the data.

+
Parameters
+ + + +
$hash
$rev
+
+
+

Referenced by attach_init().

@@ -190,6 +216,17 @@ Functions
+

Find an attachment by hash and revision.

+

Returns the entire attach structure excluding data.

+
See Also
attach_by_hash()
+
Parameters
+ + + +
$hash
$ref
+
+
+

Referenced by item_post(), and send_message().

@@ -248,6 +285,20 @@ Functions
+

Changes permissions of a file.

+
Parameters
+ + + + + + + + +
$channel_id
$resource
$allow_cid
$allow_gid
$deny_cid
$deny_gid
$recurse
+
+
+

Referenced by filestorage_post().

@@ -294,6 +345,19 @@ Functions
+

Count files/attachments.

+
Parameters
+ + + + + + +
$channel_id
$observer
$hash(optional)
$filename(optional)
$filetype(optional)
+
+
+
Returns
array $ret['success'] boolean $ret['results'] amount of found results, or false $ret['message'] string with error messages if any
+
@@ -320,6 +384,15 @@ Functions
+

Delete a file.

+
Parameters
+ + + +
$channel_id
$resource
+
+
+

Referenced by RedDirectory\createFile(), RedFile\delete(), filestorage_content(), and RedFile\put().

@@ -384,6 +457,22 @@ Functions
+

Returns a list of files/attachments.

+
Parameters
+ + + + + + + + + +
$channel_id
$observer
$hash(optional)
$filename(optional)
$filetype(optional)
$orderby
$start
$entries
+
+
+
Returns
array $ret['success'] boolean $ret['results'] array with results, or false $ret['message'] string with error messages if any
+
@@ -415,18 +504,17 @@ Functions
+ +

Create directory.

attach_mkdir($channel,$observer_hash,$arr);

-

Create directory

Parameters
- +
$channelchannel array of owner
$observer_hashhash of current observer
$arrparameter array to fulfil request
$arrparameter array to fulfil request Required: $arr['filename'] $arr['folder'] // hash of parent directory, empty string for root directory Optional: $arr['hash'] // precumputed hash for this node $arr['allow_cid'] $arr['allow_gid'] $arr['deny_cid'] $arr['deny_gid']
-

Required: $arr['filename'] $arr['folder'] // hash of parent directory, empty string for root directory

-

Optional: $arr['hash'] // precumputed hash for this node $arr['allow_cid'] $arr['allow_gid'] $arr['deny_cid'] $arr['deny_gid']

Referenced by RedDirectory\createDirectory().

@@ -467,6 +555,15 @@ Functions
+
Parameters
+ + + + + +
$channelchannel array of owner
$observer_hashhash of current observer
$options(optional)
$arr(optional)
+
+

Referenced by fix_attached_file_permissions(), send_message(), and wall_attach_post().

@@ -486,6 +583,15 @@ Functions
+

Returns path to file in cloud/.

+
Parameters
+ + +
$arr
+
+
+
Returns
string with the path the file to cloud/
+

Referenced by filestorage_content().

@@ -513,6 +619,13 @@ Functions
+
Parameters
+ + + +
$in
$out
+
+

Referenced by attach_init().

@@ -532,6 +645,16 @@ Functions
+

Guess the mimetype from file ending.

+

This function takes a file name and guess the mimetype from the filename extension.

+
Parameters
+ + +
$filenamea string filename
+
+
+
Returns
string The mimetype according to a file ending.
+

Referenced by attach_store(), and RedDirectory\createFile().

@@ -575,7 +698,7 @@ Functions
Parameters
- +
integer$channel_id
string$observer_hash
string$observer_hashhash of current observer
string$pathname
string$parent_hash(optional)
-- cgit v1.2.3 From 16c2aa042fade698ece5dcb67cde10ff8155bd65 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 7 Mar 2014 14:30:24 -0800 Subject: doc update --- doc/html/include_2attach_8php.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/html/include_2attach_8php.html') diff --git a/doc/html/include_2attach_8php.html b/doc/html/include_2attach_8php.html index b0d008ed3..e075e1e01 100644 --- a/doc/html/include_2attach_8php.html +++ b/doc/html/include_2attach_8php.html @@ -565,7 +565,7 @@ Functions
-

Referenced by fix_attached_file_permissions(), send_message(), and wall_attach_post().

+

Referenced by fix_attached_file_permissions(), importelm_post(), send_message(), and wall_attach_post().

-- cgit v1.2.3