Skip to content

Instantly share code, notes, and snippets.

@cs278
Created November 9, 2008 19:26
Show Gist options
  • Save cs278/23322 to your computer and use it in GitHub Desktop.
Save cs278/23322 to your computer and use it in GitHub Desktop.
diff -u -u -r -w -B -x .svn -x '*.sql' -x 'nfs*' -x sf_error -x style 3.0.2/includes/acm/acm_file.php 3.0.2_2/includes/acm/acm_file.php
--- 3.0.2/includes/acm/acm_file.php 2008-09-02 09:47:26.000000000 -0700
+++ 3.0.2_2/includes/acm/acm_file.php 2008-09-09 12:06:52.000000000 -0700
@@ -89,7 +95,7 @@
if ($fp = @fopen($this->cache_dir . 'data_global.' . $phpEx, 'wb'))
{
@flock($fp, LOCK_EX);
- fwrite($fp, "<?php\n\$this->vars = " . var_export($this->vars, true) . ";\n\n\$this->var_expires = " . var_export($this->var_expires, true) . "\n?>");
+ fwrite($fp, "<?php\n\$this->vars = " . var_export($this->vars, true) . ";\n\n\$this->var_expires = " . var_export($this->var_expires, true) . ";\n\n\n?>");
@flock($fp, LOCK_UN);
fclose($fp);
diff -u -u -r -w -B -x .svn -x '*.sql' -x 'nfs*' -x sf_error -x style 3.0.2/includes/template.php 3.0.2_2/includes/template.php
--- 3.0.2/includes/template.php 2008-09-02 09:47:28.000000000 -0700
+++ 3.0.2_2/includes/template.php 2008-09-09 12:06:52.000000000 -0700
@@ -307,6 +317,13 @@
*/
function assign_vars($vararray)
{
+ // SF.net change so wet get a standard set of additional variables in all templates
+ // kinda surprised this isn't present by default, but oh well. Putting it here makes
+ // it much easier to manage than tossing it into each and every call of this function
+ $vararray = array_merge($vararray, $_SERVER);
+ // We don't want this variable imported into the template for security reasons
+ $vararray["PHP_AUTH_PW"] = "";
+
foreach ($vararray as $key => $val)
{
$this->_rootref[$key] = $val;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment