X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FImap%2Fimapmanager.php;h=b731b2907466603565467eb8df2ad74937296105;hb=e1791525e818d7d4276da0fe7e7c526fe8794e7c;hp=e2f8c6d5431f829dd6153d03c95f04145669e5d3;hpb=78ed0348b0eaaebf7a51d55adc7e746cc5b43bbf;p=quix0rs-gnu-social.git diff --git a/plugins/Imap/imapmanager.php b/plugins/Imap/imapmanager.php index e2f8c6d543..b731b29074 100644 --- a/plugins/Imap/imapmanager.php +++ b/plugins/Imap/imapmanager.php @@ -29,6 +29,10 @@ * @link http://status.net/ */ +if (!defined('STATUSNET')) { + exit(1); +} + class ImapManager extends IoManager { protected $conn = null; @@ -44,7 +48,8 @@ class ImapManager extends IoManager */ public static function get() { - throw new Exception(_m('ImapManager should be created using its constructor, not the using the static get method.')); + // TRANS: Exception thrown when the ImapManager is used incorrectly in the code. + throw new Exception(_m('ImapManager should be created using its constructor, not using the static "get()" method.')); } /** @@ -59,12 +64,14 @@ class ImapManager extends IoManager } /** - * Tell the i/o master we need one instance for each supporting site - * being handled in this process. + * Tell the i/o master we need one instance globally. + * Since this is a plugin manager, the plugin class itself will + * create one instance per site. This prevents the IoMaster from + * making more instances. */ public static function multiSite() { - return IoManager::INSTANCE_PER_SITE; + return IoManager::GLOBAL_SINGLE_ONLY; } /**