[Scrutinizer] Fix undeclared variables part 7: mod/ and view/

- Remove unused function `salmon_return()`
This commit is contained in:
Hypolite Petovan 2018-02-14 00:07:26 -05:00
commit 7a38fbf84b
7 changed files with 14 additions and 21 deletions

View file

@ -13,19 +13,6 @@ use Friendica\Util\Crypto;
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');
@ -48,8 +35,9 @@ function salmon_post(App $a) {
$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)

View file

@ -9,6 +9,7 @@ use Friendica\Model\Item;
function starred_init(App $a) {
$starred = 0;
$message_id = null;
if (! local_user()) {
killme();

View file

@ -57,6 +57,7 @@ function subthread_content(App $a) {
}
}
$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`
@ -75,6 +76,7 @@ function subthread_content(App $a) {
$remote_owner = $owner;
$contact = null;
// This represents the person posting
if ((local_user()) && (local_user() == $owner_uid)) {

View file

@ -141,6 +141,7 @@ function uexport_all(App $a) {
uexport_account($a);
echo "\n";
$total = 0;
$r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ",
intval(local_user())
);

View file

@ -114,7 +114,10 @@ function wall_upload_post(App $a, $desktopmode = true) {
killme();
}
$src = "";
$src = '';
$filename = '';
$filesize = 0;
$filetype = '';
if (x($_FILES, 'userfile')) {
$src = $_FILES['userfile']['tmp_name'];
$filename = basename($_FILES['userfile']['name']);