From 5341801ce768bc3f6078ff0091ccff30671b96e2 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 27 Aug 2008 19:33:56 +0000 Subject: [PATCH] Properly rollover: 1) Page Texts - with descriptions and languages 2) Age Categories - short form 3) Divisions - short form, cwsf division id --- config/rollover.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config/rollover.php b/config/rollover.php index 35667c9a..94e7dfc7 100644 --- a/config/rollover.php +++ b/config/rollover.php @@ -88,19 +88,22 @@ $q=mysql_query("SELECT * FROM pagetext WHERE year='$currentfairyear'"); echo mysql_error(); while($r=mysql_fetch_object($q)) - mysql_query("INSERT INTO pagetext (textname,text,year) VALUES ( + mysql_query("INSERT INTO pagetext (textname,textdescription,text,year,lang) VALUES ( '".mysql_escape_string($r->textname)."', + '".mysql_escape_string($r->textdescription)."', '".mysql_escape_string($r->text)."', - '".mysql_escape_string($newfairyear)."')"); + '".mysql_escape_string($newfairyear)."', + '".mysql_escape_string($r->lang)."')"); echo i18n("Rolling project categories")."
"; //project categories $q=mysql_query("SELECT * FROM projectcategories WHERE year='$currentfairyear'"); echo mysql_error(); while($r=mysql_fetch_object($q)) - mysql_query("INSERT INTO projectcategories (id,category,mingrade,maxgrade,year) VALUES ( + mysql_query("INSERT INTO projectcategories (id,category,category_shortform,mingrade,maxgrade,year) VALUES ( '".mysql_escape_string($r->id)."', '".mysql_escape_string($r->category)."', + '".mysql_escape_string($r->category_shortform)."', '".mysql_escape_string($r->mingrade)."', '".mysql_escape_string($r->maxgrade)."', '".mysql_escape_string($newfairyear)."')"); @@ -110,10 +113,11 @@ $q=mysql_query("SELECT * FROM projectdivisions WHERE year='$currentfairyear'"); echo mysql_error(); while($r=mysql_fetch_object($q)) - mysql_query("INSERT INTO projectdivisions (id,division,division_shortform,year) VALUES ( + mysql_query("INSERT INTO projectdivisions (id,division,division_shortform,cwsfdivisionid,year) VALUES ( '".mysql_escape_string($r->id)."', '".mysql_escape_string($r->division)."', '".mysql_escape_string($r->division_shortform)."', + '".mysql_escape_string($r->cwsfdivisionid)."', '".mysql_escape_string($newfairyear)."')"); echo i18n("Rolling project category-division links")."
";