stacks / stacks-website

The website for the Stacks project
http://stacks.math.columbia.edu
GNU General Public License v2.0
19 stars 12 forks source link

get_directory #2

Closed stacks closed 11 years ago

stacks commented 11 years ago

The function get_directory in config.php should now default to

return implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1));

as the lines

preg_match_all('/\\\ref{<a href=\"([\w\/]+)\">([\w-]+)<\/a>}/', $code, $references);
for ($i = 0; $i < count($references[0]); ++$i) {
    $code = str_replace($references[0][$i], "<a href='" . $references[1][$i] . "'>" . get_id(substr($references[1][$i], -4, 4)) . "</a>", $code);
}

in functions.php seems to rely on this.

pbelmans commented 11 years ago

This is addressed in 1268edfee54a888db0c5b68e38a784d81bddfa4e