librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1500] rid gnukebox of mdb2 vestiges


From: Clint Adams
Subject: [Librefm-commits] [1500] rid gnukebox of mdb2 vestiges
Date: Tue, 12 May 2009 00:19:50 +0000

Revision: 1500
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1500
Author:   clint
Date:     2009-05-12 00:19:49 +0000 (Tue, 12 May 2009)
Log Message:
-----------
rid gnukebox of mdb2 vestiges

Modified Paths:
--------------
    trunk/gnukebox/README
    trunk/gnukebox/auth-utils.php
    trunk/gnukebox/database.php
    trunk/gnukebox/display.php
    trunk/gnukebox/fix-album-art.php
    trunk/gnukebox/musicbrainz.php
    trunk/gnukebox/nowplaying/1.2/index.php
    trunk/gnukebox/scrobble-utils.php

Removed Paths:
-------------
    trunk/gnukebox/database2.php

Modified: trunk/gnukebox/README
===================================================================
--- trunk/gnukebox/README       2009-05-12 00:17:32 UTC (rev 1499)
+++ trunk/gnukebox/README       2009-05-12 00:19:49 UTC (rev 1500)
@@ -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:

Modified: trunk/gnukebox/auth-utils.php
===================================================================
--- trunk/gnukebox/auth-utils.php       2009-05-12 00:17:32 UTC (rev 1499)
+++ trunk/gnukebox/auth-utils.php       2009-05-12 00:19:49 UTC (rev 1500)
@@ -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

Modified: trunk/gnukebox/database.php
===================================================================
--- trunk/gnukebox/database.php 2009-05-12 00:17:32 UTC (rev 1499)
+++ trunk/gnukebox/database.php 2009-05-12 00:19:49 UTC (rev 1500)
@@ -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() . ")");
-}
 ?>

Deleted: trunk/gnukebox/database2.php
===================================================================
--- trunk/gnukebox/database2.php        2009-05-12 00:17:32 UTC (rev 1499)
+++ trunk/gnukebox/database2.php        2009-05-12 00:19:49 UTC (rev 1500)
@@ -1,38 +0,0 @@
-<?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());
-} 
-
-?>

Modified: trunk/gnukebox/display.php
===================================================================
--- trunk/gnukebox/display.php  2009-05-12 00:17:32 UTC (rev 1499)
+++ trunk/gnukebox/display.php  2009-05-12 00:19:49 UTC (rev 1500)
@@ -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');
 
 ?>

Modified: trunk/gnukebox/fix-album-art.php
===================================================================
--- trunk/gnukebox/fix-album-art.php    2009-05-12 00:17:32 UTC (rev 1499)
+++ trunk/gnukebox/fix-album-art.php    2009-05-12 00:19:49 UTC (rev 1500)
@@ -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");

Modified: trunk/gnukebox/musicbrainz.php
===================================================================
--- trunk/gnukebox/musicbrainz.php      2009-05-12 00:17:32 UTC (rev 1499)
+++ trunk/gnukebox/musicbrainz.php      2009-05-12 00:19:49 UTC (rev 1500)
@@ -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);

Modified: trunk/gnukebox/nowplaying/1.2/index.php
===================================================================
--- trunk/gnukebox/nowplaying/1.2/index.php     2009-05-12 00:17:32 UTC (rev 
1499)
+++ trunk/gnukebox/nowplaying/1.2/index.php     2009-05-12 00:19:49 UTC (rev 
1500)
@@ -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'])) {

Modified: trunk/gnukebox/scrobble-utils.php
===================================================================
--- trunk/gnukebox/scrobble-utils.php   2009-05-12 00:17:32 UTC (rev 1499)
+++ trunk/gnukebox/scrobble-utils.php   2009-05-12 00:19:49 UTC (rev 1500)
@@ -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) 
 {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]