Ejemplo n.º 1
0
<?php

echo "New Sessions...<br/>\n";
GDO::table('GWF_Session')->createTable(true);
echo "Faster ModuleVars...<br/>\n";
$mv = GDO::table('GWF_ModuleVar');
if (false === GWF_ModuleLoader::renameColumn($mv, 'mv_moduleid', 'mv_mid')) {
    die('CANNOT RENAME COLUMN');
}
if (false === GWF_ModuleLoader::changeColumn($mv, 'mv_min', 'mv_min')) {
    die('CANNOT CHANGE COLUMN mv_min');
}
if (false === GWF_ModuleLoader::changeColumn($mv, 'mv_max', 'mv_max')) {
    die('CANNOT CHANGE COLUMN mv_max');
}
if (false === GWF_ModuleLoader::addColumn($mv, 'mv_val')) {
    die('SHOULD NOT HAPPEN 1');
}
if (false === ($result = $mv->select())) {
    die('SHOULD NOT HAPPEN 4');
}
while (false !== ($row = $mv->fetch($result, GDO::ARRAY_O))) {
    $row->saveVar('mv_val', GWF_ModuleLoader::getVarValueMV($row->getVar('mv_value'), $row));
}
$mv->free($result);
echo "Naming sheme cleanup...<br/>\n";
GWF_ModuleLoader::loadModuleFS('Login')->onInclude();
$lf = GDO::table('GWF_LoginFailure');
GWF_ModuleLoader::renameColumn($lf, 'ip', 'logfail_ip');
GWF_ModuleLoader::renameColumn($lf, 'userid', 'logfail_uid');
GWF_ModuleLoader::renameColumn($lf, 'timestamp', 'logfail_time');