[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_plugins/forum/ -> forum_update_check.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/forum/forum_update_check.php,v $
  14  |     $Revision: 1.8 $
  15  |     $Date: 2005/12/14 19:28:44 $
  16  |     $Author: sweetas $
  17  +----------------------------------------------------------------------------+
  18  */
  19  if (!defined('e107_INIT')) { exit; }
  20  
  21  $dbupdatep['forum_07'] =  LAN_UPDATE_8." .617 forums ".LAN_UPDATE_9." .7 forums";
  22  function update_forum_07($type) 
  23  {
  24      global $sql, $mySQLdefaultdb;
  25      if($type == 'do')
  26      {
  27          if(!isset($_POST['updateall']))
  28          {    
  29              include_once(e_PLUGIN.'forum/forum_update.php');
  30          }
  31      }
  32      else
  33      {
  34          // FALSE = needed, TRUE = not needed.
  35          if($sql->db_Select("plugin", "plugin_version", "plugin_name = 'Forum'"))
  36          {
  37              $row = $sql->db_Fetch();
  38              if($row['plugin_version'] < 1.2)
  39              {
  40                  return FALSE;
  41              }
  42          }
  43          $fields = mysql_list_fields($mySQLdefaultdb, MPREFIX."forum");
  44          if(!$fields)
  45          {
  46              return TRUE;
  47          }
  48          $columns = mysql_num_fields($fields);
  49          for ($i = 0; $i < $columns; $i++)
  50          {
  51              if ("forum_lastpost_info" == mysql_field_name($fields, $i))
  52              {
  53                  $flist = mysql_list_fields($mySQLdefaultdb, MPREFIX."forum_t");
  54                  $cols = mysql_num_fields($flist);
  55                  for ($x = 0; $x < $cols; $x++)
  56                  {
  57                      if("thread_anon" == mysql_field_name($flist, $x))
  58                      {
  59                          return FALSE; //needed
  60                      }
  61                  }
  62              }
  63              if("forum_sub" == mysql_field_name($fields, $i))
  64              {
  65                  return TRUE; //not needed
  66              }
  67          }
  68          return FALSE; //needed
  69      }
  70  }
  71  
  72  ?>
  73              


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7