From ed1d212ae2daea5e4bd043417610177093e99f19 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 16 Jan 2016 03:03:51 -0500
Subject: [PATCH] Improved SVG cleanup code
---
program/lib/Roundcube/rcube_plugin_api.php | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/program/lib/Roundcube/rcube_plugin_api.php b/program/lib/Roundcube/rcube_plugin_api.php
index 1a10b8d..704f416 100644
--- a/program/lib/Roundcube/rcube_plugin_api.php
+++ b/program/lib/Roundcube/rcube_plugin_api.php
@@ -1,6 +1,6 @@
<?php
-/*
+/**
+-----------------------------------------------------------------------+
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2008-2012, The Roundcube Dev Team |
@@ -95,7 +95,7 @@
foreach ($this->plugins as $plugin) {
// ... task, request type and framed mode
- if (!$this->filter($plugin)) {
+ if (!$this->plugins_initialized[$plugin->ID] && !$this->filter($plugin)) {
$plugin->init();
$this->plugins_initialized[$plugin->ID] = $plugin;
}
@@ -132,7 +132,7 @@
// load required core plugin if no derivate was found
if (!$loaded) {
- $loaded = $this->load_plugin($plugin_name, true);
+ $loaded = $this->load_plugin($plugin_name);
}
// trigger fatal error if still not loaded
@@ -212,7 +212,7 @@
if ($plugin = $this->plugins[$plugin_name]) {
// init a plugin only if $force is set or if we're called after initialization
- if (($force || $this->initialized) && !$this->plugins_initialized[$plugin_name] && !$this->filter($plugin)) {
+ if (($force || $this->initialized) && !$this->plugins_initialized[$plugin_name] && ($force || !$this->filter($plugin))) {
$plugin->init();
$this->plugins_initialized[$plugin_name] = $plugin;
}
@@ -325,8 +325,8 @@
// load additional information from local composer.lock file
if ($lock = $composer_lock['installed'][$json['name']]) {
$info['version'] = $lock['version'];
- $info['uri'] = $lock['homepage'] ? $lock['homepage'] : $lock['source']['uri'];
- $info['src_uri'] = $lock['dist']['uri'] ? $lock['dist']['uri'] : $lock['source']['uri'];
+ $info['uri'] = $lock['homepage'] ?: $lock['source']['uri'];
+ $info['src_uri'] = $lock['dist']['uri'] ?: $lock['source']['uri'];
}
}
--
Gitblit v1.9.1