2009-10-20 03:58:47 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* e107 website system
|
|
|
|
*
|
2010-03-22 11:52:39 +00:00
|
|
|
* Copyright 2008-2010 e107 Inc (e107.org)
|
2009-10-20 03:58:47 +00:00
|
|
|
* Released under the terms and conditions of the
|
|
|
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
|
|
|
*
|
2010-03-22 11:52:39 +00:00
|
|
|
* Forum plugin version tools
|
2009-10-20 03:58:47 +00:00
|
|
|
*
|
2010-03-22 11:52:39 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2009-10-20 03:58:47 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
class forum_setup
|
|
|
|
{
|
2009-10-21 12:53:00 +00:00
|
|
|
function install_pre($var)
|
2009-10-20 03:58:47 +00:00
|
|
|
{
|
2009-10-22 04:14:45 +00:00
|
|
|
// print_a($var);
|
|
|
|
// echo "custom install 'pre' function<br /><br />";
|
2009-10-20 03:58:47 +00:00
|
|
|
}
|
|
|
|
|
2009-10-21 12:53:00 +00:00
|
|
|
function install_post($var)
|
2009-10-20 03:58:47 +00:00
|
|
|
{
|
|
|
|
$sql = e107::getDb();
|
2009-10-22 04:14:45 +00:00
|
|
|
$mes = e107::getMessage();
|
2010-03-22 11:52:39 +00:00
|
|
|
|
2009-10-22 04:14:45 +00:00
|
|
|
/*if($sql -> db_Update("user", "user_forums='0'")) // deprecated in 0.8
|
2009-10-20 03:58:47 +00:00
|
|
|
{
|
|
|
|
$mes->add("Setting all user_forums to 0.", E_MESSAGE_SUCCESS);
|
2009-10-22 04:14:45 +00:00
|
|
|
}*/
|
2009-10-20 03:58:47 +00:00
|
|
|
}
|
|
|
|
|
2009-10-21 12:53:00 +00:00
|
|
|
function uninstall_post($var)
|
2009-10-20 03:58:47 +00:00
|
|
|
{
|
|
|
|
$sql = e107::getDb();
|
2009-10-22 04:14:45 +00:00
|
|
|
$mes = e107::getMessage();
|
2010-03-22 11:52:39 +00:00
|
|
|
|
2009-10-22 04:14:45 +00:00
|
|
|
/* if($sql -> db_Update("user", "user_forums='0'")) // deprecated in 0.8
|
2009-10-20 03:58:47 +00:00
|
|
|
{
|
2010-03-22 11:52:39 +00:00
|
|
|
$mes->add("Setting all user_forums to 0.", E_MESSAGE_SUCCESS);
|
2009-10-22 04:14:45 +00:00
|
|
|
}*/
|
2009-10-20 03:58:47 +00:00
|
|
|
}
|
|
|
|
|
2010-03-22 11:52:39 +00:00
|
|
|
function upgrade_pre($var)
|
|
|
|
{
|
|
|
|
//Redirect upgrade to customized upgrade routine
|
|
|
|
header('Location: '.e_PLUGIN.'forum/forum_update.php');
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2009-10-21 12:53:00 +00:00
|
|
|
function upgrade_post($var)
|
2009-10-20 03:58:47 +00:00
|
|
|
{
|
|
|
|
$sql = e107::getDb();
|
2009-10-22 04:14:45 +00:00
|
|
|
$mes = e107::getMessage();
|
2009-10-20 03:58:47 +00:00
|
|
|
}
|
|
|
|
}
|