From 12e4bff88051334534a569dbb9c0d8a5924cf989 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 1 Mar 2017 20:19:12 +0100 Subject: [PATCH] Continued with cleanups: - removed some empty lines at bottom of files - added new-line character at end of file (as this else may confuse some old editors) - moved JavaScript files out of "include" into own "js" - if you set , you don't need full URLs in linked JavaScript files and CSS files Signed-off-by: Roland Haeder --- include/Photo.php | 2 -- include/Scrape.php | 1 - include/auth.php | 2 -- include/cron_maintain.php | 2 +- include/dba.php | 1 - include/directory.php | 1 - include/items.php | 1 - include/notifier.php | 1 - include/poller.php | 5 +---- include/rockstar.php | 1 - include/submit.php | 2 +- include/sync.php | 2 +- include/system_unavailable.php | 2 +- {include => js}/ajaxupload.js | 2 +- {include => js}/country.js | 0 {include => js}/g.line-min.js | 0 {include => js}/g.raphael.js | 0 {include => js}/jquery-1.4.2.min.js | 0 {include => js}/jquery.js | 0 {include => js}/main.js | 1 - {include => js}/raphael.js | 0 mod/health.php | 12 ++++++------ view/#head.tpl# | 10 ---------- view/head.tpl | 11 ++++++----- 24 files changed, 18 insertions(+), 41 deletions(-) rename {include => js}/ajaxupload.js (99%) rename {include => js}/country.js (100%) rename {include => js}/g.line-min.js (100%) rename {include => js}/g.raphael.js (100%) rename {include => js}/jquery-1.4.2.min.js (100%) rename {include => js}/jquery.js (100%) rename {include => js}/main.js (99%) rename {include => js}/raphael.js (100%) delete mode 100644 view/#head.tpl# diff --git a/include/Photo.php b/include/Photo.php index 1d1a8842..e5fd99be 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -186,5 +186,3 @@ class Photo { } } }} - - diff --git a/include/Scrape.php b/include/Scrape.php index a61d22d3..86629c56 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -191,4 +191,3 @@ function pop_scrape_target(&$array, $name) { unset($array[$at]); return count($array); }} - diff --git a/include/auth.php b/include/auth.php index fee336e8..72147d36 100644 --- a/include/auth.php +++ b/include/auth.php @@ -72,5 +72,3 @@ function init_groups_visitor($contact_id) { } return $groups; }} - - diff --git a/include/cron_maintain.php b/include/cron_maintain.php index 33b164dd..e71a7949 100644 --- a/include/cron_maintain.php +++ b/include/cron_maintain.php @@ -111,4 +111,4 @@ $time = time() - $start_maintain; if($verbose) echo("Maintenance completed. Took $time seconds.".PHP_EOL); logger("Maintenance completed. Took $time seconds."); - } \ No newline at end of file + } diff --git a/include/dba.php b/include/dba.php index a79477cf..07e59c53 100644 --- a/include/dba.php +++ b/include/dba.php @@ -161,4 +161,3 @@ function closedb() { global $db; // $db->close(); }} - diff --git a/include/directory.php b/include/directory.php index 5f835dc4..1966bd36 100644 --- a/include/directory.php +++ b/include/directory.php @@ -25,4 +25,3 @@ fetch_url($dir . '?url=' . bin2hex($argv[1])); exit; - diff --git a/include/items.php b/include/items.php index 22509f24..3d7f0b9a 100644 --- a/include/items.php +++ b/include/items.php @@ -241,4 +241,3 @@ function post_remote($a,$arr) { return $current_post; } - diff --git a/include/notifier.php b/include/notifier.php index 4e542e58..bdc773a0 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -309,4 +309,3 @@ } killme(); - diff --git a/include/poller.php b/include/poller.php index 2bf3629e..8f580b1d 100644 --- a/include/poller.php +++ b/include/poller.php @@ -266,8 +266,5 @@ ); } - + killme(); - - - diff --git a/include/rockstar.php b/include/rockstar.php index b1b35642..58de4073 100644 --- a/include/rockstar.php +++ b/include/rockstar.php @@ -163,4 +163,3 @@ } killme(); - diff --git a/include/submit.php b/include/submit.php index 00d5b983..921a06a7 100644 --- a/include/submit.php +++ b/include/submit.php @@ -269,4 +269,4 @@ function nuke_record($url) { } } return; -} \ No newline at end of file +} diff --git a/include/sync.php b/include/sync.php index 54b29039..ac0e8785 100644 --- a/include/sync.php +++ b/include/sync.php @@ -437,4 +437,4 @@ function run_pulling_job($a, $pull_batch, $db_host, $db_user, $db_pass, $db_data } -} \ No newline at end of file +} diff --git a/include/system_unavailable.php b/include/system_unavailable.php index 48da8379..612ad2e7 100644 --- a/include/system_unavailable.php +++ b/include/system_unavailable.php @@ -3,4 +3,4 @@ Apologies but this site is unavailable at the moment. Please try again later. - \ No newline at end of file + diff --git a/include/ajaxupload.js b/js/ajaxupload.js similarity index 99% rename from include/ajaxupload.js rename to js/ajaxupload.js index ef872b52..56433966 100644 --- a/include/ajaxupload.js +++ b/js/ajaxupload.js @@ -689,4 +689,4 @@ this._createInput(); } }; -})(); +})(); diff --git a/include/country.js b/js/country.js similarity index 100% rename from include/country.js rename to js/country.js diff --git a/include/g.line-min.js b/js/g.line-min.js similarity index 100% rename from include/g.line-min.js rename to js/g.line-min.js diff --git a/include/g.raphael.js b/js/g.raphael.js similarity index 100% rename from include/g.raphael.js rename to js/g.raphael.js diff --git a/include/jquery-1.4.2.min.js b/js/jquery-1.4.2.min.js similarity index 100% rename from include/jquery-1.4.2.min.js rename to js/jquery-1.4.2.min.js diff --git a/include/jquery.js b/js/jquery.js similarity index 100% rename from include/jquery.js rename to js/jquery.js diff --git a/include/main.js b/js/main.js similarity index 99% rename from include/main.js rename to js/main.js index f1c6cee1..c35f470d 100644 --- a/include/main.js +++ b/js/main.js @@ -30,4 +30,3 @@ closeMenu("comment-edit-submit-wrapper-" + id); } } - diff --git a/include/raphael.js b/js/raphael.js similarity index 100% rename from include/raphael.js rename to js/raphael.js diff --git a/mod/health.php b/mod/health.php index 6f285326..b1f0fa22 100644 --- a/mod/health.php +++ b/mod/health.php @@ -202,9 +202,9 @@ function health_details($a, $id) ); if(count($r)){ //Include graphael line charts. - $a->page['htmlhead'] .= ''.PHP_EOL; - $a->page['htmlhead'] .= ''.PHP_EOL; - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= ''.PHP_EOL; + $a->page['htmlhead'] .= ''.PHP_EOL; + $a->page['htmlhead'] .= ''; $speeds = array(); $times = array(); $mintime = time(); @@ -249,9 +249,9 @@ function health_details($a, $id) ); if($r && count($r)){ //Include graphael line charts. - $a->page['htmlhead'] .= ''.PHP_EOL; - $a->page['htmlhead'] .= ''.PHP_EOL; - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= ''.PHP_EOL; + $a->page['htmlhead'] .= ''.PHP_EOL; + $a->page['htmlhead'] .= ''; $speeds = array(); $times = array(); $mintime = time(); diff --git a/view/#head.tpl# b/view/#head.tpl# deleted file mode 100644 index 4eb44e8c..00000000 --- a/view/#head.tpl# +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/view/head.tpl b/view/head.tpl index 0389e64f..dfa6a9af 100644 --- a/view/head.tpl +++ b/view/head.tpl @@ -3,13 +3,14 @@ - + - - + + - -