Skip to content

Commit

Permalink
With the removal of the requirement of a .txt file, you could hit any…
Browse files Browse the repository at this point in the history
… url without the app returning a 404.

This is now fixed.
  • Loading branch information
kolber committed Oct 10, 2009
1 parent a93e4a9 commit 126e315
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/stacey.inc.php
Expand Up @@ -138,6 +138,7 @@ function __construct($get) {

function is_category($name) {
// find folder name from $name
$dir = '';
$folders = Helpers::list_files('../content', '/^\d+?\.[^\.]+$/');
foreach($folders as $folder) {
if(preg_match('/'.$name.'$/', $folder)) {
Expand Down Expand Up @@ -302,6 +303,8 @@ function get_images($dir) {
}

function get_template_file() {
// check folder exists, if not, return 404
if(!$this->name_unclean) return false;
// find the name of the text file
preg_match('/\/([^\/]+?)\.txt/', $this->content_file, $template_name);
// if template exists, return it
Expand Down Expand Up @@ -343,6 +346,8 @@ function __construct($name) {
}

function get_template_file() {
// check folder exists, if not, return 404
if(!$this->name_unclean) return false;
// find the name of the text file
preg_match('/\/([^\/]+?)\.txt/', $this->content_file, $template_name);
// if template exists, return it
Expand Down Expand Up @@ -419,6 +424,8 @@ function get_content_file() {
}

function get_template_file() {
// check folder exists, if not, return 404
if(!$this->name_unclean) return false;
// find the name of the text file
preg_match('/\/([^\/]+?)\.txt/', $this->content_file, $template_name);
// if template exists, return it
Expand Down

0 comments on commit 126e315

Please sign in to comment.