1
1
Fork 0

Standards: Remove EOF closing PHP tags

This commit is contained in:
Hypolite Petovan 2017-04-30 00:21:02 -04:00
parent 4b16de6d80
commit 1d427aa214
33 changed files with 28 additions and 66 deletions

View file

@ -854,4 +854,3 @@ function account_type($contact) {
return $account_type;
}
?>

View file

@ -81,4 +81,3 @@ class Emailer {
return $res;
}
}
?>

View file

@ -1220,4 +1220,3 @@ class Probe {
return $data;
}
}
?>

View file

@ -334,4 +334,3 @@ class exAuth {
fclose($this->rLogFile);
}
}
?>

View file

@ -17,4 +17,3 @@ function create_shadowentry_run($argv, $argc) {
add_shadow_entry($message_id);
}
?>

View file

@ -149,4 +149,3 @@ function remove_orphans($stage = 0) {
}
}
?>

View file

@ -110,4 +110,3 @@ class dbm {
return date('Y-m-d H:i:s', $timestamp);
}
}
?>

View file

@ -3745,4 +3745,3 @@ class Diaspora {
return true;
}
}
?>

View file

@ -366,4 +366,3 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
return array("header" => $author, "items" => $items);
}
}
?>

View file

@ -47,4 +47,3 @@ function update_files_for_items() {
create_files_from_item($message["id"]);
}
}
?>

View file

@ -325,4 +325,3 @@ function html2bbcode($message)
return $message;
}
?>

View file

@ -233,4 +233,3 @@ function html2plain($html, $wraplength = 75, $compact = false)
return(trim($message));
}
?>

View file

@ -187,7 +187,7 @@ function removelinebreak($message)
(substr(trim($nextline), 0, 7) == 'http://') or
(substr(trim($nextline), 0, 8) == 'https://'));
if (!$specialchars)
if (!$specialchars)
$specialchars = ((substr(rtrim($line), -1) == '-') or
(substr(rtrim($line), -1) == '=') or
(substr(rtrim($line), -1) == '*') or
@ -222,4 +222,3 @@ function removelinebreak($message)
return(implode("\n", $lines));
}
?>

View file

@ -2297,4 +2297,3 @@ class ostatus {
return(trim($doc->saveXML()));
}
}
?>

View file

@ -38,4 +38,3 @@ class pidfile {
return(posix_kill(file_get_contents($this->_file), SIGTERM));
}
}
?>

View file

@ -432,4 +432,3 @@ function plaintext(App $a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2
return($post);
}
?>

View file

@ -689,4 +689,3 @@ if (array_search(__file__,get_included_files())===0){
killme();
}
?>

View file

@ -258,5 +258,3 @@ function post_update_1206() {
logger("Done", LOGGER_DEBUG);
return true;
}
?>

View file

@ -129,4 +129,3 @@ function removetofu($message)
return($message);
}
?>

View file

@ -22,4 +22,3 @@ function remove_contact_run($argv, $argc) {
// Now we delete all the depending table entries
dba::delete('contact', array('id' => $id));
}
?>

View file

@ -2346,4 +2346,3 @@ function poco_serverlist() {
}
return $r;
}
?>

View file

@ -55,4 +55,3 @@ function spool_post_run($argv, $argc) {
}
}
}
?>

View file

@ -148,4 +148,3 @@ function update_items() {
dba::close($messages);
}
?>

View file

@ -296,4 +296,3 @@ function update_shadow_copy() {
dba::close($messages);
}
?>

View file

@ -252,5 +252,3 @@ function nodeinfo_cron() {
logger('cron_end');
Config::set('nodeinfo', 'last_calucation', time());
}
?>

View file

@ -160,5 +160,3 @@ function pubsubhubbub_init(App $a) {
killme();
}
?>

View file

@ -14,7 +14,7 @@ class BaseObject {
/**
* Get the app
*
*
* Same as get_app from boot.php
*/
public function get_app() {
@ -33,4 +33,3 @@ class BaseObject {
self::$app = $app;
}
}
?>

View file

@ -164,4 +164,3 @@ class Conversation extends BaseObject {
return false;
}
}
?>

