Przeglądaj źródła

Some hidden remaining ?>

Signed-off-by: Jeremy D <[email protected]>
Jeremy D 12 lat temu
rodzic
commit
a2f83529dd
3 zmienionych plików z 1 dodań i 16 usunięć
  1. 1 1
      Sources/Load.php
  2. 0 4
      other/install.php
  3. 0 11
      other/upgrade.php

+ 1 - 1
Sources/Load.php

@@ -2702,7 +2702,7 @@ function cache_put_data($key, $value, $ttl = 120)
 				@unlink($cachedir . '/data_' . $key . '.php');
 			else
 			{
-				$cache_data = '<' . '?' . 'php if (!defined(\'SMF\')) die; if (' . (time() + $ttl) . ' < time()) $expired = true; else{$expired = false; $value = \'' . addcslashes($value, '\\\'') . '\';}' . '?' . '>';
+				$cache_data = '<' . '?' . 'php if (!defined(\'SMF\')) die; if (' . (time() + $ttl) . ' < time()) $expired = true; else{$expired = false; $value = \'' . addcslashes($value, '\\\'') . '\';}';
 
 				// Write out the cache file, check that the cache write was successful; all the data must be written
 				// If it fails due to low diskspace, or other, remove the cache file

+ 0 - 4
other/install.php

@@ -1911,9 +1911,6 @@ function updateSettingsFile($vars)
 			continue;
 		}
 
-		if (trim($settingsArray[$i]) == '?' . '>')
-			$settingsArray[$i] = '';
-
 		// Don't trim or bother with it if it's not a variable.
 		if (substr($settingsArray[$i], 0, 1) != '$')
 			continue;
@@ -1956,7 +1953,6 @@ function updateSettingsFile($vars)
 		if ($settingsArray[$i] != '' || @$settingsArray[$i - 1] != '')
 			fwrite($fp, strtr($settingsArray[$i], "\r", ''));
 	}
-	fwrite($fp, $settingsArray[$i] . '?' . '>');
 	fclose($fp);
 
 	return true;

+ 0 - 11
other/upgrade.php

@@ -2135,17 +2135,8 @@ function changeSettings($config_vars)
 				}
 			}
 		}
-		if (isset($settingsArray[$i]))
-		{
-			if (trim(substr($settingsArray[$i], 0, 2)) == '?' . '>')
-				$end = $i;
-		}
 	}
 
-	// Assume end-of-file if the end wasn't found.
-	if (empty($end) || $end < 10)
-		$end = count($settingsArray);
-
 	if (!empty($config_vars))
 	{
 		$settingsArray[$end++] = '';
@@ -2155,8 +2146,6 @@ function changeSettings($config_vars)
 				$settingsArray[$end++] = '$' . $var . ' = ' . $val . ';' . "\n";
 		}
 	}
-	// This should be the last line and even last bytes of the file.
-	$settingsArray[$end] = '?' . '>';
 
 	// Blank out the file - done to fix a oddity with some servers.
 	$fp = fopen($boarddir . '/Settings.php', 'w');