Fix/prepare plugins to use out of Roundcube (where rcmail object doesn't exist)
This commit is contained in:
parent
5be0b06fcb
commit
2d08c58e56
22 changed files with 62 additions and 62 deletions
|
@ -75,7 +75,7 @@ class calendar extends rcube_plugin
|
||||||
{
|
{
|
||||||
$this->require_plugin('libcalendaring');
|
$this->require_plugin('libcalendaring');
|
||||||
|
|
||||||
$this->rc = rcmail::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
$this->lib = libcalendaring::get_instance();
|
$this->lib = libcalendaring::get_instance();
|
||||||
|
|
||||||
$this->register_task('calendar', 'calendar');
|
$this->register_task('calendar', 'calendar');
|
||||||
|
@ -1094,7 +1094,7 @@ class calendar extends rcube_plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ((array)$event['attachments'] as $k => $attachment) {
|
foreach ((array)$event['attachments'] as $k => $attachment) {
|
||||||
$event['attachments'][$k]['classname'] = rcmail_filetype2classname($attachment['mimetype'], $attachment['name']);
|
$event['attachments'][$k]['classname'] = rcube_utils::file2class($attachment['mimetype'], $attachment['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
@ -1936,13 +1936,13 @@ class calendar extends rcube_plugin
|
||||||
|
|
||||||
if ($attachment['status'] && !$attachment['abort']) {
|
if ($attachment['status'] && !$attachment['abort']) {
|
||||||
$id = $attachment['id'];
|
$id = $attachment['id'];
|
||||||
$attachment['classname'] = rcmail_filetype2classname($attachment['mimetype'], $attachment['name']);
|
$attachment['classname'] = rcube_utils::file2class($attachment['mimetype'], $attachment['name']);
|
||||||
|
|
||||||
// store new attachment in session
|
// store new attachment in session
|
||||||
unset($attachment['status'], $attachment['abort'], $attachment['data']);
|
unset($attachment['status'], $attachment['abort'], $attachment['data']);
|
||||||
$_SESSION[self::SESSION_KEY]['attachments'][$id] = $attachment;
|
$_SESSION[self::SESSION_KEY]['attachments'][$id] = $attachment;
|
||||||
|
|
||||||
$attachment['id'] = 'rcmfile' . $attachment['id']; # add prefix to consider it 'new'
|
$attachment['id'] = 'rcmfile' . $attachment['id']; // add prefix to consider it 'new'
|
||||||
$event['attachments'][] = $attachment;
|
$event['attachments'][] = $attachment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,7 +298,7 @@ abstract class calendar_driver
|
||||||
*/
|
*/
|
||||||
public function list_categories()
|
public function list_categories()
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
return $rcmail->config->get('calendar_categories', array());
|
return $rcmail->config->get('calendar_categories', array());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ class calendar_itip
|
||||||
|
|
||||||
// finally send the message
|
// finally send the message
|
||||||
$this->itip_send = true;
|
$this->itip_send = true;
|
||||||
$sent = rcmail_deliver_message($message, $headers['X-Sender'], $mailto, $smtp_error);
|
$sent = $this->rc->deliver_message($message, $headers['X-Sender'], $mailto, $smtp_error);
|
||||||
$this->itip_send = false;
|
$this->itip_send = false;
|
||||||
|
|
||||||
return $sent;
|
return $sent;
|
||||||
|
@ -147,8 +147,8 @@ class calendar_itip
|
||||||
// compose common headers array
|
// compose common headers array
|
||||||
$headers = array(
|
$headers = array(
|
||||||
'From' => $sender,
|
'From' => $sender,
|
||||||
'Date' => rcmail_user_date(),
|
'Date' => $this->rc->user_date(),
|
||||||
'Message-ID' => rcmail_gen_message_id(),
|
'Message-ID' => $this->rc->gen_message_id(),
|
||||||
'X-Sender' => $from,
|
'X-Sender' => $from,
|
||||||
);
|
);
|
||||||
if ($agent = $this->rc->config->get('useragent'))
|
if ($agent = $this->rc->config->get('useragent'))
|
||||||
|
|
|
@ -44,7 +44,7 @@ class kolab_activesync extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$this->rc = rcmail::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
|
|
||||||
$this->require_plugin('jqueryui');
|
$this->require_plugin('jqueryui');
|
||||||
$this->require_plugin('libkolab');
|
$this->require_plugin('libkolab');
|
||||||
|
|
|
@ -32,7 +32,7 @@ class kolab_activesync_ui
|
||||||
public function __construct($plugin)
|
public function __construct($plugin)
|
||||||
{
|
{
|
||||||
$this->plugin = $plugin;
|
$this->plugin = $plugin;
|
||||||
$this->rc = rcmail::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
$skin_path = $this->plugin->local_skin_path() . '/';
|
$skin_path = $this->plugin->local_skin_path() . '/';
|
||||||
$this->skin_path = 'plugins/kolab_activesync/' . $skin_path;
|
$this->skin_path = 'plugins/kolab_activesync/' . $skin_path;
|
||||||
|
|
||||||
|
@ -170,8 +170,8 @@ class kolab_activesync_ui
|
||||||
$names[] = $origname;
|
$names[] = $origname;
|
||||||
$classes = array('mailbox');
|
$classes = array('mailbox');
|
||||||
|
|
||||||
if ($folder_class = rcmail_folder_classname($folder)) {
|
if ($folder_class = $this->rc->folder_classname($folder)) {
|
||||||
$foldername = html::quote(rcube_label($folder_class));
|
$foldername = html::quote($this->rc->gettext($folder_class));
|
||||||
$classes[] = $folder_class;
|
$classes[] = $folder_class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ class kolab_addressbook extends rcube_plugin
|
||||||
{
|
{
|
||||||
require_once(dirname(__FILE__) . '/lib/rcube_kolab_contacts.php');
|
require_once(dirname(__FILE__) . '/lib/rcube_kolab_contacts.php');
|
||||||
|
|
||||||
$this->rc = rcmail::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
|
|
||||||
// load required plugin
|
// load required plugin
|
||||||
$this->require_plugin('libkolab');
|
$this->require_plugin('libkolab');
|
||||||
|
|
|
@ -32,7 +32,7 @@ class kolab_addressbook_ui
|
||||||
*/
|
*/
|
||||||
public function __construct($plugin)
|
public function __construct($plugin)
|
||||||
{
|
{
|
||||||
$this->rc = rcmail::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
$this->plugin = $plugin;
|
$this->plugin = $plugin;
|
||||||
|
|
||||||
$this->init_ui();
|
$this->init_ui();
|
||||||
|
|
|
@ -132,7 +132,7 @@ class rcube_kolab_contacts extends rcube_addressbook
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->action = rcmail::get_instance()->action;
|
$this->action = rcube::get_instance()->action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class kolab_auth extends rcube_plugin
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
$this->add_hook('authenticate', array($this, 'authenticate'));
|
$this->add_hook('authenticate', array($this, 'authenticate'));
|
||||||
$this->add_hook('startup', array($this, 'startup'));
|
$this->add_hook('startup', array($this, 'startup'));
|
||||||
|
@ -76,7 +76,7 @@ class kolab_auth extends rcube_plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
public function load_user_role_plugins_and_settings($role_dns) {
|
public function load_user_role_plugins_and_settings($role_dns) {
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
$this->load_config();
|
$this->load_config();
|
||||||
|
|
||||||
// Check role dependent plugins to enable and settings to modify
|
// Check role dependent plugins to enable and settings to modify
|
||||||
|
@ -152,7 +152,7 @@ class kolab_auth extends rcube_plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
public function write_log($args) {
|
public function write_log($args) {
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
if (!$rcmail->config->get('kolab_auth_auditlog', false)) {
|
if (!$rcmail->config->get('kolab_auth_auditlog', false)) {
|
||||||
return $args;
|
return $args;
|
||||||
|
@ -230,7 +230,7 @@ class kolab_auth extends rcube_plugin
|
||||||
$this->load_config();
|
$this->load_config();
|
||||||
$this->add_texts('localization/');
|
$this->add_texts('localization/');
|
||||||
|
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
$admin_login = $rcmail->config->get('kolab_auth_admin_login');
|
$admin_login = $rcmail->config->get('kolab_auth_admin_login');
|
||||||
$group = $rcmail->config->get('kolab_auth_group');
|
$group = $rcmail->config->get('kolab_auth_group');
|
||||||
$role_attr = $rcmail->config->get('kolab_auth_role');
|
$role_attr = $rcmail->config->get('kolab_auth_role');
|
||||||
|
@ -263,7 +263,7 @@ class kolab_auth extends rcube_plugin
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
$admin_login = $rcmail->config->get('kolab_auth_admin_login');
|
$admin_login = $rcmail->config->get('kolab_auth_admin_login');
|
||||||
$admin_pass = $rcmail->config->get('kolab_auth_admin_password');
|
$admin_pass = $rcmail->config->get('kolab_auth_admin_password');
|
||||||
$login_attr = $rcmail->config->get('kolab_auth_login');
|
$login_attr = $rcmail->config->get('kolab_auth_login');
|
||||||
|
@ -391,8 +391,8 @@ class kolab_auth extends rcube_plugin
|
||||||
|
|
||||||
// Log "Login As" usage
|
// Log "Login As" usage
|
||||||
if (!empty($origname)) {
|
if (!empty($origname)) {
|
||||||
write_log('userlogins', sprintf('Admin login for %s by %s from %s',
|
rcube::write_log('userlogins', sprintf('Admin login for %s by %s from %s',
|
||||||
$args['user'], $origname, rcmail_remote_ip()));
|
$args['user'], $origname, rcube_utils::remote_ip()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $args;
|
return $args;
|
||||||
|
@ -404,7 +404,7 @@ class kolab_auth extends rcube_plugin
|
||||||
public function imap_connect($args)
|
public function imap_connect($args)
|
||||||
{
|
{
|
||||||
if (!empty($_SESSION['kolab_auth_admin'])) {
|
if (!empty($_SESSION['kolab_auth_admin'])) {
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
$admin_login = $rcmail->decrypt($_SESSION['kolab_auth_login']);
|
$admin_login = $rcmail->decrypt($_SESSION['kolab_auth_login']);
|
||||||
$admin_pass = $rcmail->decrypt($_SESSION['kolab_auth_password']);
|
$admin_pass = $rcmail->decrypt($_SESSION['kolab_auth_password']);
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ class kolab_auth extends rcube_plugin
|
||||||
public function smtp_connect($args)
|
public function smtp_connect($args)
|
||||||
{
|
{
|
||||||
if (!empty($_SESSION['kolab_auth_admin'])) {
|
if (!empty($_SESSION['kolab_auth_admin'])) {
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
$admin_login = $rcmail->decrypt($_SESSION['kolab_auth_login']);
|
$admin_login = $rcmail->decrypt($_SESSION['kolab_auth_login']);
|
||||||
$admin_pass = $rcmail->decrypt($_SESSION['kolab_auth_password']);
|
$admin_pass = $rcmail->decrypt($_SESSION['kolab_auth_password']);
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ class kolab_auth extends rcube_plugin
|
||||||
return $this->ldap->ready;
|
return $this->ldap->ready;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
$addressbook = $rcmail->config->get('kolab_auth_addressbook');
|
$addressbook = $rcmail->config->get('kolab_auth_addressbook');
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@ class kolab_auth extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
private function get_user_record($user, $host)
|
private function get_user_record($user, $host)
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
$filter = $rcmail->config->get('kolab_auth_filter');
|
$filter = $rcmail->config->get('kolab_auth_filter');
|
||||||
|
|
||||||
$filter = $this->parse_vars($filter, $user, $host);
|
$filter = $this->parse_vars($filter, $user, $host);
|
||||||
|
@ -490,15 +490,15 @@ class kolab_auth extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
private function parse_vars($str, $user, $host)
|
private function parse_vars($str, $user, $host)
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
$domain = $rcmail->config->get('username_domain');
|
$domain = $rcmail->config->get('username_domain');
|
||||||
|
|
||||||
if (!empty($domain) && strpos($user, '@') === false) {
|
if (!empty($domain) && strpos($user, '@') === false) {
|
||||||
if (is_array($domain) && isset($domain[$host])) {
|
if (is_array($domain) && isset($domain[$host])) {
|
||||||
$user .= '@'.rcube_parse_host($domain[$host], $host);
|
$user .= '@'.rcube_utils::parse_host($domain[$host], $host);
|
||||||
}
|
}
|
||||||
else if (is_string($domain)) {
|
else if (is_string($domain)) {
|
||||||
$user .= '@'.rcube_parse_host($domain, $host);
|
$user .= '@'.rcube_utils::parse_host($domain, $host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ class kolab_config extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
// Register spellchecker dictionary handlers
|
// Register spellchecker dictionary handlers
|
||||||
if (strtolower($rcmail->config->get('spellcheck_dictionary')) != 'shared') {
|
if (strtolower($rcmail->config->get('spellcheck_dictionary')) != 'shared') {
|
||||||
|
|
|
@ -39,7 +39,7 @@ class kolab_folders extends rcube_plugin
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
self::$instance = $this;
|
self::$instance = $this;
|
||||||
$this->rc = rcmail::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
|
|
||||||
// load required plugin
|
// load required plugin
|
||||||
$this->require_plugin('libkolab');
|
$this->require_plugin('libkolab');
|
||||||
|
|
|
@ -44,7 +44,7 @@ class kolab_zpush extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$this->rc = rcmail::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
|
|
||||||
$this->require_plugin('jqueryui');
|
$this->require_plugin('jqueryui');
|
||||||
$this->add_texts('localization/', true);
|
$this->add_texts('localization/', true);
|
||||||
|
|
|
@ -30,7 +30,7 @@ class kolab_zpush_ui
|
||||||
public function __construct($config)
|
public function __construct($config)
|
||||||
{
|
{
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->rc = rcmail::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
|
|
||||||
$skin = $this->rc->config->get('skin');
|
$skin = $this->rc->config->get('skin');
|
||||||
$this->config->include_stylesheet('skins/' . $skin . '/config.css');
|
$this->config->include_stylesheet('skins/' . $skin . '/config.css');
|
||||||
|
@ -146,8 +146,8 @@ class kolab_zpush_ui
|
||||||
|
|
||||||
$classes = array('mailbox');
|
$classes = array('mailbox');
|
||||||
|
|
||||||
if ($folder_class = rcmail_folder_classname($folder)) {
|
if ($folder_class = $this->rc->folder_classname($folder)) {
|
||||||
$foldername = rcube_label($folder_class);
|
$foldername = $this->rc->gettext($folder_class);
|
||||||
$classes[] = $folder_class;
|
$classes[] = $folder_class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,19 +51,19 @@ class ldap_authentication extends rcube_plugin
|
||||||
function authenticate($args)
|
function authenticate($args)
|
||||||
{
|
{
|
||||||
if ($this->init_ldap()) {
|
if ($this->init_ldap()) {
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
$filter = $rcmail->config->get('ldap_authentication_filter');
|
$filter = $rcmail->config->get('ldap_authentication_filter');
|
||||||
$domain = $rcmail->config->get('username_domain');
|
$domain = $rcmail->config->get('username_domain');
|
||||||
|
|
||||||
// get username and host
|
// get username and host
|
||||||
$user = $args['user'];
|
$user = $args['user'];
|
||||||
$host = rcube_parse_host($args['host']);
|
$host = rcube_utils::parse_host($args['host']);
|
||||||
|
|
||||||
if (!empty($domain) && strpos($user, '@') === false) {
|
if (!empty($domain) && strpos($user, '@') === false) {
|
||||||
if (is_array($domain) && isset($domain[$args['host']]))
|
if (is_array($domain) && isset($domain[$args['host']]))
|
||||||
$user .= '@'.rcube_parse_host($domain[$host], $host);
|
$user .= '@'.rcube_utils::parse_host($domain[$host], $host);
|
||||||
else if (is_string($domain))
|
else if (is_string($domain))
|
||||||
$user .= '@'.rcube_parse_host($domain, $host);
|
$user .= '@'.rcube_utils::parse_host($domain, $host);
|
||||||
}
|
}
|
||||||
|
|
||||||
// replace variables in filter
|
// replace variables in filter
|
||||||
|
@ -102,7 +102,7 @@ class ldap_authentication extends rcube_plugin
|
||||||
return $this->ldap->ready;
|
return $this->ldap->ready;
|
||||||
|
|
||||||
$this->load_config();
|
$this->load_config();
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
$addressbook = $rcmail->config->get('ldap_authentication_addressbook');
|
$addressbook = $rcmail->config->get('ldap_authentication_addressbook');
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ class libcalendaring extends rcube_plugin
|
||||||
{
|
{
|
||||||
self::$instance = $this;
|
self::$instance = $this;
|
||||||
|
|
||||||
$this->rc = rcmail::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
|
|
||||||
// set user's timezone
|
// set user's timezone
|
||||||
$this->timezone = new DateTimeZone($this->rc->config->get('timezone', 'GMT'));
|
$this->timezone = new DateTimeZone($this->rc->config->get('timezone', 'GMT'));
|
||||||
|
@ -529,7 +529,7 @@ class libcalendaring extends rcube_plugin
|
||||||
'html' => $content,
|
'html' => $content,
|
||||||
'name' => $attachment['name'],
|
'name' => $attachment['name'],
|
||||||
'mimetype' => $attachment['mimetype'],
|
'mimetype' => $attachment['mimetype'],
|
||||||
'classname' => rcmail_filetype2classname($attachment['mimetype'], $attachment['name']),
|
'classname' => rcube_utils::file2class($attachment['mimetype'], $attachment['name']),
|
||||||
'complete' => true), $uploadid);
|
'complete' => true), $uploadid);
|
||||||
}
|
}
|
||||||
else { // upload failed
|
else { // upload failed
|
||||||
|
|
|
@ -56,7 +56,7 @@ $opts = get_opt(array(
|
||||||
$opts['username'] = !empty($opts[1]) ? $opts[1] : $opts['user'];
|
$opts['username'] = !empty($opts[1]) ? $opts[1] : $opts['user'];
|
||||||
$action = $opts[0];
|
$action = $opts[0];
|
||||||
|
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -57,7 +57,7 @@ class odfviewer extends rcube_plugin
|
||||||
if ($ua->ie && $ua->ver < 9)
|
if ($ua->ie && $ua->ver < 9)
|
||||||
return;
|
return;
|
||||||
// extend list of mimetypes that should open in preview
|
// extend list of mimetypes that should open in preview
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
if ($rcmail->action == 'preview' || $rcmail->action == 'show' || $rcmail->task == 'calendar' || $rcmail->task == 'tasks') {
|
if ($rcmail->action == 'preview' || $rcmail->action == 'show' || $rcmail->task == 'calendar' || $rcmail->task == 'tasks') {
|
||||||
$mimetypes = $rcmail->config->get('client_mimetypes', 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/x-javascript,application/pdf,application/x-shockwave-flash');
|
$mimetypes = $rcmail->config->get('client_mimetypes', 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/x-javascript,application/pdf,application/x-shockwave-flash');
|
||||||
if (!is_array($mimetypes))
|
if (!is_array($mimetypes))
|
||||||
|
@ -87,7 +87,7 @@ class odfviewer extends rcube_plugin
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$fp = fopen($tempfn, 'w');
|
$fp = fopen($tempfn, 'w');
|
||||||
$imap = rcmail::get_instance()->get_storage();
|
$imap = rcube::get_instance()->get_storage();
|
||||||
$imap->get_message_part($args['uid'], $args['id'], $args['part'], false, $fp);
|
$imap->get_message_part($args['uid'], $args['id'], $args['part'], false, $fp);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ class odfviewer extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
function gc_cleanup()
|
function gc_cleanup()
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
$tmp = unslashify($this->tempdir);
|
$tmp = unslashify($this->tempdir);
|
||||||
$expire = mktime() - 172800; // expire in 48 hours
|
$expire = mktime() - 172800; // expire in 48 hours
|
||||||
|
|
|
@ -21,7 +21,7 @@ class owncloud extends rcube_plugin
|
||||||
|
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
// requires kolab_auth plugin
|
// requires kolab_auth plugin
|
||||||
if (empty($_SESSION['kolab_uid'])) {
|
if (empty($_SESSION['kolab_uid'])) {
|
||||||
|
@ -52,7 +52,7 @@ class owncloud extends rcube_plugin
|
||||||
|
|
||||||
function action()
|
function action()
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
$rcmail->output->add_handlers(array('owncloudframe' => array($this, 'frame')));
|
$rcmail->output->add_handlers(array('owncloudframe' => array($this, 'frame')));
|
||||||
$rcmail->output->set_pagetitle($this->gettext('owncloud'));
|
$rcmail->output->set_pagetitle($this->gettext('owncloud'));
|
||||||
|
@ -61,7 +61,7 @@ class owncloud extends rcube_plugin
|
||||||
|
|
||||||
function frame()
|
function frame()
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
$this->load_config();
|
$this->load_config();
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ class piwik_analytics extends rcube_plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_script($args) {
|
function add_script($args) {
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
$exclude = $rcmail->config->get('piwik_analytics_exclude');
|
$exclude = $rcmail->config->get('piwik_analytics_exclude');
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ abstract class tasklist_driver
|
||||||
*/
|
*/
|
||||||
public function list_categories()
|
public function list_categories()
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
return $rcmail->config->get('tasklist_categories', array());
|
return $rcmail->config->get('tasklist_categories', array());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ class tasklist extends rcube_plugin
|
||||||
{
|
{
|
||||||
$this->require_plugin('libcalendaring');
|
$this->require_plugin('libcalendaring');
|
||||||
|
|
||||||
$this->rc = rcmail::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
$this->lib = libcalendaring::get_instance();
|
$this->lib = libcalendaring::get_instance();
|
||||||
|
|
||||||
$this->register_task('tasks', 'tasklist');
|
$this->register_task('tasks', 'tasklist');
|
||||||
|
@ -601,7 +601,7 @@ class tasklist extends rcube_plugin
|
||||||
$rec['alarms_text'] = libcalendaring::alarms_text($rec['alarms']);
|
$rec['alarms_text'] = libcalendaring::alarms_text($rec['alarms']);
|
||||||
|
|
||||||
foreach ((array)$rec['attachments'] as $k => $attachment) {
|
foreach ((array)$rec['attachments'] as $k => $attachment) {
|
||||||
$rec['attachments'][$k]['classname'] = rcmail_filetype2classname($attachment['mimetype'], $attachment['name']);
|
$rec['attachments'][$k]['classname'] = rcube_utils::file2class($attachment['mimetype'], $attachment['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($rec['id'], $this->collapsed_tasks))
|
if (in_array($rec['id'], $this->collapsed_tasks))
|
||||||
|
@ -844,13 +844,13 @@ class tasklist extends rcube_plugin
|
||||||
|
|
||||||
if ($attachment['status'] && !$attachment['abort']) {
|
if ($attachment['status'] && !$attachment['abort']) {
|
||||||
$id = $attachment['id'];
|
$id = $attachment['id'];
|
||||||
$attachment['classname'] = rcmail_filetype2classname($attachment['mimetype'], $attachment['name']);
|
$attachment['classname'] = rcube_utils::file2class($attachment['mimetype'], $attachment['name']);
|
||||||
|
|
||||||
// store new attachment in session
|
// store new attachment in session
|
||||||
unset($attachment['status'], $attachment['abort'], $attachment['data']);
|
unset($attachment['status'], $attachment['abort'], $attachment['data']);
|
||||||
$_SESSION[self::SESSION_KEY]['attachments'][$id] = $attachment;
|
$_SESSION[self::SESSION_KEY]['attachments'][$id] = $attachment;
|
||||||
|
|
||||||
$attachment['id'] = 'rcmfile' . $attachment['id']; # add prefix to consider it 'new'
|
$attachment['id'] = 'rcmfile' . $attachment['id']; // add prefix to consider it 'new'
|
||||||
$task['attachments'][] = $attachment;
|
$task['attachments'][] = $attachment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ class tinymce_config extends rcube_plugin
|
||||||
|
|
||||||
function config($args)
|
function config($args)
|
||||||
{
|
{
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
$config = array(
|
$config = array(
|
||||||
'forced_root_block' => '',
|
'forced_root_block' => '',
|
||||||
|
|
Loading…
Add table
Reference in a new issue