require_once 'include/items.php';
-function salmon_return($val) {
-
- if($val >= 400)
- $err = 'Error';
- if($val >= 200 && $val < 300)
- $err = 'OK';
-
- logger('mod-salmon returns ' . $val);
- header($_SERVER["SERVER_PROTOCOL"] . ' ' . $val . ' ' . $err);
- killme();
-
-}
-
function salmon_post(App $a) {
$xml = file_get_contents('php://input');
$dom = simplexml_load_string($xml,'SimpleXMLElement',0,NAMESPACE_SALMON_ME);
- // figure out where in the DOM tree our data is hiding
+ $base = null;
+ // figure out where in the DOM tree our data is hiding
if($dom->provenance->data)
$base = $dom->provenance;
elseif($dom->env->data)
function starred_init(App $a) {
$starred = 0;
+ $message_id = null;
if (! local_user()) {
killme();
}
}
+ $owner = null;
// this represents the post owner on this system.
$r = q("SELECT `contact`.*, `user`.`nickname` FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
$remote_owner = $owner;
+ $contact = null;
// This represents the person posting
if ((local_user()) && (local_user() == $owner_uid)) {
uexport_account($a);
echo "\n";
+ $total = 0;
$r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ",
intval(local_user())
);
killme();
}
- $src = "";
+ $src = '';
+ $filename = '';
+ $filesize = 0;
+ $filetype = '';
if (x($_FILES, 'userfile')) {
$src = $_FILES['userfile']['tmp_name'];
$filename = basename($_FILES['userfile']['name']);
// And construct a webbie (e.g. mickey@friendica.domain.com for the search in gcontact
// We use the webbie for search in gcontact because we don't know if gcontact table stores
// the right value if its http or https protocol
+ $webbie = '';
if (count($url_parts)) {
$server_url = $url_parts[1] . $url_parts[2];
$webbie = $url_parts[4] . '@' . $url_parts[2];
return;
}
- $searching = false;
+ $sql_extra = '';
if ($results["search"]) {
$search_txt = dbesc(protect_sprintf(preg_quote($results["search"])));
- $searching = true;
- }
-
- $sql_extra = '';
- if ($searching) {
$sql_extra .= " AND (`attag` LIKE '%%" . dbesc($search_txt) . "%%' OR `name` LIKE '%%" . dbesc($search_txt) . "%%' OR `nick` LIKE '%%" . dbesc($search_txt) . "%%') ";
}
$sql_extra .= sprintf(" AND network = '%s' ", dbesc($nets));
}
+ $total = 0;
$r = q("SELECT COUNT(*) AS `total` FROM `contact`
WHERE `uid` = %d AND NOT `self` AND NOT `pending` $sql_extra ", intval($_SESSION['uid']));
if (DBM::is_result($r)) {
//Community_Pages at right_aside
if ($show_pages && local_user()) {
+ $cid = null;
if (x($_GET, 'cid') && intval($_GET['cid']) != 0) {
$cid = $_GET['cid'];
}