Blame view

sources/apps/updater/update.php 791 Bytes
d1bafeea1   Kload   [fix] Upgrade to ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  <?php
  
  /**
   * ownCloud - Updater plugin
   *
   * @author Victor Dubiniuk
   * @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
   *
   * This file is licensed under the Affero General Public License version 3 or
   * later.
   */
  
  namespace OCA\Updater;
  
  \OCP\User::checkAdminUser();
  
  \OCP\Util::addScript(App::APP_ID, '3rdparty/angular');
  \OCP\Util::addScript(App::APP_ID, 'app');
  \OCP\Util::addScript(App::APP_ID, 'controllers');
  
  \OCP\Util::addStyle(App::APP_ID, 'updater');
  
  if (@file_exists(App::getLegacyBackupBase())) {
  	try {
  		Helper::move(App::getLegacyBackupBase(), App::getBackupBase());
  	} catch (Exception $e){}
  } else if (!@file_exists(App::getBackupBase())){
  	Helper::mkdir(App::getBackupBase());
  }
  
  $tmpl = new \OCP\Template(App::APP_ID, 'update', 'guest');
  $tmpl->printPage();