[ActivityPub] Move models from 'classes' to 'lib/models'

This commit is contained in:
Diogo Cordeiro 2019-08-13 02:54:38 +01:00
parent 7fa5ddfc44
commit eccb8a4faf
14 changed files with 21 additions and 20 deletions

View File

@ -26,13 +26,14 @@
defined('GNUSOCIAL') || die(); defined('GNUSOCIAL') || die();
// Import required files by the plugin // Import plugin libs
require_once __DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'httpsignature.php'; foreach (glob(__DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . '*.php') as $filename) {
require_once __DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'discoveryhints.php'; require_once $filename;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'explorer.php'; }
require_once __DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'postman.php'; // Import plugin models
require_once __DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'inbox_handler.php'; foreach (glob(__DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . '*.php') as $filename) {
require_once __DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'activitypubqueuehandler.php'; require_once $filename;
}
// So that this isn't hardcoded everywhere // So that this isn't hardcoded everywhere
define('ACTIVITYPUB_BASE_ACTOR_URI', common_root_url().'index.php/user/'); define('ACTIVITYPUB_BASE_ACTOR_URI', common_root_url().'index.php/user/');

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_accept extends Managed_DataObject class Activitypub_accept
{ {
/** /**
* Generates an ActivityPub representation of a Accept * Generates an ActivityPub representation of a Accept

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_announce extends Managed_DataObject class Activitypub_announce
{ {
/** /**
* Generates an ActivityPub representation of a Announce * Generates an ActivityPub representation of a Announce

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_attachment extends Managed_DataObject class Activitypub_attachment
{ {
/** /**
* Generates a pretty array from an Attachment object * Generates a pretty array from an Attachment object

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_create extends Managed_DataObject class Activitypub_create
{ {
/** /**
* Generates an ActivityPub representation of a Create * Generates an ActivityPub representation of a Create

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_delete extends Managed_DataObject class Activitypub_delete
{ {
/** /**
* Generates an ActivityPub representation of a Delete * Generates an ActivityPub representation of a Delete

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_error extends Managed_DataObject class Activitypub_error
{ {
/** /**
* Generates a pretty error from a string * Generates a pretty error from a string

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_follow extends Managed_DataObject class Activitypub_follow
{ {
/** /**
* Generates an ActivityPub representation of a subscription * Generates an ActivityPub representation of a subscription

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_like extends Managed_DataObject class Activitypub_like
{ {
/** /**
* Generates an ActivityPub representation of a Like * Generates an ActivityPub representation of a Like

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_mention_tag extends Managed_DataObject class Activitypub_mention_tag
{ {
/** /**
* Generates an ActivityPub representation of a Mention Tag * Generates an ActivityPub representation of a Mention Tag

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_notice extends Managed_DataObject class Activitypub_notice
{ {
/** /**
* Generates a pretty notice from a Notice object * Generates a pretty notice from a Notice object

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_reject extends Managed_DataObject class Activitypub_reject
{ {
/** /**
* Generates an ActivityPub representation of a Reject * Generates an ActivityPub representation of a Reject

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_tag extends Managed_DataObject class Activitypub_tag
{ {
/** /**
* Generates a pretty tag from a Tag object * Generates a pretty tag from a Tag object

View File

@ -34,7 +34,7 @@ defined('GNUSOCIAL') || die();
* @author Diogo Cordeiro <diogo@fc.up.pt> * @author Diogo Cordeiro <diogo@fc.up.pt>
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activitypub_undo extends Managed_DataObject class Activitypub_undo
{ {
/** /**
* Generates an ActivityPub representation of a Undo * Generates an ActivityPub representation of a Undo