[geeklog-cvs] geeklog: Added a check to all plugins to see if they support the...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun May 17 11:35:15 EDT 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9089a0c77860
changeset: 7033:9089a0c77860
user: Dirk Haun <dirk at haun-online.de>
date: Sun May 17 16:30:39 2009 +0200
description:
Added a check to all plugins to see if they support the DBMS the site is running on
diffstat:
7 files changed, 56 insertions(+)
plugins/calendar/autoinstall.php | 9 +++++++++
plugins/links/autoinstall.php | 9 +++++++++
plugins/polls/autoinstall.php | 9 +++++++++
plugins/spamx/autoinstall.php | 9 +++++++++
plugins/staticpages/autoinstall.php | 9 +++++++++
plugins/xmlsitemap/autoinstall.php | 9 +++++++++
public_html/docs/history | 2 ++
diffs (126 lines):
diff -r 834a08534861 -r 9089a0c77860 plugins/calendar/autoinstall.php
--- a/plugins/calendar/autoinstall.php Sun May 17 16:07:38 2009 +0200
+++ b/plugins/calendar/autoinstall.php Sun May 17 16:30:39 2009 +0200
@@ -95,6 +95,15 @@
function plugin_compatible_with_this_version_calendar($pi_name)
{
+ global $_CONF, $_DB_dbms;
+
+ // check if we support the DBMS the site is running on
+ $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
+ . $_DB_dbms . '_install.php';
+ if (! file_exists($dbFile)) {
+ return false;
+ }
+
if (function_exists('COM_printUpcomingEvents')) {
// if this function exists, then someone's trying to install the
// plugin on Geeklog 1.4.0 or older - sorry, but that won't work
diff -r 834a08534861 -r 9089a0c77860 plugins/links/autoinstall.php
--- a/plugins/links/autoinstall.php Sun May 17 16:07:38 2009 +0200
+++ b/plugins/links/autoinstall.php Sun May 17 16:30:39 2009 +0200
@@ -163,6 +163,15 @@
*/
function plugin_compatible_with_this_version_links($pi_name)
{
+ global $_CONF, $_DB_dbms;
+
+ // check if we support the DBMS the site is running on
+ $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
+ . $_DB_dbms . '_install.php';
+ if (! file_exists($dbFile)) {
+ return false;
+ }
+
if (!function_exists('COM_truncate') || !function_exists('MBYTE_strpos')) {
return false;
}
diff -r 834a08534861 -r 9089a0c77860 plugins/polls/autoinstall.php
--- a/plugins/polls/autoinstall.php Sun May 17 16:07:38 2009 +0200
+++ b/plugins/polls/autoinstall.php Sun May 17 16:30:39 2009 +0200
@@ -115,6 +115,15 @@
*/
function plugin_compatible_with_this_version_polls($pi_name)
{
+ global $_CONF, $_DB_dbms;
+
+ // check if we support the DBMS the site is running on
+ $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
+ . $_DB_dbms . '_install.php';
+ if (! file_exists($dbFile)) {
+ return false;
+ }
+
if (function_exists('COM_showPoll') || function_exists('COM_pollVote')) {
// if these functions exist, then someone's trying to install the
// plugin on Geeklog 1.3.11 or older - sorry, but that won't work
diff -r 834a08534861 -r 9089a0c77860 plugins/spamx/autoinstall.php
--- a/plugins/spamx/autoinstall.php Sun May 17 16:07:38 2009 +0200
+++ b/plugins/spamx/autoinstall.php Sun May 17 16:30:39 2009 +0200
@@ -114,6 +114,15 @@
*/
function plugin_compatible_with_this_version_spamx($pi_name)
{
+ global $_CONF, $_DB_dbms;
+
+ // check if we support the DBMS the site is running on
+ $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
+ . $_DB_dbms . '_install.php';
+ if (! file_exists($dbFile)) {
+ return false;
+ }
+
if (! function_exists('PLG_spamAction')) {
return false;
}
diff -r 834a08534861 -r 9089a0c77860 plugins/staticpages/autoinstall.php
--- a/plugins/staticpages/autoinstall.php Sun May 17 16:07:38 2009 +0200
+++ b/plugins/staticpages/autoinstall.php Sun May 17 16:30:39 2009 +0200
@@ -117,6 +117,15 @@
*/
function plugin_compatible_with_this_version_staticpages($pi_name)
{
+ global $_CONF, $_DB_dbms;
+
+ // check if we support the DBMS the site is running on
+ $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
+ . $_DB_dbms . '_install.php';
+ if (! file_exists($dbFile)) {
+ return false;
+ }
+
if (! function_exists('SEC_getGroupDropdown')) {
return false;
}
diff -r 834a08534861 -r 9089a0c77860 plugins/xmlsitemap/autoinstall.php
--- a/plugins/xmlsitemap/autoinstall.php Sun May 17 16:07:38 2009 +0200
+++ b/plugins/xmlsitemap/autoinstall.php Sun May 17 16:30:39 2009 +0200
@@ -109,6 +109,15 @@
*/
function plugin_compatible_with_this_version_xmlsitemap($pi_name)
{
+ global $_CONF, $_DB_dbms;
+
+ // check if we support the DBMS the site is running on
+ $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
+ . $_DB_dbms . '_install.php';
+ if (! file_exists($dbFile)) {
+ return false;
+ }
+
return function_exists('PLG_itemDeleted');
}
diff -r 834a08534861 -r 9089a0c77860 public_html/docs/history
--- a/public_html/docs/history Sun May 17 16:07:38 2009 +0200
+++ b/public_html/docs/history Sun May 17 16:30:39 2009 +0200
@@ -11,6 +11,8 @@
+ Comment moderation and editable comments, by Jared Wenerd
Changes since 1.6.0b1:
+- All bundled plugins now include a check to see if they support the DBMS the
+ site is running on [Dirk]
- A fresh install didn't check if the bundled plugins are compatible with the
Geeklog version about to be installed [Dirk]
- Users couldn't change their password or delete their account (reported by
More information about the geeklog-cvs
mailing list