Changeset c060677 in github


Ignore:
Timestamp:
Jun 12, 2008 3:32:04 AM (5 years ago)
Author:
svncommit <devs@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
ac6e284
Parents:
e9b57bb8
Message:

Enable direct download of (main|db).inc.php from the installer.

Location:
installer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • installer/config.php

    r2e90ff5 rc060677  
    2323if (!empty($_POST['submit'])) { 
    2424   
    25   echo '<p class="notice">Copy the following configurations and save them in two files (names above the text box)'; 
    26   echo ' within the <tt>config/</tt> directory of your RoundCube installation.<br/>'; 
     25  echo '<p class="notice">Copy or download the following configurations and save them in two files'; 
     26  echo ' (names above the text box) within the <tt>config/</tt> directory of your RoundCube installation.<br/>'; 
    2727  echo ' Make sure that there are no characters outside the <tt>&lt;?php ?&gt;</tt> brackets when saving the files.</p>'; 
    2828   
    2929  $textbox = new html_textarea(array('rows' => 16, 'cols' => 60, 'class' => "configfile")); 
    3030   
    31   echo '<div><em>main.inc.php</em></div>'; 
     31  echo '<div><em>main.inc.php (<a href="index.php?_getfile=main">download</a>)</em></div>'; 
    3232  echo $textbox->show($RCI->create_config('main')); 
    3333   
    34   echo '<div style="margin-top:1em"><em>db.inc.php</em></div>'; 
     34  echo '<div style="margin-top:1em"><em>db.inc.php (<a href="index.php?_getfile=db">download</a>)</em></div>'; 
    3535  echo $textbox->show($RCI->create_config('db')); 
    3636 
  • installer/index.php

    rafe50ae rc060677  
    2626  include_once $filename. '.php'; 
    2727} 
     28 
     29$RCI = rcube_install::get_instance(); 
     30$RCI->load_config(); 
     31 
     32if (isset($_GET['_getfile']) && in_array($_GET['_getfile'], array('main', 'db'))) 
     33{ 
     34  header('Content-type: text/plain'); 
     35  header('Content-Disposition: attachment; filename="'.$_GET['_getfile'].'.inc.php"'); 
     36  echo $RCI->create_config($_GET['_getfile']); 
     37  exit; 
     38} 
     39 
    2840?> 
    2941<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
     
    5264 
    5365<?php 
    54  
    55   $RCI = rcube_install::get_instance(); 
    56   $RCI->load_config(); 
    5766 
    5867  // exit if installation is complete 
Note: See TracChangeset for help on using the changeset viewer.