FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove first indent in code formatting - batch 1 · turkdevops/textpattern@3e35e16 · GitHub

/ textpattern Public template
forked from textpattern/textpattern

Commit 3e35e16

Browse files
committed
Remove first indent in code formatting - batch 1
git-svn-id: http://textpattern.googlecode.com/svn/development/4.x@5786 2fea6a4d-a838-0410-917b-93a53c48e9d2
1 parent 0f22ebe commit 3e35e16

8 files changed

Lines changed: 1143 additions & 1074 deletions

File tree

‎css.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
// As the deliberate awkwardly-named local variable $_txpfoo MUST NOT be unset to avoid notices further
4646
// down, we must remove any potential identically-named global from the list of global names here.
4747
unset($_txpg['_txpfoo']);
48+
4849
foreach ($_txpg as $_txpfoo => $value) {
4950
if (!in_array($_txpfoo, array(
5051
'GLOBALS',

‎index.php‎

Lines changed: 61 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -21,76 +21,77 @@
2121
* along with Textpattern. If not, see <http://www.gnu.org/licenses/>.
2222
*/
2323

24-
// Make sure we display all errors that occur during initialisation.
25-
error_reporting(E_ALL | E_STRICT);
26-
@ini_set("display_errors", "1");
24+
// Make sure we display all errors that occur during initialisation.
25+
error_reporting(E_ALL | E_STRICT);
26+
@ini_set("display_errors", "1");
2727

28-
if (@ini_get('register_globals')) {
29-
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {
30-
die('GLOBALS overwrite attempt detected. Please consider turning register_globals off.');
31-
}
28+
if (@ini_get('register_globals')) {
29+
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {
30+
die('GLOBALS overwrite attempt detected. Please consider turning register_globals off.');
31+
}
3232

33-
// Collect and unset all registered variables from globals.
34-
$_txpg = array_merge(
35-
isset($_SESSION) ? (array) $_SESSION : array(),
36-
(array) $_ENV,
37-
(array) $_GET,
38-
(array) $_POST,
39-
(array) $_COOKIE,
40-
(array) $_FILES,
41-
(array) $_SERVER);
33+
// Collect and unset all registered variables from globals.
34+
$_txpg = array_merge(
35+
isset($_SESSION) ? (array) $_SESSION : array(),
36+
(array) $_ENV,
37+
(array) $_GET,
38+
(array) $_POST,
39+
(array) $_COOKIE,
40+
(array) $_FILES,
41+
(array) $_SERVER);
4242

43-
// As the deliberately awkward-named local variable $_txpfoo MUST NOT be unset to avoid notices further
44-
// down, we must remove any potentially identical-named global from the list of global names here.
45-
unset($_txpg['_txpfoo']);
46-
foreach ($_txpg as $_txpfoo => $value) {
47-
if (!in_array($_txpfoo, array(
48-
'GLOBALS',
49-
'_SERVER',
50-
'_GET',
51-
'_POST',
52-
'_FILES',
53-
'_COOKIE',
54-
'_SESSION',
55-
'_REQUEST',
56-
'_ENV',
57-
))) {
58-
unset($GLOBALS[$_txpfoo], $$_txpfoo);
59-
}
43+
// As the deliberately awkward-named local variable $_txpfoo MUST NOT be unset to avoid notices further
44+
// down, we must remove any potentially identical-named global from the list of global names here.
45+
unset($_txpg['_txpfoo']);
46+
47+
foreach ($_txpg as $_txpfoo => $value) {
48+
if (!in_array($_txpfoo, array(
49+
'GLOBALS',
50+
'_SERVER',
51+
'_GET',
52+
'_POST',
53+
'_FILES',
54+
'_COOKIE',
55+
'_SESSION',
56+
'_REQUEST',
57+
'_ENV',
58+
))) {
59+
unset($GLOBALS[$_txpfoo], $$_txpfoo);
6060
}
6161
}
62+
}
6263

63-
define("txpinterface", "public");
64+
define("txpinterface", "public");
6465

65-
if (!defined('txpath')) {
66-
define("txpath", dirname(__FILE__).'/textpattern');
67-
}
66+
if (!defined('txpath')) {
67+
define("txpath", dirname(__FILE__).'/textpattern');
68+
}
6869

69-
// Save server path to site root.
70-
if (!isset($here)) {
71-
$here = dirname(__FILE__);
72-
}
70+
// Save server path to site root.
71+
if (!isset($here)) {
72+
$here = dirname(__FILE__);
73+
}
7374

74-
// Pull in config unless configuration data has already been provided (multi-headed use).
75-
if (!isset($txpcfg['table_prefix'])) {
76-
// Use buffering to ensure bogus whitespace in config.php is ignored.
77-
ob_start(NULL, 2048);
78-
include txpath.'/config.php';
79-
ob_end_clean();
80-
}
75+
// Pull in config unless configuration data has already been provided (multi-headed use).
76+
if (!isset($txpcfg['table_prefix'])) {
77+
// Use buffering to ensure bogus whitespace in config.php is ignored.
78+
ob_start(NULL, 2048);
79+
include txpath.'/config.php';
80+
ob_end_clean();
81+
}
8182

82-
include txpath.'/lib/constants.php';
83-
include txpath.'/lib/txplib_misc.php';
83+
include txpath.'/lib/constants.php';
84+
include txpath.'/lib/txplib_misc.php';
8485

85-
if (!isset($txpcfg['table_prefix'])) {
86-
txp_status_header('503 Service Unavailable');
87-
exit('config.php is missing or corrupt. To install Textpattern, visit <a href="./textpattern/setup/">textpattern/setup/</a>');
88-
}
86+
if (!isset($txpcfg['table_prefix'])) {
87+
txp_status_header('503 Service Unavailable');
88+
exit('config.php is missing or corrupt. To install Textpattern, visit <a href="./textpattern/setup/">textpattern/setup/</a>');
89+
}
8990

90-
// Custom caches, et cetera?
91-
if (isset($txpcfg['pre_publish_script'])) {
92-
require $txpcfg['pre_publish_script'];
93-
}
91+
// Custom caches, et cetera?
92+
if (isset($txpcfg['pre_publish_script'])) {
93+
require $txpcfg['pre_publish_script'];
94+
}
9495

95-
include txpath.'/publish.php';
96-
textpattern();
96+
include txpath.'/publish.php';
97+
textpattern();

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL