Skip to content

Commit

Permalink
4988: Fixed the broken pretty url with subsites when course name opti…
Browse files Browse the repository at this point in the history
…on is turned on in admin system preference page and defined in course property page.
  • Loading branch information
cindyli committed Jul 26, 2012
1 parent 602d6e9 commit a0f6bb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion go.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@

$_user_location = 'public'; //like browse, and registration, doesn't need username/passwords to get into

include_once(AT_INCLUDE_PATH . 'lib/vital_funcs.inc.php');
define('AT_SITE_PATH', get_site_path());

require_once(AT_INCLUDE_PATH . 'classes/UrlRewrite/UrlParser.class.php');
include_once(AT_INCLUDE_PATH.'config.inc.php');
include_once(AT_SITE_PATH.'include/config.inc.php');
require_once(AT_INCLUDE_PATH.'lib/constants.inc.php');
require_once(AT_INCLUDE_PATH.'lib/mysql_connect.inc.php');
//require_once(AT_INCLUDE_PATH.'vitals.inc.php');
Expand Down
2 changes: 1 addition & 1 deletion include/classes/UrlRewrite/UrlParser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function parsePathinfo($pathinfo){
//check if this is a course slug or course id.
if (preg_match('/^[\d]+$/', $matches[1])==0){
//it's a course slug, log into the course.
$sql = "SELECT course_id FROM ".TABLE_PREFIX."courses WHERE course_dir_name='$matches[1]'";
$sql = "SELECT course_id FROM ".TABLE_PREFIX."courses WHERE course_dir_name='$matches[1]'";
$result = mysql_query($sql, $db);
$row = mysql_fetch_assoc($result);
if ($row['course_id']!=''){
Expand Down

0 comments on commit a0f6bb2

Please sign in to comment.