1
0

Complete include_once usage, romove constants

This commit is contained in:
onli
2013-06-22 12:32:54 +02:00
parent f0b7d6631b
commit a654b13a9a
13 changed files with 3 additions and 65 deletions

View File

@ -6,11 +6,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!"); die ("Don't hack!");
} }
if (defined('S9Y_FRAMEWORK_COMPAT')) {
return;
}
@define('S9Y_FRAMEWORK_COMPAT', true);
$serendipity = array(); $serendipity = array();
@ini_set('magic_quotes_runtime', 'off'); @ini_set('magic_quotes_runtime', 'off');

View File

@ -2,11 +2,6 @@
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details # All rights reserved. See LICENSE file for licensing details
if (defined('S9Y_FRAMEWORK_DB')) {
return;
}
@define('S9Y_FRAMEWORK_DB', true);
if (@include(S9Y_INCLUDE_PATH . "include/db/{$serendipity['dbType']}.inc.php")) { if (@include(S9Y_INCLUDE_PATH . "include/db/{$serendipity['dbType']}.inc.php")) {
@define('S9Y_DB_INCLUDED', TRUE); @define('S9Y_DB_INCLUDED', TRUE);
} }

View File

@ -6,11 +6,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!"); die ("Don't hack!");
} }
if (defined('S9Y_FRAMEWORK_COMMENTS')) {
return;
}
@define('S9Y_FRAMEWORK_COMMENTS', true);
/** /**
* Check if a comment token (from comment notification email) is valid for a given comment id. * Check if a comment token (from comment notification email) is valid for a given comment id.
* *

View File

@ -6,11 +6,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!"); die ("Don't hack!");
} }
if (defined('S9Y_FRAMEWORK_CONFIG')) {
return;
}
@define('S9Y_FRAMEWORK_CONFIG', true);
/** /**
* Adds a new author account * Adds a new author account
* *

View File

@ -6,11 +6,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!"); die ("Don't hack!");
} }
if (defined('S9Y_FRAMEWORK_ENTRIES')) {
return;
}
@define('S9Y_FRAMEWORK_ENTRIES', true);
/** /**
* Delete a category or range of categories * Delete a category or range of categories
* *

View File

@ -6,12 +6,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!"); die ("Don't hack!");
} }
if (defined('S9Y_FRAMEWORK_ENTRIES_ADMIN')) {
return;
}
@define('S9Y_FRAMEWORK_ENTRIES_ADMIN', true);
include_once(S9Y_INCLUDE_PATH . "include/functions_trackbacks.inc.php"); include_once(S9Y_INCLUDE_PATH . "include/functions_trackbacks.inc.php");

View File

@ -7,11 +7,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!"); die ("Don't hack!");
} }
if (defined('S9Y_FRAMEWORK_IMAGES')) {
return;
}
@define('S9Y_FRAMEWORK_IMAGES', true);
/** /**
* Check if an uploaded file is "evil" * Check if an uploaded file is "evil"
* *

View File

@ -6,11 +6,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!"); die ("Don't hack!");
} }
if (defined('S9Y_FRAMEWORK_INSTALLER')) {
return;
}
@define('S9Y_FRAMEWORK_INSTALLER', true);
/** /**
* Convert a PHP Ini setting to a boolean flag * Convert a PHP Ini setting to a boolean flag
* *

View File

@ -6,11 +6,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!"); die ("Don't hack!");
} }
if (defined('S9Y_FRAMEWORK_PERMALINKS')) {
return;
}
@define('S9Y_FRAMEWORK_PERMALINKS', true);
/** /**
* Converts a string into a filename that can be used safely in HTTP URLs * Converts a string into a filename that can be used safely in HTTP URLs
* *

View File

@ -6,11 +6,6 @@ if (IN_serendipity !== true) {
die ("Don't hack!"); die ("Don't hack!");
} }
if (defined('S9Y_FRAMEWORK_SMARTY')) {
return;
}
@define('S9Y_FRAMEWORK_SMARTY', true);
/** /**
* Fetch a list of trackbacks for an entry * Fetch a list of trackbacks for an entry
* *

View File

@ -6,12 +6,6 @@ if (IN_serendipity !== true) {
die ('Don\'t hack!'); die ('Don\'t hack!');
} }
if (defined('S9Y_FRAMEWORK_PLUGIN_API')) {
return;
}
@define('S9Y_FRAMEWORK_PLUGIN_API', true);
include_once S9Y_INCLUDE_PATH . 'include/functions.inc.php'; include_once S9Y_INCLUDE_PATH . 'include/functions.inc.php';

View File

@ -6,11 +6,6 @@ if (IN_serendipity !== true) {
die ('Don\'t hack!'); die ('Don\'t hack!');
} }
if (defined('S9Y_FRAMEWORK_PLUGIN_API_EXTENSION')) {
return;
}
@define('S9Y_FRAMEWORK_PLUGIN_API_EXTENSION', true);
class serendipity_plugin_api_extension extends serendipity_plugin_api class serendipity_plugin_api_extension extends serendipity_plugin_api
{ {
/** /**

View File

@ -138,9 +138,9 @@ $metadata = array(
'version' => $version 'version' => $version
); );
if (!defined('S9Y_FRAMEWORK_PLUGIN_API')) {
include(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php'); include_once(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
}
$plugins = serendipity_plugin_api::enum_plugins(); $plugins = serendipity_plugin_api::enum_plugins();
if (is_array($plugins)) { if (is_array($plugins)) {