X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FImap%2FImapPlugin.php;h=ea6eaabef88598ecda07764443efe4126e444ddb;hb=dc5b302fe9ac5906bac29b279dc78ad2d2625536;hp=d1e920b009111d42f40f565bda2413beadc452d1;hpb=bd8506eee883ecd424fdf3d7e545c10c754df6ff;p=quix0rs-gnu-social.git diff --git a/plugins/Imap/ImapPlugin.php b/plugins/Imap/ImapPlugin.php index d1e920b009..ea6eaabef8 100644 --- a/plugins/Imap/ImapPlugin.php +++ b/plugins/Imap/ImapPlugin.php @@ -2,7 +2,7 @@ /** * StatusNet, the distributed open-source microblogging tool * - * Plugin to add a StatusNet Facebook application + * IMAP plugin to allow StatusNet to grab incoming emails and handle them as new user posts * * PHP version 5 * @@ -21,8 +21,9 @@ * * @category Plugin * @package StatusNet - * @author Zach Copley + * @author Craig Andrews mailbox)){ - throw new Exception("must specify a mailbox"); + // TRANS: Exception thrown when configuration of the IMAP plugin is incorrect. + throw new Exception(_m('A mailbox must be specified.')); } if(!isset($this->user)){ - throw new Exception("must specify a user"); + // TRANS: Exception thrown when configuration of the IMAP plugin is incorrect. + throw new Exception(_m('A user must be specified.')); } if(!isset($this->password)){ - throw new Exception("must specify a password"); + // TRANS: Exception thrown when configuration of the IMAP plugin is incorrect. + throw new Exception(_m('A password must be specified.')); } if(!isset($this->poll_frequency)){ - throw new Exception("must specify a poll_frequency"); + // TRANS: Exception thrown when configuration of the IMAP plugin is incorrect. + // TRANS: poll_frequency is a setting that should not be translated. + throw new Exception(_m('A poll_frequency must be specified.')); } return true; } - /** - * Load related modules when needed - * - * @param string $cls Name of the class to be loaded - * - * @return boolean hook value; true means continue processing, false means stop. - */ - function onAutoload($cls) - { - $dir = dirname(__FILE__); - - switch ($cls) - { - case 'ImapManager': - case 'IMAPMailHandler': - include_once $dir . '/'.strtolower($cls).'.php'; - return false; - default: - return true; - } - } - function onStartQueueDaemonIoManagers(&$classes) { $classes[] = new ImapManager($this); } - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $versions[] = array('name' => 'IMAP', - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:IMAP', 'rawdescription' => + // TRANS: Plugin description. _m('The IMAP plugin allows for StatusNet to check a POP or IMAP mailbox for incoming mail containing user posts.')); return true; }