12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
- if (!defined('STATUSNET')) {
- exit(1);
- }
- class ImapPlugin extends Plugin
- {
- 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(&$versions)
- {
- $versions[] = array('name' => 'IMAP',
- 'version' => GNUSOCIAL_VERSION,
- 'author' => 'Craig Andrews',
- 'homepage' => 'http://status.net/wiki/Plugin:IMAP',
- 'rawdescription' =>
-
- _m('The IMAP plugin allows for StatusNet to check a POP or IMAP mailbox for incoming mail containing user posts.'));
- return true;
- }
- }
|