PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Sep 06, 2004 8:58 am Reply with quote Back to top

Chatserv has provided a fix for a buggy 7.3 to 7.4 upgrade file (upgrade is missing section articles - reported by canadaka) that ships with virgin nuke7.5. See the FULL thread
Only registered users can see links on this board!
Get registered or login to the forums!
, as there is more discussion, but here is the code that fixes it.
Code:
<?php

######################################################
# File to upgrade from PHP-Nuke 7.3 to PHP-Nuke 7.4
# After you used this file, you can safely delete it.
######################################################
#            -= WARNING: PLEASE READ =-
#
# NOTE: This file uses config.php to retrieve needed
# variables values. So, to do the upgrade PLEASE copy
# this file in your server root directory and execute
# it from your browser.
######################################################

include("mainfile.php");

// Forums Table Update
$db->sql_query("UPDATE ".$prefix."_bbconfig SET config_value='.0.10' WHERE config_name='version'");

// IP Ban System Table Creation
$db->sql_query("CREATE TABLE ".$prefix."_banned_ip (id int(11) NOT NULL auto_increment, ip_address varchar(15) NOT NULL default '',  reason varchar(255) NOT NULL default '', date date NOT NULL default '0000-00-00', PRIMARY KEY id (id))");

// Users Table Modification
$db->sql_query("ALTER TABLE ".$user_prefix."_users ADD last_ip VARCHAR(15) DEFAULT '0' NOT NULL");

// PHP-Nuke Version Number Update
$db->sql_query("UPDATE ".$prefix."_config SET Version_Num='7.4'");

// Section to Content conversion
$result = $db->sql_query("SELECT secid, secname FROM ".$prefix."_sections");
while ($row = $db->sql_fetchrow($result)) {
   $db->sql_query("INSERT INTO ".$prefix."_pages_categories VALUES (NULL, '$row[secname]', '')");
}
$result = $db->sql_query("SELECT * FROM ".$prefix."_seccont");
while ($row = $db->sql_fetchrow($result)) {
$sec_cont = addslashes(FixQuotes($row[content]));
   $row2 = $db->sql_fetchrow($db->sql_query("SELECT secname FROM ".$prefix."_sections WHERE secid='$row[secid]'"));
   $row3 = $db->sql_fetchrow($db->sql_query("SELECT cid FROM ".$prefix."_pages_categories WHERE title='$row2[secname]'"));
   $db->sql_query("INSERT INTO ".$prefix."_pages VALUES (NULL, '$row3[cid]', '$row[title]', '', '1', '', '$sec_cont', '', '', now(), '$row[counter]', '$row[slanguage]')");
}
$db->sql_query("DROP TABLE ".$prefix."_sections");
$db->sql_query("DROP TABLE ".$prefix."_seccont");
$db->sql_query("UPDATE ".$prefix."_modules SET active='0' WHERE title='Sections'");

// Ephemerids and Sections field removal from authors table
$db->sql_query("ALTER TABLE ".$prefix."_authors DROP radminsection, DROP radminephem");

echo "PHP-Nuke Update finished!<br><br>"
    ."Please note that SECTIONS modules has been removed on this version. All your data from Sections module has been moved to CONTENT Module.<br><br>"
    ."You should now delete this upgrade file from your server.<br><br>";
?>
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum