From b41f9620fa3c602d011959ea74a3e332d1f23a2b Mon Sep 17 00:00:00 2001 From: Miguel Dantas Date: Fri, 23 Aug 2019 13:36:02 +0100 Subject: [PATCH] [LIB_REFACTOR] Fix requires --- actions/addpeopletag.php | 2 +- actions/apilistmembers.php | 2 +- actions/apilistsubscribers.php | 2 +- actions/apitimelinelist.php | 2 +- actions/featured.php | 4 ++-- actions/groupqueue.php | 4 ++-- actions/groups.php | 2 +- actions/groupsearch.php | 4 ++-- actions/noticesearch.php | 2 +- actions/nudge.php | 2 +- actions/peoplesearch.php | 4 ++-- actions/peopletag.php | 2 +- actions/peopletagged.php | 2 +- actions/peopletagsbyuser.php | 2 +- actions/peopletagsforuser.php | 2 +- actions/peopletagsubscribers.php | 2 +- actions/peopletagsubscriptions.php | 2 +- actions/plugindelete.php | 2 +- actions/plugininstall.php | 2 +- actions/profilecompletion.php | 2 +- actions/removepeopletag.php | 2 +- actions/shownotice.php | 2 +- actions/usergroups.php | 2 +- classes/Confirm_address.php | 2 +- classes/Memcached_DataObject.php | 2 +- classes/Notice.php | 2 +- classes/User.php | 2 +- lib/activitystreams/activityobject.php | 2 +- lib/activitystreams/useractivitystream.php | 2 +- lib/admin/pluginenableform.php | 2 +- lib/admin/pluginlist.php | 4 ++-- lib/api/apioauthaction.php | 2 +- lib/application/applicationeditform.php | 2 +- lib/database/dberroraction.php | 2 +- lib/groups/approvegroupform.php | 2 +- lib/groups/groupeditform.php | 2 +- lib/groups/grouplist.php | 2 +- lib/groups/groupminilist.php | 2 +- lib/notices/dofollowlistitem.php | 2 +- lib/profile/cancelsubscriptionform.php | 2 +- lib/profile/logingroupnav.php | 2 +- lib/profile/nudgeform.php | 2 +- lib/profile/peopletageditform.php | 4 ++-- lib/profile/peopletaggroupnav.php | 2 +- lib/profile/peopletagnav.php | 2 +- lib/profile/peopletagsection.php | 2 +- lib/profile/subscribeform.php | 2 +- lib/profile/subscribepeopletagform.php | 2 +- lib/profile/togglepeopletag.php | 2 +- lib/profile/unsubscribeform.php | 2 +- lib/profile/unsubscribepeopletagform.php | 2 +- lib/queue/pingqueuehandler.php | 2 +- lib/queue/smsqueuehandler.php | 2 +- lib/search/searchaction.php | 2 +- lib/ui/inviteform.php | 2 +- lib/ui/subgroupnav.php | 2 +- lib/util/command.php | 2 +- lib/util/commandinterpreter.php | 2 +- lib/util/common.php | 2 +- lib/util/form.php | 2 +- lib/util/framework.php | 10 +++++----- lib/util/gnusocial.php | 2 +- lib/util/installer.php | 10 +++++----- lib/util/mailhandler.php | 2 +- lib/util/util.php | 2 +- modules/Favorite/FavoriteModule.php | 2 +- plugins/ActivitySpam/actions/spam.php | 2 +- plugins/AnonymousFave/forms/anondisfavor.php | 2 +- plugins/AnonymousFave/forms/anonfavor.php | 2 +- plugins/DomainWhitelist/forms/whitelistinvite.php | 2 +- plugins/Embed/tests/EmbedTest.php | 2 +- plugins/Linkback/LinkbackPlugin.php | 2 +- plugins/MentionURL/MentionURLPlugin.php | 2 +- plugins/OStatus/actions/ostatuspeopletag.php | 2 +- plugins/OStatus/tests/FeedDiscoveryTest.php | 2 +- plugins/OStatus/tests/MagicEnvelopeTest.php | 2 +- plugins/QnA/forms/qnashowanswer.php | 2 +- plugins/QnA/forms/qnashowquestion.php | 2 +- plugins/TwitterBridge/actions/twitterauthorization.php | 2 +- plugins/TwitterBridge/daemons/twitterstatusfetcher.php | 4 ++-- plugins/UserFlag/forms/clearflag.php | 2 +- plugins/UserFlag/forms/flagprofile.php | 2 +- public/index.php | 2 +- scripts/commandline.inc | 2 +- scripts/console.php | 2 +- scripts/fixup_hashtags.php | 2 +- scripts/install_cli.php | 2 +- scripts/maildaemon.php | 4 ++-- scripts/queuedaemon.php | 6 +++--- scripts/resend_confirm_address.php | 2 +- scripts/update_translations.php | 2 +- tests/Core/ActivityGenerationTests.php | 2 +- tests/Core/ActivityParseTests.php | 2 +- tests/Core/CallableLeftCurryTest.php | 2 +- tests/Core/CommandInterperterTest.php | 2 +- tests/Core/HashTagDetectionTests.php | 2 +- tests/Core/LocationTest.php | 2 +- tests/Core/NicknameTest.php | 2 +- tests/Core/TagURITest.php | 2 +- tests/Core/URLDetectionTest.php | 2 +- tests/Core/UUIDTest.php | 2 +- tests/Core/UserFeedParseTest.php | 2 +- tests/Core/UserRightsTest.php | 2 +- tests/Core/XmppValidateTest.php | 2 +- tests/Media/MediaFileTest.php | 2 +- 105 files changed, 123 insertions(+), 123 deletions(-) diff --git a/actions/addpeopletag.php b/actions/addpeopletag.php index 94a2cddfb0..50cc742177 100644 --- a/actions/addpeopletag.php +++ b/actions/addpeopletag.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/togglepeopletag.php'; +require_once INSTALLDIR . '/lib/account/togglepeopletag.php'; /** * diff --git a/actions/apilistmembers.php b/actions/apilistmembers.php index bd78451d5e..23f0d354d9 100644 --- a/actions/apilistmembers.php +++ b/actions/apilistmembers.php @@ -30,7 +30,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apilistusers.php'; +require_once INSTALLDIR . '/lib/api/apilistusers.php'; class ApiListMembersAction extends ApiListUsersAction { diff --git a/actions/apilistsubscribers.php b/actions/apilistsubscribers.php index 66cb5f17d7..3043263561 100644 --- a/actions/apilistsubscribers.php +++ b/actions/apilistsubscribers.php @@ -29,7 +29,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apilistusers.php'; +require_once INSTALLDIR . '/lib/api/apilistusers.php'; class ApiListSubscribersAction extends ApiListUsersAction { diff --git a/actions/apitimelinelist.php b/actions/apitimelinelist.php index 91b26bf6c7..73b16c42e6 100644 --- a/actions/apitimelinelist.php +++ b/actions/apitimelinelist.php @@ -35,7 +35,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/atomlistnoticefeed.php'; +require_once INSTALLDIR . '/lib/feeds/atomlistnoticefeed.php'; /** * Returns the most recent notices (default 20) posted to the list specified by ID diff --git a/actions/featured.php b/actions/featured.php index 1844f08c9a..f5aaaa130f 100644 --- a/actions/featured.php +++ b/actions/featured.php @@ -32,8 +32,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/profilelist.php'; -require_once INSTALLDIR . '/lib/publicgroupnav.php'; +require_once INSTALLDIR . '/lib/profile/profilelist.php'; +require_once INSTALLDIR . '/lib/groups/publicgroupnav.php'; /** * List of featured users diff --git a/actions/groupqueue.php b/actions/groupqueue.php index 6699338f0c..1f44d31f25 100644 --- a/actions/groupqueue.php +++ b/actions/groupqueue.php @@ -31,8 +31,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once(INSTALLDIR . '/lib/profilelist.php'); -require_once INSTALLDIR . '/lib/publicgroupnav.php'; +require_once INSTALLDIR . '/lib/profile/profilelist.php'; +require_once INSTALLDIR . '/lib/groups/publicgroupnav.php'; /** * List of group members diff --git a/actions/groups.php b/actions/groups.php index 5971cf2227..509fb3ed29 100644 --- a/actions/groups.php +++ b/actions/groups.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/grouplist.php'; +require_once INSTALLDIR . '/lib/groups/grouplist.php'; /** * Latest groups diff --git a/actions/groupsearch.php b/actions/groupsearch.php index fce5c2b16a..f51574ccc8 100644 --- a/actions/groupsearch.php +++ b/actions/groupsearch.php @@ -32,8 +32,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -//require_once INSTALLDIR.'/lib/searchaction.php'; -//require_once INSTALLDIR.'/lib/profilelist.php'; +require_once INSTALLDIR . '/lib/search/searchaction.php'; +require_once INSTALLDIR . '/lib/profile/profilelist.php'; /** * Group search action class. diff --git a/actions/noticesearch.php b/actions/noticesearch.php index 2968c8de4d..4e195583ce 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -33,7 +33,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/searchaction.php'; +require_once INSTALLDIR . '/lib/search/searchaction.php'; /** * Notice search action class. diff --git a/actions/nudge.php b/actions/nudge.php index 7cadcbde14..894d9d8447 100644 --- a/actions/nudge.php +++ b/actions/nudge.php @@ -33,7 +33,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/mail.php'; +require_once INSTALLDIR . '/lib/util/mail.php'; /** * Nudge a user action class. diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php index e4c59bd687..bddba55578 100644 --- a/actions/peoplesearch.php +++ b/actions/peoplesearch.php @@ -32,8 +32,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/searchaction.php'; -require_once INSTALLDIR . '/lib/profilelist.php'; +require_once INSTALLDIR . '/lib/search/searchaction.php'; +require_once INSTALLDIR . '/lib/profile/profilelist.php'; /** * People search action class. diff --git a/actions/peopletag.php b/actions/peopletag.php index 8dcb75c04a..323c3bfcb8 100644 --- a/actions/peopletag.php +++ b/actions/peopletag.php @@ -35,7 +35,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/peopletaglist.php'; +require_once INSTALLDIR . '/lib/profile/peopletaglist.php'; // cache 3 pages define('PEOPLETAG_CACHE_WINDOW', PEOPLETAGS_PER_PAGE*3 + 1); diff --git a/actions/peopletagged.php b/actions/peopletagged.php index b9b2af2dd8..927df09997 100644 --- a/actions/peopletagged.php +++ b/actions/peopletagged.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once(INSTALLDIR . '/lib/profilelist.php'); +require_once INSTALLDIR . '/lib/profile/profilelist.php'; /** * List of people tagged by the user with a tag diff --git a/actions/peopletagsbyuser.php b/actions/peopletagsbyuser.php index 548e1329d5..e5447b3f84 100644 --- a/actions/peopletagsbyuser.php +++ b/actions/peopletagsbyuser.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/peopletaglist.php'; +require_once INSTALLDIR . '/lib/profile/peopletaglist.php'; class PeopletagsbyuserAction extends Action { diff --git a/actions/peopletagsforuser.php b/actions/peopletagsforuser.php index eb248a931f..a65e8ebab6 100644 --- a/actions/peopletagsforuser.php +++ b/actions/peopletagsforuser.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/peopletaglist.php'; +require_once INSTALLDIR . '/lib/profile/peopletaglist.php'; class PeopletagsforuserAction extends Action { diff --git a/actions/peopletagsubscribers.php b/actions/peopletagsubscribers.php index d8eecc5de5..a2fa46b059 100644 --- a/actions/peopletagsubscribers.php +++ b/actions/peopletagsubscribers.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once(INSTALLDIR . '/lib/profilelist.php'); +require_once INSTALLDIR . '/lib/profile/profilelist.php'; /** * List of peopletag subscribers diff --git a/actions/peopletagsubscriptions.php b/actions/peopletagsubscriptions.php index cd9da991c0..de9f2f8e6d 100644 --- a/actions/peopletagsubscriptions.php +++ b/actions/peopletagsubscriptions.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/peopletaglist.php'; +require_once INSTALLDIR . '/lib/profile/peopletaglist.php'; class PeopletagsubscriptionsAction extends Action { diff --git a/actions/plugindelete.php b/actions/plugindelete.php index 04d74198dc..289f0ca38e 100644 --- a/actions/plugindelete.php +++ b/actions/plugindelete.php @@ -16,7 +16,7 @@ defined('STATUSNET') || die(); -require_once INSTALLDIR . '/lib/deletetree.php'; +require_once INSTALLDIR . '/lib/util/deletetree.php'; /** * Form for deleting a plugin diff --git a/actions/plugininstall.php b/actions/plugininstall.php index 4f2d8a41a5..d9dcc6eb5f 100644 --- a/actions/plugininstall.php +++ b/actions/plugininstall.php @@ -16,7 +16,7 @@ defined('STATUSNET') || die(); -require_once INSTALLDIR . '/lib/deletetree.php'; +require_once INSTALLDIR . '/lib/util/deletetree.php'; /** * Plugin install action. diff --git a/actions/profilecompletion.php b/actions/profilecompletion.php index 4b0c4607e7..a2dcf87139 100644 --- a/actions/profilecompletion.php +++ b/actions/profilecompletion.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/peopletageditform.php'; +require_once INSTALLDIR . '/lib/profile/peopletageditform.php'; /** * Subscription action diff --git a/actions/removepeopletag.php b/actions/removepeopletag.php index 20fd80bc7a..093ee68699 100644 --- a/actions/removepeopletag.php +++ b/actions/removepeopletag.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/togglepeopletag.php'; +require_once INSTALLDIR . '/lib/account/togglepeopletag.php'; /** * Subscription action diff --git a/actions/shownotice.php b/actions/shownotice.php index 0db6e43e5d..8f2cfa198f 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -31,7 +31,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } -require_once INSTALLDIR . '/lib/noticelist.php'; +require_once INSTALLDIR . '/lib/notices/noticelist.php'; /** * Show a single notice diff --git a/actions/usergroups.php b/actions/usergroups.php index 6174179802..1046b1afd4 100644 --- a/actions/usergroups.php +++ b/actions/usergroups.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/grouplist.php'; +require_once INSTALLDIR . '/lib/groups/grouplist.php'; /** * User groups page diff --git a/classes/Confirm_address.php b/classes/Confirm_address.php index f0748b888f..f2d1cfae09 100644 --- a/classes/Confirm_address.php +++ b/classes/Confirm_address.php @@ -142,7 +142,7 @@ class Confirm_address extends Managed_DataObject $args['sitename'], $args['url']); - require_once(INSTALLDIR . '/lib/mail.php'); + require_once INSTALLDIR . '/lib/util/mail.php'; return mail_to_user($this->getProfile()->getUser(), $subject, $body, $args['headers'], $this->getAddress()); } diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 9d27c16904..a4687aeae6 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -573,7 +573,7 @@ class Memcached_DataObject extends Safe_DataObject function getSearchEngine($table) { - require_once INSTALLDIR . '/lib/search_engines.php'; + require_once INSTALLDIR . '/lib/search/search_engines.php'; if (Event::handle('GetSearchEngine', array($this, $table, &$search_engine))) { if ('mysql' === common_config('db', 'type')) { diff --git a/classes/Notice.php b/classes/Notice.php index e5cdfae79a..b78d621c01 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1890,7 +1890,7 @@ class Notice extends Managed_DataObject $recipientIds = $this->getReplies(); if (Event::handle('StartNotifyMentioned', array($this, &$recipientIds))) { - require_once INSTALLDIR . '/lib/mail.php'; + require_once INSTALLDIR . '/lib/util/mail.php'; foreach ($recipientIds as $recipientId) { try { diff --git a/classes/User.php b/classes/User.php index 67a94866ac..7774ef53ca 100644 --- a/classes/User.php +++ b/classes/User.php @@ -872,7 +872,7 @@ class User extends Managed_DataObject static function recoverPassword($nore) { - require_once(INSTALLDIR . '/lib/mail.php'); + require_once INSTALLDIR . '/lib/util/mail.php'; // $confirm_email will be used as a fallback if our user doesn't have a confirmed email $confirm_email = null; diff --git a/lib/activitystreams/activityobject.php b/lib/activitystreams/activityobject.php index 7a68b20166..00abc349a6 100644 --- a/lib/activitystreams/activityobject.php +++ b/lib/activitystreams/activityobject.php @@ -32,7 +32,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } -require_once(INSTALLDIR . '/lib/activitystreamjsondocument.php'); +require_once INSTALLDIR . '/lib/activitystreams/activitystreamjsondocument.php'; /** * A noun-ish thing in the activity universe diff --git a/lib/activitystreams/useractivitystream.php b/lib/activitystreams/useractivitystream.php index 656fe9d81f..2528837633 100644 --- a/lib/activitystreams/useractivitystream.php +++ b/lib/activitystreams/useractivitystream.php @@ -359,7 +359,7 @@ class UserActivityStream extends AtomUserNoticeFeed function writeJSON($handle) { - require_once INSTALLDIR . '/lib/activitystreamjsondocument.php'; + require_once INSTALLDIR . '/lib/activitystreams/activitystreamjsondocument.php'; fwrite($handle, '{"items": ['); $this->renderEntries(Feed::JSON, $handle); fwrite($handle, ']}'); diff --git a/lib/admin/pluginenableform.php b/lib/admin/pluginenableform.php index e099886f70..cc988f611a 100644 --- a/lib/admin/pluginenableform.php +++ b/lib/admin/pluginenableform.php @@ -16,7 +16,7 @@ defined('STATUSNET') || die(); -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for enabling a plugin diff --git a/lib/admin/pluginlist.php b/lib/admin/pluginlist.php index db9f0fe4f8..5918c8ebde 100644 --- a/lib/admin/pluginlist.php +++ b/lib/admin/pluginlist.php @@ -16,8 +16,8 @@ defined('STATUSNET') || die(); -require INSTALLDIR . "/lib/pluginenableform.php"; -require INSTALLDIR . "/lib/plugindisableform.php"; +require INSTALLDIR . "/lib/admin/pluginenableform.php"; +require INSTALLDIR . "/lib/admin/plugindisableform.php"; /** * Plugin list diff --git a/lib/api/apioauthaction.php b/lib/api/apioauthaction.php index 95a3bec45d..b5dbdbca6d 100644 --- a/lib/api/apioauthaction.php +++ b/lib/api/apioauthaction.php @@ -30,7 +30,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apiaction.php'; +require_once INSTALLDIR . '/lib/api/apiaction.php'; /** * Base action for API OAuth enpoints. Clean up the diff --git a/lib/application/applicationeditform.php b/lib/application/applicationeditform.php index 4b4356e721..54ff2d6631 100644 --- a/lib/application/applicationeditform.php +++ b/lib/application/applicationeditform.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for editing an application diff --git a/lib/database/dberroraction.php b/lib/database/dberroraction.php index 98c11932bd..9199a0bd98 100644 --- a/lib/database/dberroraction.php +++ b/lib/database/dberroraction.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/servererroraction.php'; +require_once INSTALLDIR . '/lib/action/servererroraction.php'; /** * Class for displaying DB Errors diff --git a/lib/groups/approvegroupform.php b/lib/groups/approvegroupform.php index e64c095a73..aa780c4cee 100644 --- a/lib/groups/approvegroupform.php +++ b/lib/groups/approvegroupform.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for leaving a group diff --git a/lib/groups/groupeditform.php b/lib/groups/groupeditform.php index 9e9c48d137..c0d240c3c1 100644 --- a/lib/groups/groupeditform.php +++ b/lib/groups/groupeditform.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for editing a group diff --git a/lib/groups/grouplist.php b/lib/groups/grouplist.php index dc556d874b..ed9e089972 100644 --- a/lib/groups/grouplist.php +++ b/lib/groups/grouplist.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/widget.php'; +require_once INSTALLDIR . '/lib/ui/widget.php'; /** * Widget to show a list of groups diff --git a/lib/groups/groupminilist.php b/lib/groups/groupminilist.php index fe4a405dc3..4c837b1b16 100644 --- a/lib/groups/groupminilist.php +++ b/lib/groups/groupminilist.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/grouplist.php'; +require_once INSTALLDIR . '/lib/groups/grouplist.php'; /** * Widget to show a list of groups, good for sidebar diff --git a/lib/notices/dofollowlistitem.php b/lib/notices/dofollowlistitem.php index 87fdc3602b..4e035e6f5e 100644 --- a/lib/notices/dofollowlistitem.php +++ b/lib/notices/dofollowlistitem.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/noticelist.php'; +require_once INSTALLDIR . '/lib/notices/noticelist.php'; /** * StatusNet, the distributed open-source microblogging tool diff --git a/lib/profile/cancelsubscriptionform.php b/lib/profile/cancelsubscriptionform.php index 153bd70184..d92fb35f55 100644 --- a/lib/profile/cancelsubscriptionform.php +++ b/lib/profile/cancelsubscriptionform.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for unsubscribing from a user diff --git a/lib/profile/logingroupnav.php b/lib/profile/logingroupnav.php index 22d8d18bad..8c3f3e6d34 100644 --- a/lib/profile/logingroupnav.php +++ b/lib/profile/logingroupnav.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/widget.php'; +require_once INSTALLDIR . '/lib/ui/widget.php'; /** * Menu for login group of actions diff --git a/lib/profile/nudgeform.php b/lib/profile/nudgeform.php index b692c540d0..9da1fbd4d4 100644 --- a/lib/profile/nudgeform.php +++ b/lib/profile/nudgeform.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for nudging a user diff --git a/lib/profile/peopletageditform.php b/lib/profile/peopletageditform.php index c0ddc5001e..f8f830fdb1 100644 --- a/lib/profile/peopletageditform.php +++ b/lib/profile/peopletageditform.php @@ -30,8 +30,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; -require_once INSTALLDIR . '/lib/togglepeopletag.php'; +require_once INSTALLDIR . '/lib/util/form.php'; +require_once INSTALLDIR . '/lib/account/togglepeopletag.php'; /** * Form for editing a peopletag diff --git a/lib/profile/peopletaggroupnav.php b/lib/profile/peopletaggroupnav.php index cd4a7aaa06..6730e8be8f 100644 --- a/lib/profile/peopletaggroupnav.php +++ b/lib/profile/peopletaggroupnav.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/widget.php'; +require_once INSTALLDIR . '/lib/ui/widget.php'; /** * Base class for all actions diff --git a/lib/profile/peopletagnav.php b/lib/profile/peopletagnav.php index 7a5511fe0e..fb2b6b0306 100644 --- a/lib/profile/peopletagnav.php +++ b/lib/profile/peopletagnav.php @@ -30,7 +30,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/widget.php'; +require_once INSTALLDIR . '/lib/ui/widget.php'; /** * Tabset for a group diff --git a/lib/profile/peopletagsection.php b/lib/profile/peopletagsection.php index 0995394516..c4ad80d2cd 100644 --- a/lib/profile/peopletagsection.php +++ b/lib/profile/peopletagsection.php @@ -30,7 +30,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/peopletaglist.php'; +require_once INSTALLDIR . '/lib/profile/peopletaglist.php'; define('PEOPLETAGS_PER_SECTION', 6); diff --git a/lib/profile/subscribeform.php b/lib/profile/subscribeform.php index ad8ae985ea..a284300210 100644 --- a/lib/profile/subscribeform.php +++ b/lib/profile/subscribeform.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for subscribing to a user diff --git a/lib/profile/subscribepeopletagform.php b/lib/profile/subscribepeopletagform.php index 0bd04886f2..9549432498 100644 --- a/lib/profile/subscribepeopletagform.php +++ b/lib/profile/subscribepeopletagform.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for subscribing to a peopletag diff --git a/lib/profile/togglepeopletag.php b/lib/profile/togglepeopletag.php index f8af36b15e..6206831ab6 100644 --- a/lib/profile/togglepeopletag.php +++ b/lib/profile/togglepeopletag.php @@ -30,7 +30,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for editing a peopletag diff --git a/lib/profile/unsubscribeform.php b/lib/profile/unsubscribeform.php index b058ad9f22..142badef6e 100644 --- a/lib/profile/unsubscribeform.php +++ b/lib/profile/unsubscribeform.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for unsubscribing from a user diff --git a/lib/profile/unsubscribepeopletagform.php b/lib/profile/unsubscribepeopletagform.php index ebb092325b..59518072db 100644 --- a/lib/profile/unsubscribepeopletagform.php +++ b/lib/profile/unsubscribepeopletagform.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for unsubscribing to a peopletag diff --git a/lib/queue/pingqueuehandler.php b/lib/queue/pingqueuehandler.php index 0e62774bd5..04eec0a9ee 100644 --- a/lib/queue/pingqueuehandler.php +++ b/lib/queue/pingqueuehandler.php @@ -36,7 +36,7 @@ class PingQueueHandler extends QueueHandler { return true; } - require_once INSTALLDIR . '/lib/ping.php'; + require_once INSTALLDIR . '/lib/util/ping.php'; return ping_broadcast_notice($notice); } } diff --git a/lib/queue/smsqueuehandler.php b/lib/queue/smsqueuehandler.php index ab7c2ec4e8..1ac86356fd 100644 --- a/lib/queue/smsqueuehandler.php +++ b/lib/queue/smsqueuehandler.php @@ -36,7 +36,7 @@ class SmsQueueHandler extends QueueHandler return true; } - require_once(INSTALLDIR . '/lib/mail.php'); + require_once INSTALLDIR . '/lib/util/mail.php'; return mail_broadcast_notice_sms($notice); } } diff --git a/lib/search/searchaction.php b/lib/search/searchaction.php index f9433bf266..feb4f58b6c 100644 --- a/lib/search/searchaction.php +++ b/lib/search/searchaction.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/searchgroupnav.php'; +require_once INSTALLDIR . '/lib/search/searchgroupnav.php'; /** * Base search action class. diff --git a/lib/ui/inviteform.php b/lib/ui/inviteform.php index 364ca75b9b..64ffe1786b 100644 --- a/lib/ui/inviteform.php +++ b/lib/ui/inviteform.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for inviting collegues and friends diff --git a/lib/ui/subgroupnav.php b/lib/ui/subgroupnav.php index 83cfcd51eb..cfa82ad3db 100644 --- a/lib/ui/subgroupnav.php +++ b/lib/ui/subgroupnav.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/widget.php'; +require_once INSTALLDIR . '/lib/ui/widget.php'; /** * Local nav menu for subscriptions, subscribers diff --git a/lib/util/command.php b/lib/util/command.php index 3e07ff8e59..141878843d 100644 --- a/lib/util/command.php +++ b/lib/util/command.php @@ -19,7 +19,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } -require_once(INSTALLDIR . '/lib/util/channel.php'); +require_once(INSTALLDIR . '/lib/ui/channel.php'); class Command { diff --git a/lib/util/commandinterpreter.php b/lib/util/commandinterpreter.php index 42716930a3..85a1cb9e0c 100644 --- a/lib/util/commandinterpreter.php +++ b/lib/util/commandinterpreter.php @@ -19,7 +19,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/command.php'; +require_once INSTALLDIR . '/lib/util/command.php'; class CommandInterpreter { diff --git a/lib/util/common.php b/lib/util/common.php index 4a74fb5e7f..0b8ed3f222 100644 --- a/lib/util/common.php +++ b/lib/util/common.php @@ -24,7 +24,7 @@ mb_internal_encoding('UTF-8'); // All the fun stuff to actually initialize GNU social's framework code, // without loading up a site configuration. -require_once INSTALLDIR . '/lib/framework.php'; +require_once INSTALLDIR . '/lib/util/framework.php'; try { GNUsocial::init(@$server, @$path, @$conffile); diff --git a/lib/util/form.php b/lib/util/form.php index 48c3712214..3887ae2e71 100644 --- a/lib/util/form.php +++ b/lib/util/form.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/widget.php'; +require_once INSTALLDIR . '/lib/ui/widget.php'; /** * Base class for forms diff --git a/lib/util/framework.php b/lib/util/framework.php index 928383a5fe..e34dd06ede 100644 --- a/lib/util/framework.php +++ b/lib/util/framework.php @@ -100,12 +100,12 @@ require_once 'DB/DataObject/Cast.php'; # for dates global $_DB; $_DB = new DB; -require_once INSTALLDIR . '/lib/language.php'; +require_once INSTALLDIR . '/lib/util/language.php'; // This gets included before the config file, so that admin code and plugins // can use it -require_once INSTALLDIR . '/lib/event.php'; +require_once INSTALLDIR . '/lib/util/event.php'; require_once INSTALLDIR . '/lib/modules/Module.php'; require_once INSTALLDIR . '/lib/modules/Plugin.php'; @@ -163,9 +163,9 @@ spl_autoload_register(function ($class) { return; } }); -require_once INSTALLDIR . '/lib/util.php'; -require_once INSTALLDIR . '/lib/action.php'; -require_once INSTALLDIR . '/lib/mail.php'; +require_once INSTALLDIR . '/lib/util/util.php'; +require_once INSTALLDIR . '/lib/action/action.php'; +require_once INSTALLDIR . '/lib/util/mail.php'; //set PEAR error handling to use regular PHP exceptions function PEAR_ErrorToPEAR_Exception(PEAR_Error $err) diff --git a/lib/util/gnusocial.php b/lib/util/gnusocial.php index 6f3db149f9..7bf083d9f9 100644 --- a/lib/util/gnusocial.php +++ b/lib/util/gnusocial.php @@ -352,7 +352,7 @@ class GNUsocial protected static function defaultConfig() { global $_server, $_path; - require(INSTALLDIR . '/lib/default.php'); + require(INSTALLDIR . '/lib/util/default.php'); return $default; } diff --git a/lib/util/installer.php b/lib/util/installer.php index 97886b40c5..b297ad191a 100644 --- a/lib/util/installer.php +++ b/lib/util/installer.php @@ -152,11 +152,11 @@ abstract class Installer if (!$this->skipConfig) { define('GNUSOCIAL', true); define('STATUSNET', true); - require_once INSTALLDIR . '/lib/language.php'; + require_once INSTALLDIR . '/lib/util/language.php'; $_server = $this->server; $_path = $this->path; // We won't be using those so it's safe to do this small hack - require_once INSTALLDIR . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'util.php'; - require_once INSTALLDIR . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'default.php'; + require_once INSTALLDIR . '/lib/util/util.php'; + require_once INSTALLDIR . '/lib/util/default.php'; $fileSubdirs = [ empty($this->avatarDir) ? $default['avatar']['dir'] : $this->avatarDir, empty($this->fileDir) ? $default['attachments']['dir'] : $this->fileDir @@ -535,7 +535,7 @@ abstract class Installer // initalize hostname from install arguments, so it can be used to find // the /etc config file from the commandline installer $server = $this->server; - require_once INSTALLDIR . '/lib/common.php'; + require_once INSTALLDIR . '/lib/util/common.php'; $data = ['nickname' => $this->adminNick, 'password' => $this->adminPass, @@ -580,7 +580,7 @@ abstract class Installer define('STATUSNET', true); } - require_once INSTALLDIR . '/lib/framework.php'; + require_once INSTALLDIR . '/lib/util/framework.php'; GNUsocial::initDefaults($this->server, $this->path); if ($this->siteProfile == "singleuser") { diff --git a/lib/util/mailhandler.php b/lib/util/mailhandler.php index a716335193..4e2eb1eea1 100644 --- a/lib/util/mailhandler.php +++ b/lib/util/mailhandler.php @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -require_once(INSTALLDIR . '/lib/mail.php'); +require_once INSTALLDIR . '/lib/util/mail.php'; require_once('Mail/mimeDecode.php'); // @todo FIXME: we use both Mail_mimeDecode and mailparse diff --git a/lib/util/util.php b/lib/util/util.php index 5274045ee6..efd33568f5 100644 --- a/lib/util/util.php +++ b/lib/util/util.php @@ -1102,7 +1102,7 @@ function callback_helper($matches, $callback, $arg = null) return substr($matches[0], 0, $left) . $result . substr($matches[0], $right); } -require_once INSTALLDIR . "/lib/callableleftcurry.php"; +require_once INSTALLDIR . '/lib/util/callableleftcurry.php'; function common_linkify($url) { diff --git a/modules/Favorite/FavoriteModule.php b/modules/Favorite/FavoriteModule.php index 87fab6ee9a..e969939b21 100644 --- a/modules/Favorite/FavoriteModule.php +++ b/modules/Favorite/FavoriteModule.php @@ -602,7 +602,7 @@ function mail_notify_fave(User $rcpt, Profile $sender, Notice $notice) } // We need the global mail.php for various mail related functions below. - require_once INSTALLDIR . '/lib/mail.php'; + require_once INSTALLDIR . '/lib/util/mail.php'; $bestname = $sender->getBestName(); diff --git a/plugins/ActivitySpam/actions/spam.php b/plugins/ActivitySpam/actions/spam.php index 1e2c2c5eb7..b708c895ec 100644 --- a/plugins/ActivitySpam/actions/spam.php +++ b/plugins/ActivitySpam/actions/spam.php @@ -34,7 +34,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/noticelist.php'; +require_once INSTALLDIR . '/lib/notices/noticelist.php'; /** * SpamAction diff --git a/plugins/AnonymousFave/forms/anondisfavor.php b/plugins/AnonymousFave/forms/anondisfavor.php index 0382a50f97..e191133277 100644 --- a/plugins/AnonymousFave/forms/anondisfavor.php +++ b/plugins/AnonymousFave/forms/anondisfavor.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for disfavoring a notice anonymously diff --git a/plugins/AnonymousFave/forms/anonfavor.php b/plugins/AnonymousFave/forms/anonfavor.php index a33b375c15..d2250c8723 100644 --- a/plugins/AnonymousFave/forms/anonfavor.php +++ b/plugins/AnonymousFave/forms/anonfavor.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for favoring a notice anonymously diff --git a/plugins/DomainWhitelist/forms/whitelistinvite.php b/plugins/DomainWhitelist/forms/whitelistinvite.php index 77a48f92fa..d4daa4ce12 100644 --- a/plugins/DomainWhitelist/forms/whitelistinvite.php +++ b/plugins/DomainWhitelist/forms/whitelistinvite.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for inviting collegues and friends diff --git a/plugins/Embed/tests/EmbedTest.php b/plugins/Embed/tests/EmbedTest.php index daa829a72c..17dab7ce50 100644 --- a/plugins/Embed/tests/EmbedTest.php +++ b/plugins/Embed/tests/EmbedTest.php @@ -34,7 +34,7 @@ if (!defined('GNUSOCIAL')) { if (!defined('STATUSNET')) { // Compatibility define('STATUSNET', true); } -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; final class oEmbedTest extends TestCase { diff --git a/plugins/Linkback/LinkbackPlugin.php b/plugins/Linkback/LinkbackPlugin.php index c0cff54c26..0fce09502b 100644 --- a/plugins/Linkback/LinkbackPlugin.php +++ b/plugins/Linkback/LinkbackPlugin.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once(__DIR__ . '/lib/util.php'); +require_once __DIR__ . '/lib/util/util.php'; define('LINKBACKPLUGIN_VERSION', '0.2'); diff --git a/plugins/MentionURL/MentionURLPlugin.php b/plugins/MentionURL/MentionURLPlugin.php index 83810f46f5..79d8596842 100644 --- a/plugins/MentionURL/MentionURLPlugin.php +++ b/plugins/MentionURL/MentionURLPlugin.php @@ -2,7 +2,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } -require_once __DIR__ . '/lib/util.php'; +require_once __DIR__ . '/lib/util/util.php'; /* * This plugin lets you type @twitter.com/singpolyma diff --git a/plugins/OStatus/actions/ostatuspeopletag.php b/plugins/OStatus/actions/ostatuspeopletag.php index e7ccbc20a1..1afcc8bf4a 100644 --- a/plugins/OStatus/actions/ostatuspeopletag.php +++ b/plugins/OStatus/actions/ostatuspeopletag.php @@ -24,7 +24,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR . '/lib/peopletaglist.php'; +require_once INSTALLDIR . '/lib/profile/peopletaglist.php'; /** * Key UI methods: diff --git a/plugins/OStatus/tests/FeedDiscoveryTest.php b/plugins/OStatus/tests/FeedDiscoveryTest.php index 28ac549c89..a341cda83e 100644 --- a/plugins/OStatus/tests/FeedDiscoveryTest.php +++ b/plugins/OStatus/tests/FeedDiscoveryTest.php @@ -9,7 +9,7 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); define('GNUSOCIAL', true); define('STATUSNET', true); // compatibility -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; require_once INSTALLDIR . '/plugins/OStatus/lib/feeddiscovery.php'; class FeedDiscoveryTest extends PHPUnit_Framework_TestCase diff --git a/plugins/OStatus/tests/MagicEnvelopeTest.php b/plugins/OStatus/tests/MagicEnvelopeTest.php index fd5ad54129..2bf80b34ff 100644 --- a/plugins/OStatus/tests/MagicEnvelopeTest.php +++ b/plugins/OStatus/tests/MagicEnvelopeTest.php @@ -9,7 +9,7 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); define('GNUSOCIAL', true); define('STATUSNET', true); // compatibility -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; class MagicEnvelopeTest extends PHPUnit_Framework_TestCase { diff --git a/plugins/QnA/forms/qnashowanswer.php b/plugins/QnA/forms/qnashowanswer.php index 8ca573c1c1..7700bd0947 100644 --- a/plugins/QnA/forms/qnashowanswer.php +++ b/plugins/QnA/forms/qnashowanswer.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for showing / revising an answer diff --git a/plugins/QnA/forms/qnashowquestion.php b/plugins/QnA/forms/qnashowquestion.php index 0ac1c82377..06bb32adc2 100644 --- a/plugins/QnA/forms/qnashowquestion.php +++ b/plugins/QnA/forms/qnashowquestion.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for showing a question diff --git a/plugins/TwitterBridge/actions/twitterauthorization.php b/plugins/TwitterBridge/actions/twitterauthorization.php index 9ee7e6b899..c35f4f25cd 100644 --- a/plugins/TwitterBridge/actions/twitterauthorization.php +++ b/plugins/TwitterBridge/actions/twitterauthorization.php @@ -31,7 +31,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } require_once dirname(__DIR__) . '/twitter.php'; -require_once INSTALLDIR . '/lib/oauthclient.php'; +require_once INSTALLDIR . '/lib/util/oauthclient.php'; /** * Class for doing OAuth authentication against Twitter diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php index 83e8a0df5e..8053e27cc5 100755 --- a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php +++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php @@ -37,8 +37,8 @@ Batch script for retrieving Twitter messages from foreign service. END_OF_TRIM_HELP; require_once INSTALLDIR . '/scripts/commandline.inc'; -require_once INSTALLDIR . '/lib/common.php'; -require_once INSTALLDIR . '/lib/daemon.php'; +require_once INSTALLDIR . '/lib/util/common.php'; +require_once INSTALLDIR . '/lib/util/daemon.php'; require_once dirname(__DIR__) . '/twitter.php'; /** diff --git a/plugins/UserFlag/forms/clearflag.php b/plugins/UserFlag/forms/clearflag.php index af72003762..8b2b31aede 100644 --- a/plugins/UserFlag/forms/clearflag.php +++ b/plugins/UserFlag/forms/clearflag.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for clearing profile flags diff --git a/plugins/UserFlag/forms/flagprofile.php b/plugins/UserFlag/forms/flagprofile.php index df2face1de..b1c07e9f40 100644 --- a/plugins/UserFlag/forms/flagprofile.php +++ b/plugins/UserFlag/forms/flagprofile.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/form.php'; +require_once INSTALLDIR . '/lib/util/form.php'; /** * Form for flagging a profile diff --git a/public/index.php b/public/index.php index 59613a4d67..774796ca5a 100644 --- a/public/index.php +++ b/public/index.php @@ -168,7 +168,7 @@ if (preg_replace("/\?.+$/", "", $_SERVER['REQUEST_URI']) === preg_replace("/^\/$ die("Fancy URL support detection succeeded. We suggest you enable this to get fancy (pretty) URLs."); } -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; /** * Format a backtrace line for debug output roughly like debug_print_backtrace() does. diff --git a/scripts/commandline.inc b/scripts/commandline.inc index 296de70529..00d00f8111 100644 --- a/scripts/commandline.inc +++ b/scripts/commandline.inc @@ -120,7 +120,7 @@ foreach ($options as $option) { } } -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; set_error_handler('common_error_handler'); diff --git a/scripts/console.php b/scripts/console.php index 3424c7b244..8e7f925a5f 100644 --- a/scripts/console.php +++ b/scripts/console.php @@ -29,7 +29,7 @@ define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public'); define('GNUSOCIAL', true); define('STATUSNET', true); -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; // Try to find an autoloader for a local psysh version. // We'll wrap this whole mess in a Closure so it doesn't leak any globals. diff --git a/scripts/fixup_hashtags.php b/scripts/fixup_hashtags.php index 343c9ee144..8a3b6d5c60 100755 --- a/scripts/fixup_hashtags.php +++ b/scripts/fixup_hashtags.php @@ -29,7 +29,7 @@ define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public'); define('GNUSOCIAL', true); define('STATUSNET', true); // compatibility -require_once(INSTALLDIR . '/lib/common.php'); +require_once INSTALLDIR . '/lib/util/common.php'; common_log(LOG_INFO, 'Starting to do old notices.'); diff --git a/scripts/install_cli.php b/scripts/install_cli.php index e4f8f600b1..e1040e4bc8 100755 --- a/scripts/install_cli.php +++ b/scripts/install_cli.php @@ -34,7 +34,7 @@ define('INSTALLDIR', dirname(__DIR__)); define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public'); set_include_path(get_include_path() . PATH_SEPARATOR . INSTALLDIR . '/extlib'); -require_once INSTALLDIR . '/lib/installer.php'; +require_once INSTALLDIR . '/lib/util/installer.php'; require_once 'Console/Getopt.php'; class CliInstaller extends Installer diff --git a/scripts/maildaemon.php b/scripts/maildaemon.php index 988778507d..d505c8dfca 100755 --- a/scripts/maildaemon.php +++ b/scripts/maildaemon.php @@ -27,8 +27,8 @@ as STDIN. END_OF_HELP; -require_once INSTALLDIR.'/scripts/commandline.inc'; -require_once INSTALLDIR . '/lib/mailhandler.php'; +require_once INSTALLDIR . '/scripts/commandline.inc'; +require_once INSTALLDIR . '/lib/util/mailhandler.php'; if (common_config('emailpost', 'enabled')) { $mh = new MailHandler(); diff --git a/scripts/queuedaemon.php b/scripts/queuedaemon.php index 793b67f6c4..a1b9126886 100755 --- a/scripts/queuedaemon.php +++ b/scripts/queuedaemon.php @@ -71,9 +71,9 @@ END_OF_QUEUE_HELP; require_once INSTALLDIR.'/scripts/commandline.inc'; -require_once(INSTALLDIR . '/lib/daemon.php'); -require_once(INSTALLDIR.'/classes/Queue_item.php'); -require_once(INSTALLDIR.'/classes/Notice.php'); +require_once INSTALLDIR . '/lib/util/daemon.php'; +require_once(INSTALLDIR . '/classes/Queue_item.php'); +require_once(INSTALLDIR . '/classes/Notice.php'); /** * Queue handling daemon... diff --git a/scripts/resend_confirm_address.php b/scripts/resend_confirm_address.php index 8a456a812c..0c7b54c11f 100755 --- a/scripts/resend_confirm_address.php +++ b/scripts/resend_confirm_address.php @@ -85,7 +85,7 @@ function mailConfirmAddress(Confirm_address $ca) mail_confirm_address($user, $ca->code, $user->getNickname(), $ca->address); } -require_once(INSTALLDIR . '/lib/mail.php'); +require_once INSTALLDIR . '/lib/util/mail.php'; if (!$all) { mailConfirmAddress($ca); diff --git a/scripts/update_translations.php b/scripts/update_translations.php index 72ea81bdb6..effeb0e9b4 100755 --- a/scripts/update_translations.php +++ b/scripts/update_translations.php @@ -29,7 +29,7 @@ define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public'); define('GNUSOCIAL', true); define('STATUSNET', true); // compatibility -require_once(INSTALLDIR . '/lib/common.php'); +require_once INSTALLDIR . '/lib/util/common.php'; // Master StatusNet .pot file location (created by update_pot.sh) $statusnet_pot = INSTALLDIR . '/locale/statusnet.pot'; diff --git a/tests/Core/ActivityGenerationTests.php b/tests/Core/ActivityGenerationTests.php index 19fe34a723..57fa335681 100644 --- a/tests/Core/ActivityGenerationTests.php +++ b/tests/Core/ActivityGenerationTests.php @@ -41,7 +41,7 @@ use PHPUnit\Framework\TestCase; use User; use User_group; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; final class ActivityGenerationTests extends TestCase { diff --git a/tests/Core/ActivityParseTests.php b/tests/Core/ActivityParseTests.php index 3cf503ef50..fcba03363b 100644 --- a/tests/Core/ActivityParseTests.php +++ b/tests/Core/ActivityParseTests.php @@ -36,7 +36,7 @@ use ActivityVerb; use DOMDocument; use PHPUnit\Framework\TestCase; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; final class ActivityParseTests extends TestCase { diff --git a/tests/Core/CallableLeftCurryTest.php b/tests/Core/CallableLeftCurryTest.php index b3eeea33dc..e0b8743eef 100644 --- a/tests/Core/CallableLeftCurryTest.php +++ b/tests/Core/CallableLeftCurryTest.php @@ -25,7 +25,7 @@ if (!defined('GNUSOCIAL')) { use PHPUnit\Framework\TestCase; -require_once INSTALLDIR . "/lib/callableleftcurry.php"; +require_once INSTALLDIR . '/lib/util/callableleftcurry.php'; final class CallableLeftCurryTest extends TestCase { diff --git a/tests/Core/CommandInterperterTest.php b/tests/Core/CommandInterperterTest.php index aea9b25ae0..63877935c3 100644 --- a/tests/Core/CommandInterperterTest.php +++ b/tests/Core/CommandInterperterTest.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET')) { // Compatibility use CommandInterpreter; use PHPUnit\Framework\TestCase; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; final class CommandInterpreterTest extends TestCase { diff --git a/tests/Core/HashTagDetectionTests.php b/tests/Core/HashTagDetectionTests.php index f5b23d50a6..7d5086e4e2 100644 --- a/tests/Core/HashTagDetectionTests.php +++ b/tests/Core/HashTagDetectionTests.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { // Compatibility use PHPUnit\Framework\TestCase; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; final class HashTagDetectionTests extends TestCase { diff --git a/tests/Core/LocationTest.php b/tests/Core/LocationTest.php index 31882e76d9..9293e75b95 100644 --- a/tests/Core/LocationTest.php +++ b/tests/Core/LocationTest.php @@ -33,7 +33,7 @@ use GeonamesPlugin; use Location; use PHPUnit\Framework\TestCase; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; // Make sure this is loaded // XXX: how to test other plugins...? diff --git a/tests/Core/NicknameTest.php b/tests/Core/NicknameTest.php index 0235f6ee9d..75a1c8a362 100644 --- a/tests/Core/NicknameTest.php +++ b/tests/Core/NicknameTest.php @@ -39,7 +39,7 @@ use NicknameTakenException; use NicknameTooLongException; use PHPUnit\Framework\TestCase; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; /** * Test cases for nickname validity and normalization. diff --git a/tests/Core/TagURITest.php b/tests/Core/TagURITest.php index c24048737c..a1e852b6cf 100644 --- a/tests/Core/TagURITest.php +++ b/tests/Core/TagURITest.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { // Compatibility use PHPUnit\Framework\TestCase; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; $config['site']['server'] = 'example.net'; $config['site']['path'] = '/apps/statusnet'; diff --git a/tests/Core/URLDetectionTest.php b/tests/Core/URLDetectionTest.php index 621c1355e0..0557d9e68f 100644 --- a/tests/Core/URLDetectionTest.php +++ b/tests/Core/URLDetectionTest.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET')) { // Compatibility use PHPUnit\Framework\TestCase; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; final class URLDetectionTest extends TestCase { diff --git a/tests/Core/UUIDTest.php b/tests/Core/UUIDTest.php index 9bc739f2e3..88aa4dd201 100644 --- a/tests/Core/UUIDTest.php +++ b/tests/Core/UUIDTest.php @@ -32,7 +32,7 @@ if (!defined('STATUSNET')) { // Compatibility use PHPUnit\Framework\TestCase; use UUID; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; final class UUIDTest extends TestCase { diff --git a/tests/Core/UserFeedParseTest.php b/tests/Core/UserFeedParseTest.php index ca09c36300..798d964d66 100644 --- a/tests/Core/UserFeedParseTest.php +++ b/tests/Core/UserFeedParseTest.php @@ -34,7 +34,7 @@ use ActivityObject; use DOMDocument; use PHPUnit\Framework\TestCase; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; final class UserFeedParseTests extends TestCase { diff --git a/tests/Core/UserRightsTest.php b/tests/Core/UserRightsTest.php index 87d0aa2ef0..cae857d5f6 100644 --- a/tests/Core/UserRightsTest.php +++ b/tests/Core/UserRightsTest.php @@ -33,7 +33,7 @@ use Exception; use PHPUnit\Framework\TestCase; use User; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; final class UserRightsTest extends TestCase { diff --git a/tests/Core/XmppValidateTest.php b/tests/Core/XmppValidateTest.php index 62c005e8f0..35b2ffe5a2 100644 --- a/tests/Core/XmppValidateTest.php +++ b/tests/Core/XmppValidateTest.php @@ -33,7 +33,7 @@ use GNUsocial; use PHPUnit\Framework\TestCase; use XmppPlugin; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; require_once INSTALLDIR . '/plugins/Xmpp/XmppModule.php'; final class XmppValidateTest extends TestCase diff --git a/tests/Media/MediaFileTest.php b/tests/Media/MediaFileTest.php index 1b0d99a472..05b00db697 100644 --- a/tests/Media/MediaFileTest.php +++ b/tests/Media/MediaFileTest.php @@ -35,7 +35,7 @@ use MediaFile; use PHPUnit\Framework\TestCase; use ServerException; -require_once INSTALLDIR . '/lib/common.php'; +require_once INSTALLDIR . '/lib/util/common.php'; final class MediaFileTest extends TestCase {