コード例 #1
0
ファイル: index.php プロジェクト: hukumonline/yii
            }
            if ($resEntry[0] == 0) {
                $ok = FALSE;
                echo "Error (" . $tag . ") : " . $resEntry[1] . "\n";
            }
        }
        if ($ok) {
            echo 'OOOKKK';
        }
        exit;
    }
    $t = new SimpleSAML_XHTML_Template($config, 'ldapstatus:ldapsinglehost.php');
    $t->data['res'] = $res;
    $t->data['cli'] = $tester->getCLI();
    $t->data['org'] = $orgs[$_REQUEST['orgtest']];
    $t->data['debugLog'] = SimpleSAML_Logger::getCapturedLog();
    if ($isAdmin) {
        $t->data['secretURL'] = $secretURL;
    }
    $t->show();
    exit;
}
function mergeWithTemplate($location, $template)
{
    foreach ($template as $key => $value) {
        if (!array_key_exists($key, $location)) {
            $location[$key] = $value;
        }
    }
    return $location;
}
コード例 #2
0
ファイル: fetch.php プロジェクト: PitcherAG/simplesamlphp
                $source['blacklist'] = $blacklist;
            }
            # Merge global and src specific whitelists
            if (isset($source['whitelist'])) {
                $source['whitelist'] = array_unique(array_merge($source['whitelist'], $whitelist));
            } else {
                $source['whitelist'] = $whitelist;
            }
            SimpleSAML_Logger::debug('[metarefresh]: In set [' . $setkey . '] loading source [' . $source['src'] . ']');
            $metaloader->loadSource($source);
        }
        $outputDir = $set->getString('outputDir');
        $outputDir = $config->resolvePath($outputDir);
        $outputFormat = $set->getValueValidate('outputFormat', array('flatfile', 'serialize'), 'flatfile');
        switch ($outputFormat) {
            case 'flatfile':
                $metaloader->writeMetadataFiles($outputDir);
                break;
            case 'serialize':
                $metaloader->writeMetadataSerialize($outputDir);
                break;
        }
    } catch (Exception $e) {
        $e = SimpleSAML_Error_Exception::fromException($e);
        $e->logWarning();
    }
}
$logentries = SimpleSAML_Logger::getCapturedLog();
$t = new SimpleSAML_XHTML_Template($config, 'metarefresh:fetch.tpl.php');
$t->data['logentries'] = $logentries;
$t->show();