~ubuntu-branches/ubuntu/karmic/ampache/karmic

« back to all changes in this revision

Viewing changes to update.php

  • Committer: Bazaar Package Importer
  • Author(s): Charlie Smotherman
  • Date: 2008-05-15 18:44:23 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080515184423-n47i81yk2s99iuci
Tags: 3.4-2
Included some upstream gather album art fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
/*
3
3
 
4
 
 Copyright (c) 2001 - 2006 Ampache.org
 
4
 Copyright (c) Ampache.org
5
5
 All rights reserved.
6
6
 
7
7
 This program is free software; you can redistribute it and/or
17
17
 along with this program; if not, write to the Free Software
18
18
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
19
 
20
 
 
21
 
/*!
22
 
        @header Update Document 
23
 
        This document handles updating from one version of Maintain to the next
24
 
        if this doc is readable you can't login. stop.update and gone.fishing 
25
 
        must also be in place for this doc to work.
26
 
 
27
20
*/
28
 
 
29
 
/* Start House Keeping */
30
 
 
31
 
        // We need this stuff
32
 
        define('NO_SESSION','1');
33
 
        require('lib/init.php');
34
 
 
35
 
        // Make a blank update object
36
 
        $update = new Update(0);
37
 
 
38
 
        // Get the version and format it
39
 
        $version = $update->get_version(); 
40
 
        
41
 
        $conf['script'] = 'update.php'; 
42
 
        $prefs['font_size'] = 12;
43
 
        $prefs['bg_color1'] = "#c0c0c0";
44
 
        $prefs['font'] = "Verdana";
45
 
        conf($prefs,1);
46
 
        
47
 
 
48
 
/* End House Keeping */
 
21
// We need this stuff
 
22
define('NO_SESSION','1');
 
23
require 'lib/init.php';
 
24
 
 
25
// Get the version and format it
 
26
$version = Update::get_version(); 
49
27
 
50
28
if ($_REQUEST['action'] == 'update') { 
51
29
        
52
30
        /* Run the Update Mojo Here */
53
 
        $update->run_update();
 
31
        Update::run_update();
54
32
 
55
33
        /* Get the New Version */
56
 
        $version = $update->get_version();
 
34
        $version = Update::get_version();
57
35
 
58
36
59
 
$htmllang = str_replace("_","-",conf('lang'));
 
37
$htmllang = str_replace("_","-",Config::get('lang'));
60
38
 
61
39
?>
62
40
 
63
41
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
64
42
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>">
65
43
<head>
66
 
<link rel="shortcut icon" href="<?php echo conf('web_path'); ?>/favicon.ico" />
67
 
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo conf('site_charset'); ?>" />
68
 
<?php require_once(conf('prefix') . "/templates/install.css"); ?>
69
 
<title>Ampache - Update</title>
 
44
<link rel="shortcut icon" href="<?php echo Config::get('web_path'); ?>/favicon.ico" />
 
45
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo Config::get('site_charset'); ?>" />
 
46
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo Config::get('web_path') . '/templates/install.css'; ?>" />
 
47
<title><?php echo _('Ampache Update'); ?></title>
70
48
</head>
71
49
<body>
72
50
<div id="header"> 
75
53
</div>
76
54
<div id="text-box">
77
55
        <div class="notify">
78
 
This page handles all database updates to Ampache starting with 3.2. According to your database your current version is: <?php echo  $update->format_version($version); ; ?>. 
 
56
This page handles all database updates to Ampache starting with 3.3.3.5. According to your database your current version is: <?php echo Update::format_version($version); ; ?>. 
79
57
the following updates need to be performed<br /><br />
80
 
<div style="font-size:1.2em;font-weight:bold;text-align:center;"><?php $GLOBALS['error']->print_error('general'); ?></div>
 
58
<div style="font-size:1.2em;font-weight:bold;text-align:center;"><?php Error::display('general'); ?></div>
81
59
        </div>
82
60
        <div class="content">
83
 
<?php $update->display_update(); ?>
 
61
<?php Update::display_update(); ?>
84
62
 
85
 
<form method="post" enctype="multipart/form-data" action="<?php echo  conf('web_path'); ; ?>/update.php?action=update">
86
 
<?php if ($update->need_update()) { ?><input type="submit" value="Update Now!" /> <?php } ?>
 
63
<form method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/update.php?action=update">
 
64
<?php if (Update::need_update()) { ?><input type="submit" value="Update Now!" /> <?php } ?>
87
65
</form>
88
66
        </div>
89
67
        <div id="bottom">