1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 17:59:21 +02:00

Rename Ampache to Ampache-doped

This commit is contained in:
Afterster 2014-02-01 10:30:13 +01:00
parent 918e3a8c3f
commit 7b64802f62
23 changed files with 41 additions and 40 deletions

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
config/ampache.cfg.php config/ampache-doped.cfg.php
*.phpproj *.phpproj
*.sln *.sln
*.v11.suo *.v11.suo

View file

@ -32,14 +32,14 @@ UI::show_header();
/* Switch on action boys */ /* Switch on action boys */
switch ($_REQUEST['action']) { switch ($_REQUEST['action']) {
/* This re-generates the config file comparing /* This re-generates the config file comparing
* /config/ampache.cfg to .cfg.dist * /config/ampache-doped.cfg to .cfg.dist
*/ */
case 'generate_config': case 'generate_config':
ob_end_clean(); ob_end_clean();
$current = parse_ini_file(AmpConfig::get('prefix') . '/config/ampache.cfg.php'); $current = parse_ini_file(AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php');
$final = generate_config($current); $final = generate_config($current);
$browser = new Horde_Browser(); $browser = new Horde_Browser();
$browser->downloadHeaders('ampache.cfg.php','text/plain',false,filesize(AmpConfig::get('prefix') . '/config/ampache.cfg.php.dist')); $browser->downloadHeaders('ampache-doped.cfg.php','text/plain',false,filesize(AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php.dist'));
echo $final; echo $final;
exit; exit;
break; break;

View file

@ -43,7 +43,7 @@ $translate = array('local_host'=>'database_hostname',
$path = dirname(__FILE__); $path = dirname(__FILE__);
$prefix = realpath($path . '/../'); $prefix = realpath($path . '/../');
$old_config = file_get_contents($prefix . '/config/ampache.cfg.php'); $old_config = file_get_contents($prefix . '/config/ampache-doped.cfg.php');
$data = explode("\n",$old_config); $data = explode("\n",$old_config);
@ -80,7 +80,7 @@ foreach ($data as $line) {
echo T_("Parse complete, writing"); echo T_("Parse complete, writing");
echo "\n"; echo "\n";
$handle = fopen($prefix . '/config/ampache.cfg.php','w'); $handle = fopen($prefix . '/config/ampache-doped.cfg.php','w');
$worked = fwrite($handle,$new_config); $worked = fwrite($handle,$new_config);

2
config/.gitignore vendored
View file

@ -1 +1 @@
ampache.cfg.php ampache-doped.cfg.php

View file

@ -91,8 +91,8 @@ php /bin/print_tags.inc [FILE]
.PP .PP
migrate_config.inc migrate_config.inc
This is used to migrate your ampache.cfg.php config file from php4 formating to php5 This is used to migrate your ampache-doped.cfg.php config file from php4 formating to php5
formating. This is done to decrease the parsing time of ampache.cfg.php. This is formating. This is done to decrease the parsing time of ampache-doped.cfg.php. This is
generally not needed unless you are upgrading from 3.3.3.5 to 3.4.x. generally not needed unless you are upgrading from 3.3.3.5 to 3.4.x.
debian/ampache.postinst runs this script automatically if needed. debian/ampache.postinst runs this script automatically if needed.

View file

@ -596,7 +596,7 @@ class XML_Data
break; break;
case 'itunes': case 'itunes':
$header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" . $header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" .
"<!-- XML Generated by Ampache v." . AmpConfig::get('version') . " -->\n"; "<!-- XML Generated by Ampache-doped v." . AmpConfig::get('version') . " -->\n";
"<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n" . "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n" .
"\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n" . "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n" .
"<plist version=\"1.0\">\n" . "<plist version=\"1.0\">\n" .
@ -611,7 +611,7 @@ class XML_Data
break; break;
case 'rss': case 'rss':
$header = "<?xml version=\"1.0\" encoding=\"" . AmpConfig::get('site_charset') . "\" ?>\n " . $header = "<?xml version=\"1.0\" encoding=\"" . AmpConfig::get('site_charset') . "\" ?>\n " .
"<!-- RSS Generated by Ampache v." . AmpConfig::get('version') . " on " . date("r",time()) . "-->\n" . "<!-- RSS Generated by Ampache-doped v." . AmpConfig::get('version') . " on " . date("r",time()) . "-->\n" .
"<rss version=\"2.0\">\n<channel>\n"; "<rss version=\"2.0\">\n<channel>\n";
break; break;
default: default:

View file

@ -208,8 +208,8 @@ function check_override_exec_time()
function check_config_writable() function check_config_writable()
{ {
// file eixsts && is writable, or dir is writable // file eixsts && is writable, or dir is writable
return ((file_exists(AmpConfig::get('prefix') . '/config/ampache.cfg.php') && is_writable(AmpConfig::get('prefix') . '/config/ampache.cfg.php')) return ((file_exists(AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php') && is_writable(AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php'))
|| (!file_exists(AmpConfig::get('prefix') . '/config/ampache.cfg.php') && is_writeable(AmpConfig::get('prefix') . '/config/'))); || (!file_exists(AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php') && is_writeable(AmpConfig::get('prefix') . '/config/')));
} }
/** /**

View file

@ -275,7 +275,7 @@ function translate_pattern_code($code)
function generate_config($current) function generate_config($current)
{ {
// Start building the new config file // Start building the new config file
$distfile = AmpConfig::get('prefix') . '/config/ampache.cfg.php.dist'; $distfile = AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php.dist';
$handle = fopen($distfile,'r'); $handle = fopen($distfile,'r');
$dist = fread($handle,filesize($distfile)); $dist = fread($handle,filesize($distfile));
fclose($handle); fclose($handle);

View file

@ -32,7 +32,7 @@ error_reporting(E_ERROR); // Only show fatal errors in production
$ampache_path = dirname(__FILE__); $ampache_path = dirname(__FILE__);
$prefix = realpath($ampache_path . "/../"); $prefix = realpath($ampache_path . "/../");
$configfile = $prefix . '/config/ampache.cfg.php'; $configfile = $prefix . '/config/ampache-doped.cfg.php';
require_once $prefix . '/lib/general.lib.php'; require_once $prefix . '/lib/general.lib.php';
require_once $prefix . '/lib/class/ampconfig.class.php'; require_once $prefix . '/lib/class/ampconfig.class.php';
require_once $prefix . '/lib/class/core.class.php'; require_once $prefix . '/lib/class/core.class.php';

View file

@ -198,7 +198,7 @@ function install_insert_db($db_user = null, $db_pass = null, $overwrite = false,
*/ */
function install_create_config($download = false) function install_create_config($download = false)
{ {
$config_file = AmpConfig::get('prefix') . '/config/ampache.cfg.php'; $config_file = AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php';
/* Attempt to make DB connection */ /* Attempt to make DB connection */
$dbh = Dba::dbh(); $dbh = Dba::dbh();
@ -225,7 +225,7 @@ function install_create_config($download = false)
} }
} else { } else {
$browser = new Horde_Browser(); $browser = new Horde_Browser();
$browser->downloadHeaders('ampache.cfg.php', 'text/plain', false, strlen($final)); $browser->downloadHeaders('ampache-doped.cfg.php', 'text/plain', false, strlen($final));
echo $final; echo $final;
exit(); exit();
} }

View file

@ -43,7 +43,7 @@ function log_event($username, $event_name, $event_description, $log_name)
$log_write = error_log($log_line, 3, $log_filename); $log_write = error_log($log_line, 3, $log_filename);
if (!$log_write) { if (!$log_write) {
echo "Warning: Unable to write to log ($log_filename) Please check your log_path variable in ampache.cfg.php"; echo "Warning: Unable to write to log ($log_filename) Please check your log_path variable in ampache-doped.cfg.php";
} }
} // log_event } // log_event

View file

@ -487,7 +487,7 @@ function xml_get_header($type)
break; break;
case 'xspf': case 'xspf':
$header = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" . $header = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" .
"<!-- XML Generated by Ampache v." . AmpConfig::get('version') . " -->"; "<!-- XML Generated by Ampache-doped v." . AmpConfig::get('version') . " -->";
"<playlist version = \"1\" xmlns=\"http://xspf.org/ns/0/\">\n ". "<playlist version = \"1\" xmlns=\"http://xspf.org/ns/0/\">\n ".
"<title>Ampache XSPF Playlist</title>\n" . "<title>Ampache XSPF Playlist</title>\n" .
"<creator>" . AmpConfig::get('site_title') . "</creator>\n" . "<creator>" . AmpConfig::get('site_title') . "</creator>\n" .

View file

@ -2,8 +2,8 @@ To enable twitter support to work for Amapche you have to first
have to register an app from Twitter's site. have to register an app from Twitter's site.
http://dev.twitter.com/apps/new is the registration page. After you http://dev.twitter.com/apps/new is the registration page. After you
have registered you will be presented with two keys that you will need have registered you will be presented with two keys that you will need
to add to you ampache.cfg.php file. To enable it you need to add the to add to you ampache-doped.cfg.php file. To enable it you need to add the
next three lines to your ampache.cfg.php file. next three lines to your ampache-doped.cfg.php file.
twitter = true twitter = true
twitter_consumer_key = "my_consumer_key" twitter_consumer_key = "my_consumer_key"

View file

@ -24,8 +24,9 @@
</div> <!-- end id="content"--> </div> <!-- end id="content"-->
</div> <!-- end id="maincontainer"--> </div> <!-- end id="maincontainer"-->
<div id="footer"> <div id="footer">
<a href="https://github.com/ampache-doped/ampache#readme" target="_blank">Ampache <?php echo AmpConfig::get('version'); ?></a><br /> <a href="https://github.com/ampache-doped/ampache#readme" target="_blank">Ampache-doped <?php echo AmpConfig::get('version'); ?></a><br />
Copyright © 2001 - 2013 Ampache.org Copyright © 2013 - 2014 Ampache-doped.github.io |
Copyright © 2001 - 2013 Ampache.org |
<?php echo T_('Queries:'); ?><?php echo Dba::$stats['query']; ?> <?php echo T_('Cache Hits:'); ?><?php echo database_object::$cache_hit; ?> <?php echo T_('Queries:'); ?><?php echo Dba::$stats['query']; ?> <?php echo T_('Cache Hits:'); ?><?php echo database_object::$cache_hit; ?>
</div> </div>
</body> </body>

View file

@ -41,13 +41,13 @@
<div class="notify"> <div class="notify">
<h3><?php echo T_('Requirements'); ?></h3> <h3><?php echo T_('Requirements'); ?></h3>
<p> <p>
<?php echo T_('This page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following prerequisites:'); ?> <?php echo T_('This page handles the installation of the Ampache database and the creation of the ampache-doped.cfg.php file. Before you continue please make sure that you have the following prerequisites:'); ?>
</p> </p>
<ul> <ul>
<li><?php echo T_('A MySQL server with a username and password that can create/modify databases'); ?></li> <li><?php echo T_('A MySQL server with a username and password that can create/modify databases'); ?></li>
<li><?php echo sprintf(T_('Your webserver has read access to the files %s and %s'),$prefix . '/sql/ampache.sql',$prefix . '/config/ampache.cfg.php.dist'); ?></li> <li><?php echo sprintf(T_('Your webserver has read access to the files %s and %s'),$prefix . '/sql/ampache.sql',$prefix . '/config/ampache-doped.cfg.php.dist'); ?></li>
</ul> </ul>
<p> <p>
<?php echo sprintf(T_("Once you have ensured that the above requirements are met please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your Ampache install at a later date simply edit %s"), $prefix . '/config/ampache.cfg.php'); ?> <?php echo sprintf(T_("Once you have ensured that the above requirements are met please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your Ampache install at a later date simply edit %s"), $prefix . '/config/ampache-doped.cfg.php'); ?>
</p> </p>
</div> </div>

View file

@ -27,7 +27,7 @@ require $prefix . '/templates/install_header.inc.php';
<dl> <dl>
<dd><?php echo T_('This step creates and inserts the Ampache database, so please provide a MySQL account with database creation rights. This step may take some time on slower computers.'); ?></dd> <dd><?php echo T_('This step creates and inserts the Ampache database, so please provide a MySQL account with database creation rights. This step may take some time on slower computers.'); ?></dd>
</dl> </dl>
<?php echo T_('Step 2 - Create ampache.cfg.php'); ?><br /> <?php echo T_('Step 2 - Create ampache-doped.cfg.php'); ?><br />
<?php echo T_('Step 3 - Set up the initial account'); ?><br /> <?php echo T_('Step 3 - Set up the initial account'); ?><br />
<br /> <br />
<?php Error::display('general'); ?> <?php Error::display('general'); ?>

View file

@ -24,7 +24,7 @@ require $prefix . '/templates/install_header.inc.php';
?> ?>
<div class="content"> <div class="content">
<?php echo T_('Step 1 - Create the Ampache database'); ?><br /> <?php echo T_('Step 1 - Create the Ampache database'); ?><br />
<?php echo T_('Step 2 - Create ampache.cfg.php'); ?><br /> <?php echo T_('Step 2 - Create ampache-doped.cfg.php'); ?><br />
<strong><?php echo T_('Step 3 - Set up the initial account'); ?></strong><br /> <strong><?php echo T_('Step 3 - Set up the initial account'); ?></strong><br />
<dl> <dl>
<dd><?php echo T_('This step creates your initial Ampache admin account. Once your admin account has been created you will be redirected to the login page.'); ?></dd> <dd><?php echo T_('This step creates your initial Ampache admin account. Once your admin account has been created you will be redirected to the login page.'); ?></dd>

View file

@ -29,8 +29,8 @@
</tr> </tr>
<?php require $prefix . '/templates/show_test_table.inc.php'; ?> <?php require $prefix . '/templates/show_test_table.inc.php'; ?>
<tr> <tr>
<td><?php echo sprintf(T_('%s is readable'), 'ampache.cfg.php.dist'); ?></td> <td><?php echo sprintf(T_('%s is readable'), 'ampache-doped.cfg.php.dist'); ?></td>
<td><?php echo debug_result(is_readable($prefix . '/config/ampache.cfg.php.dist')); ?></td> <td><?php echo debug_result(is_readable($prefix . '/config/ampache-doped.cfg.php.dist')); ?></td>
<td><?php echo T_('This tests whether the configuration template can be read.'); ?></td> <td><?php echo T_('This tests whether the configuration template can be read.'); ?></td>
</tr> </tr>
<tr> <tr>
@ -39,7 +39,7 @@
<td><?php echo T_('This tests whether the file needed to initialise the database structure is available.'); ?></td> <td><?php echo T_('This tests whether the file needed to initialise the database structure is available.'); ?></td>
</tr> </tr>
<tr> <tr>
<td><?php echo T_('ampache.cfg.php is writable'); ?></td> <td><?php echo T_('ampache-doped.cfg.php is writable'); ?></td>
<td><?php echo debug_result(check_config_writable()); ?></td> <td><?php echo debug_result(check_config_writable()); ?></td>
<td><?php echo T_('This tests whether PHP can write to config/. This is not strictly necessary, but will help streamline the installation process.'); ?></td> <td><?php echo T_('This tests whether PHP can write to config/. This is not strictly necessary, but will help streamline the installation process.'); ?></td>
</tr> </tr>

View file

@ -27,7 +27,7 @@ require $prefix . '/templates/install_header.inc.php';
?> ?>
<div class="content"> <div class="content">
<?php echo T_('Step 1 - Create the Ampache database'); ?><br /> <?php echo T_('Step 1 - Create the Ampache database'); ?><br />
<strong><?php echo T_('Step 2 - Create ampache.cfg.php'); ?></strong><br /> <strong><?php echo T_('Step 2 - Create ampache-doped.cfg.php'); ?></strong><br />
<dl> <dl>
<dd><?php printf(T_('This step takes the basic config values and generates the config file. If your config/ directory is writable, you can select "write" to have Ampache write the config file directly to the correct location. If you select "download" it will prompt you to download the config file, and you can then manually place the config file in %s'), $prefix . '/config'); ?></dd> <dd><?php printf(T_('This step takes the basic config values and generates the config file. If your config/ directory is writable, you can select "write" to have Ampache write the config file directly to the correct location. If you select "download" it will prompt you to download the config file, and you can then manually place the config file in %s'), $prefix . '/config'); ?></dd>
</dl> </dl>
@ -77,14 +77,14 @@ require $prefix . '/templates/install_header.inc.php';
<br /> <br />
<table> <table>
<tr> <tr>
<td class="align"><?php echo T_('ampache.cfg.php exists?'); ?></td> <td class="align"><?php echo T_('ampache-doped.cfg.php exists?'); ?></td>
<td> <td>
<?php echo debug_result(is_readable($configfile)); ?> <?php echo debug_result(is_readable($configfile)); ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="align"> <td class="align">
<?php echo T_('ampache.cfg.php configured?'); ?> <?php echo T_('ampache-doped.cfg.php configured?'); ?>
</td> </td>
<td> <td>
<?php <?php

View file

@ -38,11 +38,11 @@ body {
<body bgcolor="#f0f0f0"> <body bgcolor="#f0f0f0">
<div id="header"> <div id="header">
<h1><?php echo T_('Ampache Debug'); ?></h1> <h1><?php echo T_('Ampache Debug'); ?></h1>
<p>Ampache.cfg.php error detected</p> <p>Ampache-doped.cfg.php error detected</p>
</div> </div>
<div id="content"> <div id="content">
<h3 style="color:red;">Ampache.cfg.php Parse Error</h3> <h3 style="color:red;">Ampache-doped.cfg.php Parse Error</h3>
<p>You've been redirected to this page because your <strong>/config/ampache.cfg.php</strong> was not parsable. <p>You've been redirected to this page because your <strong>/config/ampache-doped.cfg.php</strong> was not parsable.
If you are upgrading from 3.3.x please see the directions below.</p> If you are upgrading from 3.3.x please see the directions below.</p>
<h3>Migrating from 3.3.x to 3.4.x</h3> <h3>Migrating from 3.3.x to 3.4.x</h3>
@ -51,7 +51,7 @@ unable to read the old config files. From inside the Ampache root directory you
new config file.</p> new config file.</p>
<p>The following settings will not be migrated by the <strong>migrate_config.inc</strong> script due to major changes between versions. The default <p>The following settings will not be migrated by the <strong>migrate_config.inc</strong> script due to major changes between versions. The default
values from the ampache.cfg.php.dist file will be used.</p> values from the ampache-doped.cfg.php.dist file will be used.</p>
<strong>auth_methods</strong> (<i>mysql</i>)<br /> <strong>auth_methods</strong> (<i>mysql</i>)<br />
This defines which auth methods Auth will attempt to use and in which order, if auto_create isn't enabled. This defines which auth methods Auth will attempt to use and in which order, if auto_create isn't enabled.

View file

@ -128,7 +128,7 @@ if (!defined('INSTALL')) {
<?php echo debug_result(is_readable($configfile)); ?> <?php echo debug_result(is_readable($configfile)); ?>
</td> </td>
<td width="350px"> <td width="350px">
<?php echo T_('This test attempts to read config/ampache.cfg.php. If this fails the file either is not in the correct location or is not currently readable.'); ?> <?php echo T_('This test attempts to read config/ampache-doped.cfg.php. If this fails the file either is not in the correct location or is not currently readable.'); ?>
</td> </td>
</tr> </tr>
<tr> <tr>

View file

@ -27,7 +27,7 @@ switch ($_REQUEST['action']) {
case 'config': case 'config':
// Check to see if the config file is working now, if so fall // Check to see if the config file is working now, if so fall
// through to the default, else show the appropriate template // through to the default, else show the appropriate template
$configfile = "$prefix/config/ampache.cfg.php"; $configfile = "$prefix/config/ampache-doped.cfg.php";
if (!count(parse_ini_file($configfile))) { if (!count(parse_ini_file($configfile))) {
require_once $prefix . '/templates/show_test_config.inc.php'; require_once $prefix . '/templates/show_test_config.inc.php';