move db-prefs shortcut functions to functions.php
This commit is contained in:
parent
77e6d589ff
commit
29ada58b4a
|
@ -12,7 +12,6 @@
|
||||||
define('NO_SESSION_AUTOSTART', true);
|
define('NO_SESSION_AUTOSTART', true);
|
||||||
|
|
||||||
require_once "autoload.php";
|
require_once "autoload.php";
|
||||||
require_once "db-prefs.php";
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "sessions.php";
|
require_once "sessions.php";
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
require_once "autoload.php";
|
require_once "autoload.php";
|
||||||
require_once "sessions.php";
|
require_once "sessions.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "db-prefs.php";
|
|
||||||
|
|
||||||
$op = (string)clean($op);
|
$op = (string)clean($op);
|
||||||
$method = (string)clean($method);
|
$method = (string)clean($method);
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?php
|
|
||||||
function get_pref($pref_name, $user_id = false, $die_on_error = false) {
|
|
||||||
return Db_Prefs::get()->read($pref_name, $user_id, $die_on_error);
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_pref($pref_name, $value, $user_id = false, $strip_tags = true) {
|
|
||||||
return Db_Prefs::get()->write($pref_name, $value, $user_id, $strip_tags);
|
|
||||||
}
|
|
|
@ -42,6 +42,14 @@
|
||||||
define('SUBSTRING_FOR_DATE', 'SUBSTRING');
|
define('SUBSTRING_FOR_DATE', 'SUBSTRING');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_pref($pref_name, $user_id = false, $die_on_error = false) {
|
||||||
|
return Db_Prefs::get()->read($pref_name, $user_id, $die_on_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
function set_pref($pref_name, $value, $user_id = false, $strip_tags = true) {
|
||||||
|
return Db_Prefs::get()->write($pref_name, $value, $user_id, $strip_tags);
|
||||||
|
}
|
||||||
|
|
||||||
function get_translations() {
|
function get_translations() {
|
||||||
$t = array(
|
$t = array(
|
||||||
"auto" => __("Detect automatically"),
|
"auto" => __("Detect automatically"),
|
||||||
|
@ -152,7 +160,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once 'db-prefs.php';
|
|
||||||
require_once 'controls.php';
|
require_once 'controls.php';
|
||||||
require_once 'controls_compat.php';
|
require_once 'controls_compat.php';
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
require_once "sessions.php";
|
require_once "sessions.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "sanity_check.php";
|
require_once "sanity_check.php";
|
||||||
require_once "db-prefs.php";
|
|
||||||
|
|
||||||
if (!init_plugins()) return;
|
if (!init_plugins()) return;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
require_once "sessions.php";
|
require_once "sessions.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "sanity_check.php";
|
require_once "sanity_check.php";
|
||||||
require_once "db-prefs.php";
|
|
||||||
|
|
||||||
if (!init_plugins()) return;
|
if (!init_plugins()) return;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
require_once "sessions.php";
|
require_once "sessions.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "sanity_check.php";
|
require_once "sanity_check.php";
|
||||||
require_once "db-prefs.php";
|
|
||||||
|
|
||||||
startup_gettext();
|
startup_gettext();
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
require_once "autoload.php";
|
require_once "autoload.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "sanity_check.php";
|
require_once "sanity_check.php";
|
||||||
require_once "db-prefs.php";
|
|
||||||
|
|
||||||
function make_stampfile($filename) {
|
function make_stampfile($filename) {
|
||||||
$fp = fopen(Config::get(Config::LOCK_DIRECTORY) . "/$filename", "w");
|
$fp = fopen(Config::get(Config::LOCK_DIRECTORY) . "/$filename", "w");
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
require_once "autoload.php";
|
require_once "autoload.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "sanity_check.php";
|
require_once "sanity_check.php";
|
||||||
require_once "db-prefs.php";
|
|
||||||
|
|
||||||
if (!function_exists('pcntl_fork')) {
|
if (!function_exists('pcntl_fork')) {
|
||||||
die("error: This script requires PHP compiled with PCNTL module.\n");
|
die("error: This script requires PHP compiled with PCNTL module.\n");
|
||||||
|
|
Loading…
Reference in New Issue