use include_once
This commit is contained in:
parent
01a93d5488
commit
cbe07715fd
@ -24,7 +24,7 @@ switch ($serendipity['GET']['adminAction']) {
|
||||
return true;
|
||||
}
|
||||
|
||||
include(S9Y_INCLUDE_PATH . "include/functions_images_crop.inc.php");
|
||||
include_once(S9Y_INCLUDE_PATH . "include/functions_images_crop.inc.php");
|
||||
$media['is_imgedit'] = true;
|
||||
$media['css_imgedit'] = serendipity_getTemplateFile('admin/imgedit.css');
|
||||
|
||||
|
@ -378,9 +378,9 @@ if ( (int)$serendipity['GET']['step'] == 0 ) {
|
||||
}
|
||||
|
||||
|
||||
if (!defined('S9Y_FRAMEWORK_FUNCTIONS')) {
|
||||
include dirname(dirname(__FILE__)) . "/functions.inc.php";
|
||||
}
|
||||
|
||||
include_once dirname(dirname(__FILE__)) . "/functions.inc.php";
|
||||
|
||||
|
||||
if (!is_object($serendipity['smarty'])) {
|
||||
serendipity_smarty_init();
|
||||
|
@ -120,7 +120,7 @@ if (is_array($template_config)) {
|
||||
|
||||
$data["form_token"] = serendipity_setFormToken();
|
||||
|
||||
include S9Y_INCLUDE_PATH . 'include/functions_plugins_admin.inc.php';
|
||||
include_once S9Y_INCLUDE_PATH . 'include/functions_plugins_admin.inc.php';
|
||||
|
||||
$template_vars =& serendipity_loadThemeOptions($template_config);
|
||||
|
||||
|
@ -342,7 +342,7 @@ function serendipity_detectLang($use_include = false) {
|
||||
$preferred_language = strtolower(preg_replace('@^([^\-_;]*)_?.*$@', '\1', $lang));
|
||||
if (in_array($preferred_language, $supported_languages)) {
|
||||
if ($use_include) {
|
||||
@include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_' . $preferred_language . '.inc.php');
|
||||
@include_once(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_' . $preferred_language . '.inc.php');
|
||||
$serendipity['autolang'] = $preferred_language;
|
||||
}
|
||||
return $preferred_language;
|
||||
|
@ -12,36 +12,18 @@ if (defined('S9Y_FRAMEWORK_FUNCTIONS')) {
|
||||
@define('S9Y_FRAMEWORK_FUNCTIONS', true);
|
||||
|
||||
$serendipity['imageList'] = array();
|
||||
if (!defined('S9Y_FRAMEWORK_DB')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/db/db.inc.php");
|
||||
}
|
||||
if (!defined('S9Y_FRAMEWORK_COMPAT')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/compat.inc.php");
|
||||
}
|
||||
if (!defined('S9Y_FRAMEWORK_CONFIG')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/functions_config.inc.php");
|
||||
}
|
||||
if (!defined('S9Y_FRAMEWORK_PLUGIN_API')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/plugin_api.inc.php");
|
||||
}
|
||||
if (!defined('S9Y_FRAMEWORK_IMAGES')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/functions_images.inc.php");
|
||||
}
|
||||
if (!defined('S9Y_FRAMEWORK_INSTALLER')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/functions_installer.inc.php");
|
||||
}
|
||||
if (!defined('S9Y_FRAMEWORK_ENTRIES')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/functions_entries.inc.php");
|
||||
}
|
||||
if (!defined('S9Y_FRAMEWORK_COMMENTS')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/functions_comments.inc.php");
|
||||
}
|
||||
if (!defined('S9Y_FRAMEWORK_PERMALINKS')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/functions_permalinks.inc.php");
|
||||
}
|
||||
if (!defined('S9Y_FRAMEWORK_SMARTY')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/functions_smarty.inc.php");
|
||||
}
|
||||
|
||||
include_once(S9Y_INCLUDE_PATH . "include/db/db.inc.php");
|
||||
include_once(S9Y_INCLUDE_PATH . "include/compat.inc.php");
|
||||
include_once(S9Y_INCLUDE_PATH . "include/functions_config.inc.php");
|
||||
include_once(S9Y_INCLUDE_PATH . "include/plugin_api.inc.php");
|
||||
include_once(S9Y_INCLUDE_PATH . "include/functions_images.inc.php");
|
||||
include_once(S9Y_INCLUDE_PATH . "include/functions_installer.inc.php");
|
||||
include_once(S9Y_INCLUDE_PATH . "include/functions_entries.inc.php");
|
||||
include_once(S9Y_INCLUDE_PATH . "include/functions_comments.inc.php");
|
||||
include_once(S9Y_INCLUDE_PATH . "include/functions_permalinks.inc.php");
|
||||
include_once(S9Y_INCLUDE_PATH . "include/functions_smarty.inc.php");
|
||||
|
||||
/**
|
||||
* Truncate a string to a specific length, multibyte aware. Appends '...' if successfully truncated
|
||||
*
|
||||
|
@ -11,9 +11,9 @@ if (defined('S9Y_FRAMEWORK_ENTRIES_ADMIN')) {
|
||||
}
|
||||
@define('S9Y_FRAMEWORK_ENTRIES_ADMIN', true);
|
||||
|
||||
if (!defined('S9Y_FRAMEWORK_TRACKBACKS')) {
|
||||
include(S9Y_INCLUDE_PATH . "include/functions_trackbacks.inc.php");
|
||||
}
|
||||
|
||||
include_once(S9Y_INCLUDE_PATH . "include/functions_trackbacks.inc.php");
|
||||
|
||||
|
||||
/**
|
||||
* Prints the form for editing/creating new blog entries
|
||||
|
@ -410,7 +410,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
||||
if ($cbag->get('type') == 'html') {
|
||||
$htmlnugget[] = $elcount;
|
||||
if (!function_exists('serendipity_emit_htmlarea_code')) {
|
||||
@include dirname(__FILE__) . '/functions_entries_admin.inc.php';
|
||||
@include_once dirname(__FILE__) . '/functions_entries_admin.inc.php';
|
||||
}
|
||||
serendipity_emit_htmlarea_code('nuggets', 'nuggets', true);
|
||||
}
|
||||
|
@ -867,7 +867,7 @@ function serendipity_smarty_init($vars = array()) {
|
||||
if (!defined('IN_serendipity_admin') && file_exists($template_dir . '/template.inc.php')) {
|
||||
// If this file exists, a custom template engine will be loaded.
|
||||
// Beware: Smarty is used in the Admin backend, despite of this.
|
||||
include $template_dir . '/template.inc.php';
|
||||
include_once $template_dir . '/template.inc.php';
|
||||
} else {
|
||||
// Set a session variable if Smarty fails:
|
||||
$prev_smarty = $_SESSION['no_smarty'];
|
||||
@ -880,7 +880,7 @@ function serendipity_smarty_init($vars = array()) {
|
||||
// Default Smarty Engine will be used
|
||||
@define('SMARTY_DIR', S9Y_PEAR_PATH . 'Smarty/libs/');
|
||||
if (!class_exists('Smarty')) {
|
||||
include SMARTY_DIR . 'Smarty.class.php';
|
||||
include_once SMARTY_DIR . 'Smarty.class.php';
|
||||
}
|
||||
|
||||
if (!class_exists('Smarty')) {
|
||||
@ -889,7 +889,7 @@ function serendipity_smarty_init($vars = array()) {
|
||||
|
||||
// Load serendipity smarty class loading class
|
||||
if (!class_exists('Serendipity_Smarty')) {
|
||||
include 'serendipity_smarty_class.inc.php';
|
||||
include_once 'serendipity_smarty_class.inc.php';
|
||||
}
|
||||
|
||||
if (!class_exists('Serendipity_Smarty')) {
|
||||
|
@ -6,13 +6,11 @@ if (IN_serendipity !== true) {
|
||||
die ("Don't hack!");
|
||||
}
|
||||
|
||||
if (!defined('S9Y_FRAMEWORK')) {
|
||||
include('serendipity_config.inc.php');
|
||||
}
|
||||
include_once('serendipity_config.inc.php');
|
||||
|
||||
|
||||
include_once(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
|
||||
|
||||
if (!defined('S9Y_FRAMEWORK_PLUGIN_API')) {
|
||||
include(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
|
||||
}
|
||||
|
||||
$uri_addData = array(
|
||||
'startpage' => false,
|
||||
|
@ -16,11 +16,11 @@ if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) {
|
||||
// The following variable can be set in serendipity_config_local.inc.php to force your templates being able to use language override includes
|
||||
if ($serendipity['useTemplateLanguage']) {
|
||||
if (defined('S9Y_DATA_PATH')) {
|
||||
@include (S9Y_DATA_PATH . 'templates/' . $serendipity['template'] . '/' . $charset . 'lang_' . $serendipity['lang'] . '.inc.php');
|
||||
@include (S9Y_DATA_PATH . 'templates/' . $serendipity['template'] . '/lang_en.inc.php');
|
||||
@include_once (S9Y_DATA_PATH . 'templates/' . $serendipity['template'] . '/' . $charset . 'lang_' . $serendipity['lang'] . '.inc.php');
|
||||
@include_once (S9Y_DATA_PATH . 'templates/' . $serendipity['template'] . '/lang_en.inc.php');
|
||||
} else {
|
||||
@include (S9Y_INCLUDE_PATH . 'templates/' . $serendipity['template'] . '/' . $charset . 'lang_' . $serendipity['lang'] . '.inc.php');
|
||||
@include (S9Y_INCLUDE_PATH . 'templates/' . $serendipity['template'] . '/lang_en.inc.php');
|
||||
@include_once (S9Y_INCLUDE_PATH . 'templates/' . $serendipity['template'] . '/' . $charset . 'lang_' . $serendipity['lang'] . '.inc.php');
|
||||
@include_once (S9Y_INCLUDE_PATH . 'templates/' . $serendipity['template'] . '/lang_en.inc.php');
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) {
|
||||
|
||||
// Do fallback to english
|
||||
if (IS_installed === false || (defined('IS_up2date') && IS_up2date === false)) {
|
||||
@include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_en.inc.php');
|
||||
@include_once(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_en.inc.php');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,9 +11,9 @@ if (defined('S9Y_FRAMEWORK_PLUGIN_API')) {
|
||||
}
|
||||
@define('S9Y_FRAMEWORK_PLUGIN_API', true);
|
||||
|
||||
if (!defined('S9Y_FRAMEWORK_FUNCTIONS')) {
|
||||
include S9Y_INCLUDE_PATH . 'include/functions.inc.php';
|
||||
}
|
||||
|
||||
include_once S9Y_INCLUDE_PATH . 'include/functions.inc.php';
|
||||
|
||||
|
||||
|
||||
/* Core API function mappings
|
||||
|
Loading…
x
Reference in New Issue
Block a user