1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Corrects some upgrade issues. (Issue #4)

This commit is contained in:
Cameron 2012-12-07 03:38:21 -08:00
parent 845a79b917
commit 8ce184e061
2 changed files with 15 additions and 1 deletions

View File

@ -129,6 +129,18 @@ else
// Fix - set cookie before login trigger
session_set(e_COOKIE, $cookieval, (time() + 3600 * 24 * 30));
// Required for a clean v1.x -> v2 upgrade.
$core = e107::getConfig('core');
if($core->get('admintheme') != 'bootstrap')
{
$core->update('admintheme','bootstrap');
$core->update('adminstyle','infopanel');
$core->update('admincss','admin_style.css');
$core->update('e_jslib_core',array('prototype' => 'none', 'jquery'=> 'auto'));
$core->save();
}
// ---
e107::getEvent()->trigger("login", $edata_li);
e107::getRedirect()->redirect(e_ADMIN_ABS.'admin.php');
//echo "<script type='text/javascript'>document.location.href='admin.php'</script>\n";

View File

@ -1939,7 +1939,9 @@ class e_db_mysql
$toSave = $array->WriteArray($outDefs, FALSE); // 2nd parameter to TRUE if needs to be written to DB
if (FALSE === file_put_contents(e_CACHE_DB.$tableName.'.php', $toSave))
{ // Could do something with error - but mustn't return FALSE - would trigger auto-generated structure
echo "Error writing file: ".e_CACHE_DB.$tableName.'.php'.'<br />';
$mes = e107::getMessage();
$mes->addDebug("Error writing file: ".e_CACHE_DB.$tableName.'.php'); //Fix for during v1.x -> 2.x upgrade.
// echo "Error writing file: ".e_CACHE_DB.$tableName.'.php'.'<br />';
}
}