We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit e3806903 authored by clint's avatar clint

rid gnukebox of mdb2 vestiges

parent ecddae96
......@@ -2,8 +2,7 @@
To install visit http://yourserver.com/path/to/gobbler/install.php
As things stand you'll need the MDB2 pear module installed (and at least one MDB2 driver) this can be achieved by running "pear install mdb2 mdb2#sqlite".
(For distribution we can include the latest version of MDB2 in the release packages if we want to make things even simpler for people.)
As things stand you'll need the ADODB module installed.
Web services API:
To test the authentication API once the server is set up:
......
......@@ -19,7 +19,7 @@
*/
require_once('database2.php');
require_once('database.php');
function check_web_auth($username, $token, $timestamp, $api_key, $sk) {
// Validates authentication using a web services token
......
......@@ -20,29 +20,19 @@
*/
if(!file_exists(dirname(__FILE__) . "/config.php")) {
die("Please run the <a href='install.php'>Install</a> script to configure your installation");
if(!file_exists(dirname(__FILE__) . '/config.php')) {
die('Please run the <a href=\'install.php\'>Install</a> script to configure your installation');
}
require_once('config.php');
require_once('MDB2.php');
require_once('adodb/adodb-exceptions.inc.php');
require_once('adodb/adodb.inc.php');
$mdb2 =& MDB2::connect($connect_string);
if (PEAR::isError($mdb2)) {
die($mdb2->getMessage());
}
try {
$adodb =& NewADOConnection($adodb_connect_string);
} catch (exception $e) {
var_dump($e);
adodb_backtrace($e->gettrace());
}
function reportError($text, $data) {
// make a fresh connection
global $connect_string;
$mdbe = MDB2::connect($connect_string);
if (PEAR::isError($mdbe)) {
die($mdbe->getMessage());
}
$mdbe->exec("INSERT INTO Error (msg, data, time) VALUES ("
. $mdbe->quote($text, 'text') . ", "
. $mdbe->quote($data, 'text') . ", "
. time() . ")");
}
?>
<?php
/* Libre.fm -- a free network service for sharing your music listening habits
Copyright (C) 2009 Free Software Foundation, Inc
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
if(!file_exists(dirname(__FILE__) . '/config.php')) {
die('Please run the <a href=\'install.php\'>Install</a> script to configure your installation');
}
require_once('config.php');
require_once('adodb/adodb-exceptions.inc.php');
require_once('adodb/adodb.inc.php');
try {
$adodb =& NewADOConnection($adodb_connect_string);
} catch (exception $e) {
var_dump($e);
adodb_backtrace($e->gettrace());
}
?>
......@@ -19,7 +19,7 @@
*/
header('Content-type: text/html; charset=utf-8');
require_once('database2.php');
require_once('database.php');
require_once('utils/human-time.php');
?>
......
......@@ -24,7 +24,7 @@
header('Content-type: text/html; charset=utf-8');
require_once('database2.php');
require_once('database.php');
$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
$res = $adodb->GetAll("SELECT name, artist_name, image, artwork_license FROM Album WHERE artwork_license IS NULL LIMIT 5000");
......
......@@ -24,7 +24,7 @@
header('Content-type: text/html; charset=utf-8');
require_once('database2.php');
require_once('database.php');
require_once('utils/human-time.php');
$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
......
......@@ -18,7 +18,7 @@
*/
require_once('../../database2.php');
require_once('../../database.php');
require_once('../../scrobble-utils.php');
if(!isset($_POST['s']) || !isset($_POST['a']) || !isset($_POST['t'])) {
......
......@@ -19,7 +19,7 @@
*/
require_once('database2.php'); // include the database connection string
require_once('database.php'); // include the database connection string
function usernameFromSID($session_id)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment