33 lines
882 B
PHP
33 lines
882 B
PHP
<?php
|
|
|
|
|
|
class RestoreShell extends AppShell
|
|
{
|
|
public $uses = array('AccessInfo', 'ExpiredRecord', 'Expense', 'ExpenseEmail', 'GroupExpense',
|
|
'Participant', 'Meal', 'FamilyExpense', 'Log', 'GroupSetting', 'PermissionTable');
|
|
|
|
|
|
public function main()
|
|
{
|
|
//
|
|
}
|
|
|
|
/*
|
|
* Command: Console/cake Restore restoreSingleExpense
|
|
* For restoring a single item
|
|
*
|
|
* This methods first tries to restore single expense from backup tables to live tables. If there
|
|
* is no such expense in backup table, it tries to restore from archieve database to live database.
|
|
* If the expense is already exist in live tables, it does not do anything.
|
|
*
|
|
*
|
|
*/
|
|
public function restoreSingleExpense()
|
|
{
|
|
$unique_url = "2ruQCFbb";
|
|
$this->loadModel("Backup");
|
|
$this->Backup->restore($unique_url);
|
|
}
|
|
|
|
|
|
} |