update manage table and some documentation
This commit is contained in:
@@ -1427,22 +1427,8 @@ function item_store($arr,$force_parent = false) {
|
||||
$arr['item_private'] = 0;
|
||||
}
|
||||
else {
|
||||
|
||||
// Allow one to see reply tweets from status.net even when
|
||||
// we don't have or can't see the original post.
|
||||
|
||||
if($force_parent) {
|
||||
logger('item_store: $force_parent=true, reply converted to top-level post.');
|
||||
$parent_id = 0;
|
||||
$arr['parent_mid'] = $arr['mid'];
|
||||
$arr['flags'] = $arr['flags'] | ITEM_THREAD_TOP;
|
||||
}
|
||||
else {
|
||||
logger('item_store: item parent was not found - ignoring item');
|
||||
return 0;
|
||||
}
|
||||
|
||||
$parent_deleted = 0;
|
||||
logger('item_store: item parent was not found - ignoring item');
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ function get_capath() {
|
||||
|
||||
// curl wrapper. If binary flag is true, return binary
|
||||
// results.
|
||||
|
||||
/**
|
||||
* fetch_url is deprecated and being replaced by the more capable z_fetch_url
|
||||
* please use that function instead.
|
||||
@@ -204,6 +205,26 @@ function post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0)
|
||||
return($body);
|
||||
}
|
||||
|
||||
/**
|
||||
* @function z_fetch_url
|
||||
* @param string $url
|
||||
* URL to fetch
|
||||
* @param boolean $binary = false
|
||||
* TRUE if asked to return binary results (file download)
|
||||
* @param int $redirects = 0
|
||||
* internal use, recursion counter
|
||||
* @param array $opts (optional parameters)
|
||||
* 'accept_content' => supply Accept: header with 'accept_content' as the value
|
||||
* 'timeout' => int seconds, default system config value or 60 seconds
|
||||
* 'http_auth' => username:password
|
||||
* 'novalidate' => do not validate SSL certs, default is to validate using our CA list
|
||||
*
|
||||
* @returns array
|
||||
* 'return_code' => HTTP return code or 0 if timeout or failure
|
||||
* 'success' => boolean true (if HTTP 2xx result) or false
|
||||
* 'header' => HTTP headers
|
||||
* 'body' => fetched content
|
||||
*/
|
||||
|
||||
function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
|
||||
|
||||
@@ -421,7 +442,15 @@ function xml_status($st, $message = '') {
|
||||
killme();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @function http_status_exit
|
||||
*
|
||||
* Send HTTP status header and exit
|
||||
* @param int $val
|
||||
* integer HTTP status result value
|
||||
*
|
||||
* @returns (does not return, process is terminated)
|
||||
*/
|
||||
|
||||
function http_status_exit($val) {
|
||||
|
||||
|
||||
@@ -222,6 +222,7 @@ function unxmlify($s) {
|
||||
|
||||
// convenience wrapper, reverse the operation "bin2hex"
|
||||
|
||||
// This is a built-in function in php >= 5.4
|
||||
|
||||
if(! function_exists('hex2bin')) {
|
||||
function hex2bin($s) {
|
||||
|
||||
Reference in New Issue
Block a user