View file

@ -112,7 +112,7 @@ class Item extends BaseObject {
$conv = $this->get_conversation();
$lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
$lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
? t('Private Message')
: false);
@ -754,20 +754,20 @@ class Item extends BaseObject {
if ((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) {
// The author url doesn't match the owner (typically the contact)
// and also doesn't match the contact alias.
// The name match is a hack to catch several weird cases where URLs are
// and also doesn't match the contact alias.
// The name match is a hack to catch several weird cases where URLs are
// all over the park. It can be tricked, but this prevents you from
// seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn
// well that it's the same Bob Smith.
// well that it's the same Bob Smith.
// But it could be somebody else with the same name. It just isn't highly likely.
// But it could be somebody else with the same name. It just isn't highly likely.
$this->owner_photo = $this->get_data_value('owner-avatar');
$this->owner_name = $this->get_data_value('owner-name');
$this->wall_to_wall = true;
// If it is our contact, use a friendly redirect link
if ((link_compare($this->get_data_value('owner-link'),$this->get_data_value('url')))
if ((link_compare($this->get_data_value('owner-link'),$this->get_data_value('url')))
&& ($this->get_data_value('network') === NETWORK_DFRN)) {
$this->owner_url = $this->get_redirect_url();
} else {
@ -807,5 +807,3 @@ class Item extends BaseObject {
}
}
/// @TODO These are discouraged and should be removed:
?>

View file

@ -1,7 +1,7 @@
<?php
/**
* tests several functions which are used to prevent xss attacks
*
*
* @package test.util
*/
@ -27,31 +27,31 @@ class AntiXSSTest extends PHPUnit_Framework_TestCase {
*/
public function testXmlify() {
$text="<tag>I want to break\n this!11!<?hard?></tag>";
$xml=xmlify($text);
$xml=xmlify($text);
$retext=unxmlify($text);
$this->assertEquals($text, $retext);
}
/**
* xmlify and put in a document
*/
public function testXmlifyDocument() {
$tag="<tag>I want to break</tag>";
/**
* xmlify and put in a document
*/
public function testXmlifyDocument() {
$tag="<tag>I want to break</tag>";
$xml=xmlify($tag);
$text='<text>'.$xml.'</text>';
$xml_parser=xml_parser_create();
$text='<text>'.$xml.'</text>';
$xml_parser=xml_parser_create();
//should be possible to parse it
$values=array(); $index=array();
$this->assertEquals(1, xml_parse_into_struct($xml_parser, $text, $values, $index));
$this->assertEquals(array('TEXT'=>array(0)),
$index);
$this->assertEquals(array(array('tag'=>'TEXT', 'type'=>'complete', 'level'=>1, 'value'=>$tag)),
$values=array(); $index=array();
$this->assertEquals(1, xml_parse_into_struct($xml_parser, $text, $values, $index));
$this->assertEquals(array('TEXT'=>array(0)),
$index);
$this->assertEquals(array(array('tag'=>'TEXT', 'type'=>'complete', 'level'=>1, 'value'=>$tag)),
$values);
xml_parser_free($xml_parser);
xml_parser_free($xml_parser);
}
/**
@ -68,4 +68,3 @@ class AntiXSSTest extends PHPUnit_Framework_TestCase {
//get_mentions
//get_contact_block, bis Zeile 538
}
?>

View file

@ -91,4 +91,3 @@ function add_documentation($line) {
return $block;
}
?>

View file

@ -98,4 +98,3 @@ while (true) {
// Now sleep for 5 minutes
sleep(300);
}
?>

View file

@ -6,7 +6,7 @@ $uid = get_theme_uid();
$s_colorset = get_config('duepuntozero','colorset');
$colorset = get_pconfig( $uid, 'duepuntozero', 'colorset');
if (!x($colorset))
if (!x($colorset))
$colorset = $s_colorset;
if ($colorset) {
@ -25,5 +25,3 @@ if ($colorset) {
}
echo $setcss;
?>