1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

Little cleanup

This commit is contained in:
CaMer0n
2009-08-27 23:39:43 +00:00
parent c9d5a940bd
commit af00e68bf5

View File

@@ -9,8 +9,8 @@
* Administration - Database Utilities * Administration - Database Utilities
* *
* $Source: /cvs_backup/e107_0.8/e107_admin/db.php,v $ * $Source: /cvs_backup/e107_0.8/e107_admin/db.php,v $
* $Revision: 1.18 $ * $Revision: 1.19 $
* $Date: 2009-08-27 22:19:51 $ * $Date: 2009-08-27 23:39:43 $
* $Author: e107coders $ * $Author: e107coders $
* *
*/ */
@@ -379,28 +379,19 @@ function exportXmlFile()
function importCorePrefs() function importCorePrefs()
{ {
//TODO - Cameron - move to own class and make generic. //TODO - move to own class and make generic.
// SecretR - structure changes / improvements proposal // SecretR - structure changes / improvements proposal
// $inputXml = file_get_contents($_FILES['file_userfile']['tmp_name'][0]);
//e107::getSingleton('xmlClass')->setOptForceArray(true) //force array variable type for simple tags of first level
// ->setOptValueKey('@value') //the default is value
// ->setOptAddRoot(false); //include root element in the returned array
// $xmlArray = e107::getSingleton('xmlClass')->parseXml($inputXml, false);
$xmlArray = e107::getSingleton('xmlClass')->loadXMLfile($_FILES['file_userfile']['tmp_name'][0],'advanced'); $xmlArray = e107::getSingleton('xmlClass')->loadXMLfile($_FILES['file_userfile']['tmp_name'][0],'advanced');
if(varset($xmlArray['prefs']['core'])) // Save Core Prefs if(varset($xmlArray['prefs']['core'])) // Save Core Prefs
{ {
foreach ($xmlArray['prefs']['core'] as $val) foreach ($xmlArray['prefs']['core'] as $val)
{ {
// echo $val['@attributes']['name']." = ". $val['@value']."<br />";
e107::getConfig()->set($val['@attributes']['name'], $val['@value']); e107::getConfig()->set($val['@attributes']['name'], $val['@value']);
} }
e107::getConfig()->save(); e107::getConfig()->save(FALSE);
} }
@@ -410,7 +401,6 @@ function importTables()
{ {
// TODO - Import of table data. // TODO - Import of table data.
} }
function importCorePrefsForm() function importCorePrefsForm()