Browse Source

Standards: Remove EOF closing PHP tags

pull/3423/head
Hypolite Petovan 4 years ago
parent
commit
1d427aa214
  1. 1
      include/Contact.php
  2. 1
      include/Emailer.php
  3. 1
      include/Probe.php
  4. 1
      include/auth_ejabberd.php
  5. 1
      include/create_shadowentry.php
  6. 1
      include/dbclean.php
  7. 1
      include/dbm.php
  8. 1
      include/diaspora.php
  9. 1
      include/feed.php
  10. 1
      include/files.php
  11. 1
      include/html2bbcode.php
  12. 1
      include/html2plain.php
  13. 3
      include/msgclean.php
  14. 1
      include/ostatus.php
  15. 1
      include/pidfile.php
  16. 1
      include/plaintext.php
  17. 1
      include/poller.php
  18. 2
      include/post_update.php
  19. 1
      include/quoteconvert.php
  20. 1
      include/remove_contact.php
  21. 1
      include/socgraph.php
  22. 1
      include/spool_post.php
  23. 1
      include/tags.php
  24. 1
      include/threads.php
  25. 2
      mod/nodeinfo.php
  26. 2
      mod/pubsubhubbub.php
  27. 3
      object/BaseObject.php
  28. 1
      object/Conversation.php
  29. 14
      object/Item.php
  30. 39
      tests/xss_filter_test.php
  31. 1
      util/createdoxygen.php
  32. 1
      util/daemon.php
  33. 4
      view/theme/duepuntozero/style.php

1
include/Contact.php

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

1
include/Emailer.php

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

1
include/Probe.php

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

1
include/auth_ejabberd.php

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

1
include/create_shadowentry.php

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

1
include/dbclean.php

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

1
include/dbm.php

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

1
include/diaspora.php

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

1
include/feed.php

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

1
include/files.php

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

1
include/html2bbcode.php

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

1
include/html2plain.php

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

3
include/msgclean.php

@ -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));
}
?>

1
include/ostatus.php

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

1
include/pidfile.php

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

1
include/plaintext.php

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

1
include/poller.php

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

2
include/post_update.php

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

1
include/quoteconvert.php

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

1
include/remove_contact.php

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

1
include/socgraph.php

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

1
include/spool_post.php

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

1
include/tags.php

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

1
include/threads.php

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

2
mod/nodeinfo.php

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

2
mod/pubsubhubbub.php

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

3
object/BaseObject.php

@ -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;
}
}
?>

1
object/Conversation.php

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

14
object/Item.php

@ -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:
?>

39
tests/xss_filter_test.php

@ -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
}
?>

1
util/createdoxygen.php

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

1
util/daemon.php

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

4
view/theme/duepuntozero/style.php

@ -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;
?>
Loading…
Cancel
Save