Skip to content

Commit

Permalink
Fix var names
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Apr 22, 2010
1 parent d047583 commit 53c683f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions action.php
Expand Up @@ -69,22 +69,22 @@ function handle_action_act_preprocess(&$event, $param) {

// Get additional user data from auth backend.
global $USERINFO;
$data = $USERINFO;
$auth_replaces = $USERINFO;
foreach(array('grps', 'pass', // Secret data
'name', 'mail' // Already replaced by parsePageTemplate
) as $hidden) {
if (isset($data[$hidden])) {
unset($data[$hidden]);
if (isset($auth_replaces[$hidden])) {
unset($auth_replaces[$hidden]);
}
}

// Parse templates and write pages.
foreach ($pages as $name => &$content) {
if (!$parsed) {
$data = array('tpl' => $content, 'id' => $name);
$content = parsePageTemplate($data);
$byref_data = array('tpl' => $content, 'id' => $name);
$content = parsePageTemplate($byref_data);
}
foreach($data as $k => $v) {
foreach($auth_replaces as $k => $v) {
$content = str_replace('@' . strtoupper($k) . '@', $v, $content);
}

Expand Down

0 comments on commit 53c683f

Please sign in to comment.