[SPIP] v3.2.1-->v3.2.2
[lhc/web/www.git] / www / ecrire / req / sqlite2.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2019 *
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 include_spip('req/sqlite_generique');
18
19 $GLOBALS['spip_sqlite2_functions_1'] = _sqlite_ref_fonctions();
20
21
22 // http://code.spip.net/@req_sqlite2_dist
23 function req_sqlite2_dist($addr, $port, $login, $pass, $db = '', $prefixe = '') {
24 return req_sqlite_dist($addr, $port, $login, $pass, $db, $prefixe, $sqlite_version = 2);
25 }
26
27 // http://code.spip.net/@spip_sqlite2_constantes
28 function spip_sqlite2_constantes() {
29 if (!defined('SPIP_SQLITE2_ASSOC')) {
30 define('SPIP_SQLITE2_ASSOC', SQLITE_ASSOC);
31 define('SPIP_SQLITE2_NUM', SQLITE_NUM);
32 define('SPIP_SQLITE2_BOTH', SQLITE_BOTH);
33 }
34 }
35
36 function spip_versions_sqlite2() {
37 return _sqlite_charger_version(2) ? 2 : false;
38 }