Added a check to all plugins to see if they support the DBMS the site is running on HEAD
authorDirk Haun <dirk@haun-online.de>
Sun May 17 16:30:39 2009 +0200 (2009-05-17)
branchHEAD
changeset 70339089a0c77860
parent 7032 834a08534861
child 7034 99d594b20bc0
Added a check to all plugins to see if they support the DBMS the site is running on
plugins/calendar/autoinstall.php
plugins/links/autoinstall.php
plugins/polls/autoinstall.php
plugins/spamx/autoinstall.php
plugins/staticpages/autoinstall.php
plugins/xmlsitemap/autoinstall.php
public_html/docs/history
     1.1 --- a/plugins/calendar/autoinstall.php	Sun May 17 16:07:38 2009 +0200
     1.2 +++ b/plugins/calendar/autoinstall.php	Sun May 17 16:30:39 2009 +0200
     1.3 @@ -95,6 +95,15 @@
     1.4  
     1.5  function plugin_compatible_with_this_version_calendar($pi_name)
     1.6  {
     1.7 +    global $_CONF, $_DB_dbms;
     1.8 +
     1.9 +    // check if we support the DBMS the site is running on
    1.10 +    $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
    1.11 +            . $_DB_dbms . '_install.php';
    1.12 +    if (! file_exists($dbFile)) {
    1.13 +        return false;
    1.14 +    }
    1.15 +
    1.16      if (function_exists('COM_printUpcomingEvents')) {
    1.17          // if this function exists, then someone's trying to install the
    1.18          // plugin on Geeklog 1.4.0 or older - sorry, but that won't work
     2.1 --- a/plugins/links/autoinstall.php	Sun May 17 16:07:38 2009 +0200
     2.2 +++ b/plugins/links/autoinstall.php	Sun May 17 16:30:39 2009 +0200
     2.3 @@ -163,6 +163,15 @@
     2.4  */
     2.5  function plugin_compatible_with_this_version_links($pi_name)
     2.6  {
     2.7 +    global $_CONF, $_DB_dbms;
     2.8 +
     2.9 +    // check if we support the DBMS the site is running on
    2.10 +    $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
    2.11 +            . $_DB_dbms . '_install.php';
    2.12 +    if (! file_exists($dbFile)) {
    2.13 +        return false;
    2.14 +    }
    2.15 +
    2.16      if (!function_exists('COM_truncate') || !function_exists('MBYTE_strpos')) {
    2.17          return false;
    2.18      }
     3.1 --- a/plugins/polls/autoinstall.php	Sun May 17 16:07:38 2009 +0200
     3.2 +++ b/plugins/polls/autoinstall.php	Sun May 17 16:30:39 2009 +0200
     3.3 @@ -115,6 +115,15 @@
     3.4  */
     3.5  function plugin_compatible_with_this_version_polls($pi_name)
     3.6  {
     3.7 +    global $_CONF, $_DB_dbms;
     3.8 +
     3.9 +    // check if we support the DBMS the site is running on
    3.10 +    $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
    3.11 +            . $_DB_dbms . '_install.php';
    3.12 +    if (! file_exists($dbFile)) {
    3.13 +        return false;
    3.14 +    }
    3.15 +
    3.16      if (function_exists('COM_showPoll') || function_exists('COM_pollVote')) {
    3.17          // if these functions exist, then someone's trying to install the
    3.18          // plugin on Geeklog 1.3.11 or older - sorry, but that won't work
     4.1 --- a/plugins/spamx/autoinstall.php	Sun May 17 16:07:38 2009 +0200
     4.2 +++ b/plugins/spamx/autoinstall.php	Sun May 17 16:30:39 2009 +0200
     4.3 @@ -114,6 +114,15 @@
     4.4  */
     4.5  function plugin_compatible_with_this_version_spamx($pi_name)
     4.6  {
     4.7 +    global $_CONF, $_DB_dbms;
     4.8 +
     4.9 +    // check if we support the DBMS the site is running on
    4.10 +    $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
    4.11 +            . $_DB_dbms . '_install.php';
    4.12 +    if (! file_exists($dbFile)) {
    4.13 +        return false;
    4.14 +    }
    4.15 +
    4.16      if (! function_exists('PLG_spamAction')) {
    4.17          return false;
    4.18      }   
     5.1 --- a/plugins/staticpages/autoinstall.php	Sun May 17 16:07:38 2009 +0200
     5.2 +++ b/plugins/staticpages/autoinstall.php	Sun May 17 16:30:39 2009 +0200
     5.3 @@ -117,6 +117,15 @@
     5.4  */
     5.5  function plugin_compatible_with_this_version_staticpages($pi_name)
     5.6  {
     5.7 +    global $_CONF, $_DB_dbms;
     5.8 +
     5.9 +    // check if we support the DBMS the site is running on
    5.10 +    $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
    5.11 +            . $_DB_dbms . '_install.php';
    5.12 +    if (! file_exists($dbFile)) {
    5.13 +        return false;
    5.14 +    }
    5.15 +
    5.16      if (! function_exists('SEC_getGroupDropdown')) {
    5.17          return false;
    5.18      }
     6.1 --- a/plugins/xmlsitemap/autoinstall.php	Sun May 17 16:07:38 2009 +0200
     6.2 +++ b/plugins/xmlsitemap/autoinstall.php	Sun May 17 16:30:39 2009 +0200
     6.3 @@ -109,6 +109,15 @@
     6.4  */
     6.5  function plugin_compatible_with_this_version_xmlsitemap($pi_name)
     6.6  {
     6.7 +    global $_CONF, $_DB_dbms;
     6.8 +
     6.9 +    // check if we support the DBMS the site is running on
    6.10 +    $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
    6.11 +            . $_DB_dbms . '_install.php';
    6.12 +    if (! file_exists($dbFile)) {
    6.13 +        return false;
    6.14 +    }
    6.15 +
    6.16      return function_exists('PLG_itemDeleted');
    6.17  }
    6.18  
     7.1 --- a/public_html/docs/history	Sun May 17 16:07:38 2009 +0200
     7.2 +++ b/public_html/docs/history	Sun May 17 16:30:39 2009 +0200
     7.3 @@ -11,6 +11,8 @@
     7.4  + Comment moderation and editable comments, by Jared Wenerd
     7.5  
     7.6  Changes since 1.6.0b1:
     7.7 +- All bundled plugins now include a check to see if they support the DBMS the
     7.8 +  site is running on [Dirk]
     7.9  - A fresh install didn't check if the bundled plugins are compatible with the
    7.10    Geeklog version about to be installed [Dirk]
    7.11  - Users couldn't change their password or delete their account (reported by