From e68432403288e4f7fb9e84ac0a2ca3629fb17a9e Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Fri, 28 Dec 2012 14:51:50 -0700 Subject: [PATCH 1/2] use explicit include paths --- include/api.php | 10 +++++----- include/conversation.php | 2 +- include/cronhooks.php | 2 +- include/delivery.php | 6 +++--- include/directory.php | 2 +- include/enotify.php | 2 +- include/expire.php | 2 +- include/follow.php | 2 +- include/gprobe.php | 2 +- include/html2plain.php | 2 +- include/items.php | 4 ++-- include/notifier.php | 6 +++--- include/onepoll.php | 2 +- include/poller.php | 2 +- include/queue.php | 6 +++--- index.php | 4 ++-- mod/_well_known.php | 4 ++-- mod/content.php | 2 +- mod/crepair.php | 2 +- mod/dfrn_confirm.php | 2 +- mod/dfrn_request.php | 4 ++-- mod/editpost.php | 2 +- mod/follow.php | 2 +- mod/install.php | 4 ++-- mod/profile_photo.php | 2 +- mod/share.php | 2 +- mod/tagrm.php | 2 +- mod/wall_upload.php | 2 +- util/db_update.php | 2 +- 29 files changed, 44 insertions(+), 44 deletions(-) diff --git a/include/api.php b/include/api.php index 667629e13..03514ecd5 100644 --- a/include/api.php +++ b/include/api.php @@ -1,9 +1,9 @@ $contact['avatar-date'])) { logger('consume_feed: Updating photo for ' . $contact['name']); - require_once("Photo.php"); + require_once("include/Photo.php"); $photo_failure = false; $have_photo = false; @@ -2240,7 +2240,7 @@ function local_delivery($importer,$data) { if(($photo_timestamp) && (strlen($photo_url)) && ($photo_timestamp > $importer['avatar-date'])) { logger('local_delivery: Updating photo for ' . $importer['name']); - require_once("Photo.php"); + require_once("include/Photo.php"); $photo_failure = false; $have_photo = false; diff --git a/include/notifier.php b/include/notifier.php index b5a92ff25..367f78700 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -51,13 +51,13 @@ function notifier_run(&$argv, &$argc){ if(is_null($db)) { @include(".htconfig.php"); - require_once("dba.php"); + require_once("include/dba.php"); $db = new dba($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); } - require_once("session.php"); - require_once("datetime.php"); + require_once("include/session.php"); + require_once("include/datetime.php"); require_once('include/items.php'); require_once('include/bbcode.php'); require_once('include/email.php'); diff --git a/include/onepoll.php b/include/onepoll.php index d819b7f42..01686232c 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -18,7 +18,7 @@ function onepoll_run(&$argv, &$argc){ if(is_null($db)) { @include(".htconfig.php"); - require_once("dba.php"); + require_once("include/dba.php"); $db = new dba($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); }; diff --git a/include/poller.php b/include/poller.php index 4eb5e8a2b..6bca5872f 100644 --- a/include/poller.php +++ b/include/poller.php @@ -12,7 +12,7 @@ function poller_run(&$argv, &$argc){ if(is_null($db)) { @include(".htconfig.php"); - require_once("dba.php"); + require_once("include/dba.php"); $db = new dba($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); }; diff --git a/include/queue.php b/include/queue.php index b703f930b..23fcc7d5c 100644 --- a/include/queue.php +++ b/include/queue.php @@ -11,14 +11,14 @@ function queue_run(&$argv, &$argc){ if(is_null($db)){ @include(".htconfig.php"); - require_once("dba.php"); + require_once("include/dba.php"); $db = new dba($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); }; - require_once("session.php"); - require_once("datetime.php"); + require_once("include/session.php"); + require_once("include/datetime.php"); require_once('include/items.php'); require_once('include/bbcode.php'); diff --git a/index.php b/index.php index bd5b3e396..f6b3809cc 100644 --- a/index.php +++ b/index.php @@ -41,7 +41,7 @@ load_translation_table($lang); * */ -require_once("dba.php"); +require_once("include/dba.php"); if(! $install) { $db = new dba($db_host, $db_user, $db_pass, $db_data, $install); @@ -54,7 +54,7 @@ if(! $install) { load_config('config'); load_config('system'); - require_once("session.php"); + require_once("include/session.php"); load_hooks(); call_hooks('init_1'); } diff --git a/mod/_well_known.php b/mod/_well_known.php index 155810df3..6792d36fe 100644 --- a/mod/_well_known.php +++ b/mod/_well_known.php @@ -1,5 +1,5 @@ argc > 1) { @@ -11,4 +11,4 @@ function _well_known_init(&$a){ } http_status_exit(404); killme(); -} \ No newline at end of file +} diff --git a/mod/content.php b/mod/content.php index 4210843dd..318c37233 100644 --- a/mod/content.php +++ b/mod/content.php @@ -309,7 +309,7 @@ function content_content(&$a, $update = 0) { function render_content(&$a, $items, $mode, $update, $preview = false) { - require_once('bbcode.php'); + require_once('include/bbcode.php'); $ssl_state = ((local_user()) ? true : false); diff --git a/mod/crepair.php b/mod/crepair.php index ec963b105..ec56d7c28 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -76,7 +76,7 @@ function crepair_post(&$a) { if($photo) { logger('mod-crepair: updating photo from ' . $photo); - require_once("Photo.php"); + require_once("include/Photo.php"); $photos = import_profile_photo($photo,local_user(),$contact['id']); diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 8e39f5fd0..f02119807 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -671,7 +671,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { else $photo = $a->get_baseurl() . '/images/person-175.jpg'; - require_once("Photo.php"); + require_once("include/Photo.php"); $photos = import_profile_photo($photo,$local_uid,$dfrn_record); diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 0c03607fc..5a32d946e 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -110,7 +110,7 @@ function dfrn_request_post(&$a) { * Scrape the other site's profile page to pick up the dfrn links, key, fn, and photo */ - require_once('Scrape.php'); + require_once('include/Scrape.php'); $parms = scrape_dfrn($dfrn_url); @@ -505,7 +505,7 @@ function dfrn_request_post(&$a) { } - require_once('Scrape.php'); + require_once('include/Scrape.php'); $parms = scrape_dfrn(($hcard) ? $hcard : $url); diff --git a/mod/editpost.php b/mod/editpost.php index d6539e107..c62252bc8 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -1,6 +1,6 @@ Date: Fri, 28 Dec 2012 16:17:33 -0700 Subject: [PATCH 2/2] missed an explicit include --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index f6b3809cc..dd19bb833 100644 --- a/index.php +++ b/index.php @@ -109,7 +109,7 @@ if((x($_GET,'zrl')) && (! $install)) { // header('Link: <' . $a->get_baseurl() . '/amcd>; rel="acct-mgmt";'); if((x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login')) - require("auth.php"); + require("include/auth.php"); if(! x($_SESSION,'authenticated')) header('X-Account-Management-Status: none');