projects
/
phpfspot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix export, web_path was not set correctly
[phpfspot.git]
/
phpfspot_db.php
diff --git
a/phpfspot_db.php
b/phpfspot_db.php
index 4e87cf9c87927978eb2ed671d7554cc5e2fe5458..e0cf39f31a89df601b5352608849228cfdd7ad90 100644
(file)
--- a/
phpfspot_db.php
+++ b/
phpfspot_db.php
@@
-2,8
+2,9
@@
/***************************************************************************
*
/***************************************************************************
*
- * Copyright (c) by Andreas Unterkircher, unki@netshadow.at
- * All rights reserved
+ * phpfspot, presents your F-Spot photo collection in Web browsers.
+ *
+ * Copyright (c) by Andreas Unterkircher
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-21,6
+22,11
@@
*
***************************************************************************/
*
***************************************************************************/
+/**
+ * PHPFSPOT_DB class
+ *
+ * @package phpfspot
+ */
class PHPFSPOT_DB {
private $db;
class PHPFSPOT_DB {
private $db;
@@
-37,7
+43,9
@@
class PHPFSPOT_DB {
*/
public function __construct($parent, $db_path)
{
*/
public function __construct($parent, $db_path)
{
- $this->parent = $parent;
+ global $phpfspot;
+
+ $this->parent = $phpfspot;
$this->db_path = $db_path;
/* We are starting disconnected */
$this->db_path = $db_path;
/* We are starting disconnected */
@@
-73,6
+81,7
@@
class PHPFSPOT_DB {
$this->setConnStatus(false);
}
else {
$this->setConnStatus(false);
}
else {
+ sqlite3_create_function($this->db, 'basename', 1, 'basename');
$this->setConnStatus(true);
}
break;
$this->setConnStatus(true);
}
break;
@@
-202,10
+211,10
@@
class PHPFSPOT_DB {
$result = $this->db_query($query);
switch($this->parent->cfg->db_access) {
case 'native':
$result = $this->db_query($query);
switch($this->parent->cfg->db_access) {
case 'native':
- $row = $
result->fetchRow(
);
+ $row = $
this->db_fetch_object($result
);
break;
case 'pdo':
break;
case 'pdo':
- $row = $result
[0]
;
+ $row = $result
->fetch()
;
break;
}
return $row;
break;
}
return $row;