123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <?php
- if (!defined('STATUSNET')) {
- exit(1);
- }
- class ImapPlugin extends Plugin
- {
- const PLUGIN_VERSION = '2.0.0';
- public $mailbox;
- public $user;
- public $password;
- public $poll_frequency = 60;
- function initialize(){
- if(!isset($this->mailbox)){
-
- throw new Exception(_m('A mailbox must be specified.'));
- }
- if(!isset($this->user)){
-
- throw new Exception(_m('A user must be specified.'));
- }
- if(!isset($this->password)){
-
- throw new Exception(_m('A password must be specified.'));
- }
- if(!isset($this->poll_frequency)){
-
-
- throw new Exception(_m('A poll_frequency must be specified.'));
- }
- return true;
- }
- function onStartQueueDaemonIoManagers(&$classes)
- {
- $classes[] = new ImapManager($this);
- }
- function onPluginVersion(array &$versions)
- {
- $versions[] = array('name' => 'IMAP',
- 'version' => self::PLUGIN_VERSION,
- 'author' => 'Craig Andrews',
- 'homepage' => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/IMAP',
- 'rawdescription' =>
-
- _m('The IMAP plugin allows for StatusNet to check a POP or IMAP mailbox for incoming mail containing user posts.'));
- return true;
- }
- }
|