[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/www.git] / www / ecrire / req / sqlite3.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2017 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
12
13 if (!defined('_ECRIRE_INC_VERSION')) {
14 return;
15 }
16
17
18 include_spip('req/sqlite_generique');
19
20 $GLOBALS['spip_sqlite3_functions_1'] = _sqlite_ref_fonctions();
21
22
23 // http://code.spip.net/@req_sqlite3_dist
24 function req_sqlite3_dist($addr, $port, $login, $pass, $db = '', $prefixe = '') {
25 return req_sqlite_dist($addr, $port, $login, $pass, $db, $prefixe, $sqlite_version = 3);
26 }
27
28
29 // http://code.spip.net/@spip_sqlite3_constantes
30 function spip_sqlite3_constantes() {
31 if (!defined('SPIP_SQLITE3_ASSOC')) {
32 define('SPIP_SQLITE3_ASSOC', PDO::FETCH_ASSOC);
33 define('SPIP_SQLITE3_NUM', PDO::FETCH_NUM);
34 define('SPIP_SQLITE3_BOTH', PDO::FETCH_BOTH);
35 }
36 }
37
38 function spip_versions_sqlite3() {
39 return _sqlite_charger_version(3) ? 3 : false;
40 }