diff --git a/config/pagetexts.php b/config/pagetexts.php index f0f613e..a1bdeee 100644 --- a/config/pagetexts.php +++ b/config/pagetexts.php @@ -40,10 +40,13 @@ $q=mysql_query("SELECT * FROM pagetext WHERE year='-1' ORDER BY textname"); while($r=mysql_fetch_object($q)) { - mysql_query("INSERT INTO pagetext (textname,text,year) VALUES ( - '".mysql_escape_string($r->textname)."', - '".mysql_escape_string($r->text)."', - '".$config['FAIRYEAR']."')"); + foreach($config['languages'] AS $lang=>$langname) { + mysql_query("INSERT INTO pagetext (textname,textdescription,text,year,lang) VALUES ( + '".mysql_escape_string($r->textname)."', + '".mysql_escape_string($r->text)."', + '".$config['FAIRYEAR']."', + '".mysql_escape_string($lang)."')"); + } } diff --git a/config/rollover.php b/config/rollover.php index 94e7dfc..0292901 100644 --- a/config/rollover.php +++ b/config/rollover.php @@ -88,10 +88,11 @@ $q=mysql_query("SELECT * FROM pagetext WHERE year='$currentfairyear'"); echo mysql_error(); while($r=mysql_fetch_object($q)) - mysql_query("INSERT INTO pagetext (textname,textdescription,text,year,lang) VALUES ( + mysql_query("INSERT INTO pagetext (textname,textdescription,text,lastupdate,year,lang) VALUES ( '".mysql_escape_string($r->textname)."', '".mysql_escape_string($r->textdescription)."', '".mysql_escape_string($r->text)."', + '".mysql_escape_string($r->lastupdate)."', '".mysql_escape_string($newfairyear)."', '".mysql_escape_string($r->lang)."')");