mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Update autologin table with more columns
This commit is contained in:
parent
af41f36bf7
commit
ca9a0aef25
5 changed files with 87 additions and 2 deletions
|
|
@ -956,6 +956,29 @@ class DBCubrid extends DB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Drop table
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function dropTable($table_name)
|
||||||
|
{
|
||||||
|
// Generate the drop query
|
||||||
|
$query = sprintf('drop class "%s"', $this->addQuotes($this->prefix . $table_name));
|
||||||
|
|
||||||
|
// Execute the drop query
|
||||||
|
$output = $this->_query($query);
|
||||||
|
if($output)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles insertAct
|
* Handles insertAct
|
||||||
* @param Object $queryObject
|
* @param Object $queryObject
|
||||||
|
|
|
||||||
|
|
@ -748,6 +748,29 @@ class DBMssql extends DB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Drop table
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function dropTable($table_name)
|
||||||
|
{
|
||||||
|
// Generate the drop query
|
||||||
|
$query = sprintf('DROP TABLE %s', $this->addQuotes($this->prefix . $table_name));
|
||||||
|
|
||||||
|
// Execute the drop query
|
||||||
|
$output = $this->_query($query);
|
||||||
|
if($output)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles insertAct
|
* Handles insertAct
|
||||||
* @todo Lookup _filterNumber against sql injection - see if it is still needed and how to integrate
|
* @todo Lookup _filterNumber against sql injection - see if it is still needed and how to integrate
|
||||||
|
|
|
||||||
|
|
@ -682,6 +682,29 @@ class DBMysql extends DB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Drop table
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function dropTable($table_name)
|
||||||
|
{
|
||||||
|
// Generate the drop query
|
||||||
|
$query = sprintf('DROP TABLE `%s`', $this->addQuotes($this->prefix . $table_name));
|
||||||
|
|
||||||
|
// Execute the drop query
|
||||||
|
$output = $this->_query($query);
|
||||||
|
if($output)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles insertAct
|
* Handles insertAct
|
||||||
* @param Object $queryObject
|
* @param Object $queryObject
|
||||||
|
|
|
||||||
|
|
@ -205,6 +205,9 @@ class member extends ModuleObject {
|
||||||
if(!$oDB->isColumnExists("member", "list_order")) return true;
|
if(!$oDB->isColumnExists("member", "list_order")) return true;
|
||||||
if(!$oDB->isIndexExists("member","idx_list_order")) return true;
|
if(!$oDB->isIndexExists("member","idx_list_order")) return true;
|
||||||
|
|
||||||
|
// Check autologin table
|
||||||
|
if(!$oDB->isColumnExists("member_autologin", "security_key")) return true;
|
||||||
|
|
||||||
$oModuleModel = getModel('module');
|
$oModuleModel = getModel('module');
|
||||||
$config = $oModuleModel->getModuleConfig('member');
|
$config = $oModuleModel->getModuleConfig('member');
|
||||||
// check signup form ordering info
|
// check signup form ordering info
|
||||||
|
|
@ -315,6 +318,13 @@ class member extends ModuleObject {
|
||||||
$oDB->addIndex("member","idx_list_order", array("list_order"));
|
$oDB->addIndex("member","idx_list_order", array("list_order"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check autologin table
|
||||||
|
if(!$oDB->isColumnExists("member_autologin", "security_key"))
|
||||||
|
{
|
||||||
|
$oDB->dropTable('member_autologin');
|
||||||
|
$oDB->createTableByXmlFile($this->module_path . '/schemas/member_autologin.xml');
|
||||||
|
}
|
||||||
|
|
||||||
$oModuleModel = getModel('module');
|
$oModuleModel = getModel('module');
|
||||||
$config = $oModuleModel->getModuleConfig('member');
|
$config = $oModuleModel->getModuleConfig('member');
|
||||||
$oModuleController = getController('module');
|
$oModuleController = getController('module');
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
<table name="member_autologin">
|
<table name="member_autologin">
|
||||||
<column name="autologin_key" type="varchar" size="80" notnull="notnull" unique="unique_key" />
|
<column name="autologin_key" type="varchar" size="80" notnull="notnull" primary_key="primary_key" />
|
||||||
<column name="member_srl" type="number" size="11" notnull="notnull" unique="unique_key" />
|
<column name="security_key" type="varchar" size="80" notnull="notnull" />
|
||||||
|
<column name="member_srl" type="number" notnull="notnull" index="idx_member_srl" />
|
||||||
|
<column name="regdate" type="date" index="idx_regdate" />
|
||||||
|
<column name="ipaddress" type="varchar" size="80" />
|
||||||
|
<column name="last_visit" type="date" index="idx_last_visited" />
|
||||||
|
<column name="last_ipaddress" type="varchar" size="80" />
|
||||||
|
<column name="user_agent" type="varchar" size="160" />
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue