This merge brings back dbm::is_result() where I could find it.

Merge branch 'develop' of github.com:friendica/friendica into rhaeder-develop

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-09-18 23:21:18 +02:00
commit c825cc8d0d
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
691 changed files with 128914 additions and 43052 deletions

View file

@ -8,6 +8,7 @@ require_once('include/security.php');
require_once('include/redir.php');
require_once('include/tags.php');
require_once('include/threads.php');
require_once('include/Probe.php');
function photos_init(&$a) {
@ -159,7 +160,7 @@ function photos_post(&$a) {
intval($cid),
intval($page_owner_uid)
);
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
$can_post = true;
$visitor = $cid;
}
@ -267,7 +268,7 @@ function photos_post(&$a) {
dbesc($album)
);
}
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
foreach($r as $rr) {
$res[] = "'" . dbesc($rr['rid']) . "'" ;
}
@ -290,7 +291,7 @@ function photos_post(&$a) {
$r = q("SELECT `parent-uri` FROM `item` WHERE `resource-id` IN ( $str_res ) AND `uid` = %d",
intval($page_owner_uid)
);
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
foreach($r as $rr) {
q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
dbesc(datetime_convert()),
@ -305,7 +306,7 @@ function photos_post(&$a) {
// send the notification upstream/downstream as the case may be
if($rr['visible'])
proc_run('php',"include/notifier.php","drop","$drop_id");
proc_run(PRIORITY_HIGH, "include/notifier.php", "drop", $drop_id);
}
}
}
@ -352,7 +353,7 @@ function photos_post(&$a) {
dbesc($a->argv[2])
);
}
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
q("DELETE FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s'",
intval($page_owner_uid),
dbesc($r[0]['resource-id'])
@ -375,7 +376,7 @@ function photos_post(&$a) {
$drop_id = intval($i[0]['id']);
if($i[0]['visible'])
proc_run('php',"include/notifier.php","drop","$drop_id");
proc_run(PRIORITY_HIGH, "include/notifier.php", "drop", $drop_id);
}
}
@ -408,7 +409,7 @@ function photos_post(&$a) {
dbesc($resource_id),
intval($page_owner_uid)
);
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
$ph = new Photo($r[0]['data'], $r[0]['type']);
if($ph->is_valid()) {
$rotate_deg = ( (intval($_POST['rotate']) == 1) ? 270 : 90 );
@ -525,7 +526,7 @@ function photos_post(&$a) {
intval($page_owner_uid)
);
}
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
$old_tag = $r[0]['tag'];
$old_inform = $r[0]['inform'];
}
@ -552,7 +553,7 @@ function photos_post(&$a) {
$name = substr($tag,1);
if((strpos($name,'@')) || (strpos($name,'http://'))) {
$newname = $name;
$links = @lrdd($name);
$links = @Probe::lrdd($name);
if(count($links)) {
foreach($links as $link) {
if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page')
@ -612,7 +613,7 @@ function photos_post(&$a) {
intval($page_owner_uid)
);
}*/
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
$newname = $r[0]['name'];
$profile = $r[0]['url'];
$notify = 'cid:' . $r[0]['id'];
@ -718,7 +719,7 @@ function photos_post(&$a) {
$item_id = item_store($arr);
if($item_id) {
proc_run('php',"include/notifier.php","tag","$item_id");
proc_run(PRIORITY_HIGH, "include/notifier.php", "tag", $item_id);
}
}
@ -934,7 +935,7 @@ function photos_post(&$a) {
$item_id = item_store($arr);
if($visible)
proc_run('php', "include/notifier.php", 'wall-new', $item_id);
proc_run(PRIORITY_HIGH, "include/notifier.php", 'wall-new', $item_id);
call_hooks('photo_post_end',intval($item_id));
@ -1028,7 +1029,7 @@ function photos_content(&$a) {
intval($contact_id),
intval($owner_uid)
);
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
$can_post = true;
$contact = $r[0];
$remote_contact = true;
@ -1056,7 +1057,7 @@ function photos_content(&$a) {
intval($contact_id),
intval($owner_uid)
);
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
$contact = $r[0];
$remote_contact = true;
}
@ -1209,8 +1210,8 @@ function photos_content(&$a) {
intval($owner_uid),
dbesc($album)
);
if(dba::is_result($r)) {
$a->set_pager_total(dba::is_result($r));
if(dbm::is_result($r)) {
$a->set_pager_total(dbm::is_result($r));
$a->set_pager_itemspage(20);
}
@ -1266,7 +1267,7 @@ function photos_content(&$a) {
$photos = array();
if(dba::is_result($r))
if(dbm::is_result($r))
$twist = 'rotright';
foreach($r as $rr) {
if($twist == 'rotright')
@ -1306,11 +1307,10 @@ function photos_content(&$a) {
'$can_post' => $can_post,
'$upload' => array(t('Upload New Photos'), 'photos/' . $a->data['user']['nickname'] . '/upload/' . bin2hex($album)),
'$order' => $order,
'$edit' => $edit
'$edit' => $edit,
'$paginate' => paginate($a),
));
$o .= paginate($a);
return $o;
}
@ -1461,7 +1461,7 @@ function photos_content(&$a) {
);
if(dba::is_result($r))
if(dbm::is_result($r))
$a->set_pager_total($r[0]['total']);
@ -1638,7 +1638,7 @@ function photos_content(&$a) {
// display comments
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
foreach($r as $item) {
builtin_activity_puller($item, $conv_responses);
@ -1824,8 +1824,8 @@ function photos_content(&$a) {
dbesc('Contact Photos'),
dbesc( t('Contact Photos'))
);
if(dba::is_result($r)) {
$a->set_pager_total(dba::is_result($r));
if(dbm::is_result($r)) {
$a->set_pager_total(dbm::is_result($r));
$a->set_pager_itemspage(20);
}
@ -1842,7 +1842,7 @@ function photos_content(&$a) {
$photos = array();
if(dba::is_result($r)) {
if(dbm::is_result($r)) {
$twist = 'rotright';
foreach($r as $rr) {
//hide profile photos to others
@ -1887,10 +1887,9 @@ function photos_content(&$a) {
'$can_post' => $can_post,
'$upload' => array(t('Upload New Photos'), 'photos/'.$a->data['user']['nickname'].'/upload'),
'$photos' => $photos,
'$paginate' => paginate($a),
));
$o .= paginate($a);
return $o;
}