Ignore:
Timestamp:
Sep 30, 2011, 10:49:03 PM (13 years ago)
Author:
Eric
Message:

Bug 2450 fixed - New feature : Backup file restoration.

Location:
extensions/UserAdvManager/trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/admin/UAM_admin.php

    r12271 r12275  
    260260    {
    261261      array_push($page['errors'], l10n('UAM_Dump_NOK'));
     262    }
     263  }
     264
     265  // Restoring UAM tables and configuration settings
     266  // -----------------------------------------------
     267  if (isset($_POST['restore']))
     268  {
     269    $Backup_File = UAM_PATH.'/include/backup/UAM_dbbackup.sql';
     270
     271    if (file_exists($Backup_File))
     272    {
     273      $restore = UAM_Restore_backup_file();
     274      if(empty($restore))
     275      {
     276        array_push($page['infos'], l10n('UAM_Restoration_OK'));
     277      }
     278      else
     279      {
     280        array_push($page['errors'], l10n('UAM_Restoration_NOK'));
     281      }
     282    }
     283    else
     284    {
     285      array_push($page['errors'], l10n('UAM_No_Backup_File'));
    262286    }
    263287  }
  • extensions/UserAdvManager/trunk/admin/template/global.tpl

    r12271 r12275  
    805805</form>
    806806</fieldset>
     807<fieldset>
     808<form method="post" action="" class="general">
     809  <p>
     810    {'UAM_Restore'|@translate}<br><br>
     811      <input class="submit" type="submit" value="{'UAM_Restore_File'|@translate}" name="restore" {$TAG_INPUT_ENABLED}>
     812  </p>
     813</form>
     814</fieldset>
    807815  </div>
    808816
Note: See TracChangeset for help on using the changeset viewer.