Commit e450de8cd0
Unsigned
Layout: unified · split
index.php +3 −3
| @@ -5,9 +5,9 @@ $path = ltrim($_SERVER['REQUEST_URI'], '/'); | |||
| 5 | $elements = explode('/', $path); | 5 | $elements = explode('/', $path); |
| 6 | 6 | ||
| 7 | if (empty($elements[0])) { | 7 | if (empty($elements[0])) { |
| 8 | get_stories( | 8 | $html_output = get_stories( |
| 9 | 'https://hacker-news.firebaseio.com/v0/topstories.json?limitToFirst=30&orderBy="$key"', | 9 | 'https://hacker-news.firebaseio.com/v0/topstories.json?limitToFirst=30&orderBy="$key"', |
| 10 | 'Top' | 10 | 'Top' |
| 11 | ); | 11 | ); |
| 12 | echo_html( | 12 | echo_html( |
| 13 | $GLOBALS['full_domain'] . '/best/', | 13 | $GLOBALS['full_domain'] . '/best/', |
| @@ -18,7 +18,7 @@ if (empty($elements[0])) { | |||
| 18 | } else { | 18 | } else { |
| 19 | switch (array_shift($elements)) { | 19 | switch (array_shift($elements)) { |
| 20 | case 'top': | 20 | case 'top': |
| 21 | get_stories( | 21 | $html_output = get_stories( |
| 22 | 'https://hacker-news.firebaseio.com/v0/topstories.json?limitToFirst=30&orderBy="$key"', | 22 | 'https://hacker-news.firebaseio.com/v0/topstories.json?limitToFirst=30&orderBy="$key"', |
| 23 | 'Top' | 23 | 'Top' |
| 24 | ); | 24 | ); |