Esempio n. 1
0
 public static function routeRedirects()
 {
     if ($filename = static::findFileForRoute(Route::requestUri(), Conf::get('glueExtras/RouteTools/content/path'), array('url'))) {
         $file = fopen($filename, 'r');
         $firstline = trim(fgets($file));
         fclose($file);
         header('Location: ' . $firstline);
         Template:
         rawOutput();
     }
 }
Esempio n. 2
0
function bib_content()
{
    $pathToOsbib = DOKU_PLUGIN . 'bibtex/OSBib/';
    include_once $pathToOsbib . 'format/bibtexParse/PARSEENTRIES.php';
    include_once $pathToOsbib . 'format/BIBFORMAT.php';
    $data = parseBibFile($_REQUEST['file']);
    /* Get the bibtex entries into an associative array */
    $parse = new PARSEENTRIES();
    $parse->expandMacro = TRUE;
    $parse->fieldExtract = TRUE;
    $parse->removeDelimit = TRUE;
    $parse->loadBibtexString($data);
    $parse->extractEntries();
    list($preamble, $strings, $entries) = $parse->returnArrays();
    $ref = $_REQUEST['ref'];
    foreach ($entries as $entry) {
        if (trim($entry['bibtexCitation']) == $ref) {
            return rawOutput($entry);
        }
    }
}