[SASHA-Code] SF.net SVN: sasha:[77] trunk/SASHA
Brought to you by:
gphemsley
|
From: <gph...@us...> - 2010-01-04 23:28:32
|
Revision: 77
http://sasha.svn.sourceforge.net/sasha/?rev=77&view=rev
Author: gphemsley
Date: 2010-01-04 23:28:21 +0000 (Mon, 04 Jan 2010)
Log Message:
-----------
Add global message for making announcements on every page.
Add 'system' message type, for system-wide messages. (They're blue.)
Add checks to ensure that date ranges are correct (e.g. start date comes before end date, etc.).
Fix long-standing bug(s) in DBAL that prevented properly freeing query results.
Remove "feature" from DBAL that allowed multiple queries to be passed to $Database::query() in one string.
Properly free all SELECT query results. (May improve page-load times.)
Require all files in inc/ (as opposed to just including them).
Ensure header and footer are only called within actual pages (with ROOT defined and inc.main.php loaded).
Include SQL schema for registration date, added in r76.
Modified Paths:
--------------
trunk/SASHA/assignments.php
trunk/SASHA/config/config.default.php
trunk/SASHA/inc/database/database.mysql.php
trunk/SASHA/inc/inc.main.php
trunk/SASHA/inc/inc.misc.php
trunk/SASHA/inc/lib/lib.assignments.php
trunk/SASHA/inc/lib/lib.base.php
trunk/SASHA/inc/lib/lib.forms.php
trunk/SASHA/inc/lib/lib.home.php
trunk/SASHA/inc/lib/lib.schedule.php
trunk/SASHA/inc/lib/lib.sessions.php
trunk/SASHA/inc/lib/lib.tests.php
trunk/SASHA/inc/lib/lib.user.php
trunk/SASHA/index.php
trunk/SASHA/install/index.php
trunk/SASHA/install/schema/mysql.sql
trunk/SASHA/login.php
trunk/SASHA/register.php
trunk/SASHA/schedule.php
trunk/SASHA/style/default/footer.php
trunk/SASHA/style/default/header.php
trunk/SASHA/style/default/screen.css
trunk/SASHA/tests.php
Modified: trunk/SASHA/assignments.php
===================================================================
--- trunk/SASHA/assignments.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/assignments.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -23,7 +23,7 @@
$page_title = 'Assignments';
$tab = 'assignments';
-include( ROOT . 'inc/inc.main.php' );
+require( ROOT . 'inc/inc.main.php' );
$mode = ( exists( $_REQUEST['mode'] ) ) ? (string) $_REQUEST['mode'] : 'view';
@@ -54,7 +54,7 @@
/**
* Output current user's assignments.
*/
-include( ROOT . 'inc/lib/lib.assignments.php' );
+require( ROOT . 'inc/lib/lib.assignments.php' );
$SASHA = new Assignments();
Modified: trunk/SASHA/config/config.default.php
===================================================================
--- trunk/SASHA/config/config.default.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/config/config.default.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -36,6 +36,13 @@
$config['default_institution'] = 'uvm';
/**
+ * Global message, displayed on every page.
+ */
+$config['message']['type'] = '';
+$config['message']['title'] = '';
+$config['message']['message'] = '';
+
+/**
* Version information.
*/
Modified: trunk/SASHA/inc/database/database.mysql.php
===================================================================
--- trunk/SASHA/inc/database/database.mysql.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/database/database.mysql.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -6,7 +6,7 @@
* Functions to use when manipulating a MySQL database.
*
* @package DBAL
- * @copyright (C) 2003-2007 CMSformE, 2006-2009 SASHA
+ * @copyright (C) 2003-2007 CMSformE, 2006-2010 Gordon P. Hemsley
* @license docs/LICENSE BSD License
* @version $Id$
*/
@@ -32,8 +32,10 @@
*/
class Database
{
- var $ident_link, $connected, $result;
+ var $ident_link, $connected;
var $query_count = 0;
+ var $results = array();
+ var $free_count = 0;
var $errors = array();
/**
@@ -48,13 +50,32 @@
$this->username = $username;
$this->password = $password;
$this->database = $database;
-
+
$this->connect();
$this->query( 'SET NAMES utf8' );
}
/**
+ * Database::__destruct()
+ *
+ * Ensure loose ends are tied up.
+ */
+ function __destruct()
+ {
+ if( count( $this->results ) != $this->free_count )
+ {
+ print 'WARNING: NOT ALL RESULTS HAVE BEEN FREED!' . "\n";
+ print 'RESULTS RETURNED: ' . count( $this->results ) . '; RESULTS FREED: ' . $this->free_count . "\n";
+ }
+
+ if( $this->connected )
+ {
+ $this->disconnect();
+ }
+ }
+
+ /**
* Database::verbose_name()
*
* Get verbose name of database
@@ -103,6 +124,8 @@
$this->ident_link = NULL;
}
+ $this->connected = FALSE;
+
return TRUE;
}
@@ -132,20 +155,15 @@
{
foreach( $query as $single_query )
{
- $more_queries = explode( ";\n", $single_query );
-
- foreach( $more_queries as $another_single_query )
- {
- $queries[] = $another_single_query;
- }
+ $queries[] = $single_query;
}
}
else
{
- $queries = explode( ";\n", $query );
+ $queries = array( $query );
}
- $this->result = ( count( $queries ) > 1 ) ? array() : NULL;
+ $results = array();
foreach( $queries as $query )
{
@@ -153,25 +171,23 @@
{
$result = $db->query( $query );
- if( count( $queries ) > 1 )
- {
- $this->result[] = $result;
- }
- else
- {
- $this->result = $result;
- }
+ $this->query_count++;
if( !$result )
{
$this->error();
}
- $this->query_count++;
+ $results[$this->query_count] = $result;
+
+ if( !is_bool( $result ) )
+ {
+ $this->results[$this->query_count] = $result;
+ }
}
}
- return $this->result;
+ return ( ( count( $results ) > 1 ) ? $results : $results[$this->query_count] );
}
}
@@ -267,9 +283,11 @@
*
* Free up memory
*/
- function free_result()
+ function free_result( $result )
{
- return mysqli_free_result( $this->result );
+ $this->free_count++;
+
+ return mysqli_free_result( $result );
}
/**
Modified: trunk/SASHA/inc/inc.main.php
===================================================================
--- trunk/SASHA/inc/inc.main.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/inc.main.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -46,7 +46,7 @@
// Who is this user, anyway?
$User = new User( $Sessions->get_user() );
-include( ROOT . 'inc/lib/lib.base.php' );
+require( ROOT . 'inc/lib/lib.base.php' );
// If user is not logged in, override page and display login form.
// Just make sure that they're not already trying to log in.
Modified: trunk/SASHA/inc/inc.misc.php
===================================================================
--- trunk/SASHA/inc/inc.misc.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/inc.misc.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -60,6 +60,10 @@
$type_class = ' bad';
break;
+ case 'system':
+ $type_class = ' system';
+ break;
+
case NULL:
default:
$type_class = '';
Modified: trunk/SASHA/inc/lib/lib.assignments.php
===================================================================
--- trunk/SASHA/inc/lib/lib.assignments.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/lib/lib.assignments.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -47,6 +47,10 @@
{
print_message( 'bad', 'Assignment must have a valid, non-empty name.', 'Addition failed.' );
}
+ elseif( $due_date < $assigned_date )
+ {
+ print_message( 'bad', 'Due date cannot be before assigned date.', 'Addition failed.' );
+ }
else
{
$sql = "INSERT INTO assignments ( schedule_id, assignment_name, description, assigned_date, due_date )
@@ -139,6 +143,10 @@
{
print_message( 'bad', 'Assignment must have a valid, non-empty name.', 'Update failed.' );
}
+ elseif( $due_date < $assigned_date )
+ {
+ print_message( 'bad', 'Due date cannot be before assigned date.', 'Update failed.' );
+ }
else
{
$sql = "UPDATE assignments
@@ -172,6 +180,7 @@
$result = $Database->query( $sql );
$assignment = $Database->fetch_assoc( $result );
+ $Database->free_result( $result );
print "\t" . '<h2>Edit Assignment</h2>' . "\n";
@@ -390,6 +399,8 @@
);
}
+ $Database->free_result( $result );
+
$this->print_list_table( ROOT . 'assignments.php', $columns, $headers, $rows );
}
}
Modified: trunk/SASHA/inc/lib/lib.base.php
===================================================================
--- trunk/SASHA/inc/lib/lib.base.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/lib/lib.base.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -377,8 +377,10 @@
AND course = '$course'";
$result = $Database->query( $sql );
+ $course = $Database->fetch_assoc( $result );
+ $Database->free_result( $result );
- if( $course = $Database->fetch_assoc( $result ) )
+ if( $course )
{
return $course['course_title'];
}
@@ -492,6 +494,7 @@
$result = $Database->query( $sql );
$instructor = $Database->fetch_assoc( $result );
+ $Database->free_result( $result );
$instructors[$id] = @$instructor['instructor_key'];
}
@@ -791,6 +794,7 @@
$result = $Database->query( $sql );
$names = $Database->fetch_assoc( $result );
+ $Database->free_result( $result );
return ( ( $names['short_name'] && !$full ) ? $names['short_name'] : $names['name'] );
}
@@ -899,6 +903,8 @@
}
}
}
+
+ $Database->free_result( $result );
}
else
{
@@ -950,6 +956,8 @@
$course = substr( $course, -$course_max_length, $course_max_length );
}
+ $Database->free_result( $result );
+
if( $glue === FALSE )
{
return array(
Modified: trunk/SASHA/inc/lib/lib.forms.php
===================================================================
--- trunk/SASHA/inc/lib/lib.forms.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/lib/lib.forms.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -425,6 +425,8 @@
print "\t\t\t\t" . '</select></li>' . "\n";
}
+ $Database->free_result( $result );
+
print "\t\t\t" . '</ol>' . "\n";
}
@@ -540,6 +542,8 @@
print "\t\t\t" . '<option value="' . $row['institution'] . '"' . $selected . '>' . $row['country'] . ' — ' . $row['subdivision'] . ' — ' . $row['name'] . '</option>' . "\n";
}
+ $Database->free_result( $result );
+
print "\t\t" . '</select>' . "\n";
}
@@ -640,6 +644,8 @@
print "\t\t\t\t" . '<option value="' . $row['schedule_id'] . '"' . $selected . '>' . $SASHA->format_institution( $row['institution'] ) . ' — ' . $SASHA->format_course( $row['subject'], $row['course'], $row['institution'] ) . ' (' . $row['section'] . ') — ' . $SASHA->format_instructors( $row['instructors'], '; ' ) . ' (' . $SASHA->format_schedule_type( $row['schedule_type'] ) . ': ' . $SASHA->format_days( $row['days'], 'binary', 'html' ) . ')</option>' . "\n";
}
+ $Database->free_result( $result );
+
print "\t\t\t" . '</select>' . "\n";
}
Modified: trunk/SASHA/inc/lib/lib.home.php
===================================================================
--- trunk/SASHA/inc/lib/lib.home.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/lib/lib.home.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -84,6 +84,8 @@
print "\t</ul>\n";
print "\n";
}
+
+ $Database->free_result( $result );
}
/**
@@ -169,6 +171,8 @@
print "\t</ul>\n";
print "\n";
}
+
+ $Database->free_result( $result );
}
}
Modified: trunk/SASHA/inc/lib/lib.schedule.php
===================================================================
--- trunk/SASHA/inc/lib/lib.schedule.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/lib/lib.schedule.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -396,6 +396,7 @@
$result = $Database->query( $sql );
$schedule = $Database->fetch_assoc( $result );
+ $Database->free_result( $result );
$course = $this->format_course( $schedule['subject'], $schedule['course'], $institution, FALSE );
@@ -825,6 +826,8 @@
);
}
+ $Database->free_result( $result );
+
$this->print_list_table( ROOT . 'schedule.php', $columns, $headers, $rows );
}
}
Modified: trunk/SASHA/inc/lib/lib.sessions.php
===================================================================
--- trunk/SASHA/inc/lib/lib.sessions.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/lib/lib.sessions.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -75,6 +75,8 @@
if( !$Database->has_result( $result ) )
{
+ $Database->free_result( $result );
+
return FALSE;
}
@@ -86,6 +88,8 @@
$hash_pieces[1 - $first] = rand();
}
+ $Database->free_result( $result );
+
return sha1( implode( $hash_pieces ) );
}
@@ -232,6 +236,8 @@
$this->user_id = USER_ANONYMOUS;
$this->logged_in = FALSE;
+ $Database->free_result( $result );
+
return $this->create_session();
}
@@ -241,6 +247,8 @@
$this->logged_in = ( $row['user_id'] > USER_ANONYMOUS ) ? TRUE : FALSE;
}
+ $Database->free_result( $result );
+
return $session_hash;
}
@@ -329,6 +337,8 @@
if( !$Database->has_result( $result ) )
{
+ $Database->free_result( $result );
+
return FALSE;
}
@@ -345,6 +355,8 @@
}
}
+ $Database->free_result( $result );
+
return $this->logged_in;
}
Modified: trunk/SASHA/inc/lib/lib.tests.php
===================================================================
--- trunk/SASHA/inc/lib/lib.tests.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/lib/lib.tests.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -43,8 +43,12 @@
$start_date = mktime( (int) $start_date_time['hour'], (int) $start_date_time['minute'], 0, (int) $_POST['start_date']['month'], (int) $_POST['start_date']['day'], (int) $_POST['start_date']['year'] );
$end_date = mktime( (int) $end_date_time['hour'], (int) $end_date_time['minute'], 0, (int) $_POST['end_date']['month'], (int) $_POST['end_date']['day'], (int) $_POST['end_date']['year'] );
- if( $test_name )
+ if( $end_date <= $start_date )
{
+ print_message( 'bad', 'End date must come after start date.', 'Addition failed.' );
+ }
+ elseif( $test_name )
+ {
$sql = "INSERT INTO tests ( user_id, schedule_id, test_type, test_name, description, start_date, end_date )
VALUES ( {$User->user_info['id']}, $schedule_id, $test_type, '$test_name', '$description', $start_date, $end_date )";
@@ -143,8 +147,12 @@
$score = ( $possible_score ) ? ( ( ( $received_score ) ? ', received_score = ' . $received_score : '' ) . ', possible_score = ' . $possible_score ) : '';
- if( $test_name )
+ if( $end_date <= $start_date )
{
+ print_message( 'bad', 'End date must come after start date.', 'Update failed.' );
+ }
+ elseif( $test_name )
+ {
$sql = "UPDATE tests
SET schedule_id = $schedule_id, test_type = $test_type, test_name = '$test_name', description = '$description', start_date = $start_date, end_date = $end_date
$score
@@ -181,6 +189,7 @@
$result = $Database->query( $sql );
$test = $Database->fetch_assoc( $result );
+ $Database->free_result( $result );
print "\t" . '<h2>Edit Test</h2>' . "\n";
@@ -429,6 +438,8 @@
);
}
+ $Database->free_result( $result );
+
$this->print_list_table( ROOT . 'tests.php', $columns, $headers, $rows );
}
}
Modified: trunk/SASHA/inc/lib/lib.user.php
===================================================================
--- trunk/SASHA/inc/lib/lib.user.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/inc/lib/lib.user.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -71,6 +71,8 @@
}
}
+ $Database->free_result( $result );
+
return $this->user_info;
}
@@ -93,6 +95,7 @@
$result = $Database->query( $sql );
$username = $Database->fetch_assoc( $result );
+ $Database->free_result( $result );
if( !empty( $username ) )
{
@@ -165,6 +168,7 @@
$result = $Database->query( $sql );
$email_address = $Database->fetch_assoc( $result );
+ $Database->free_result( $result );
if( !empty( $email_address ) )
{
Modified: trunk/SASHA/index.php
===================================================================
--- trunk/SASHA/index.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/index.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -23,14 +23,14 @@
$page_title = 'Index';
$tab = 'home';
-include( ROOT . 'inc/inc.main.php' );
+require( ROOT . 'inc/inc.main.php' );
/**
* Include the style header, required for proper page output.
*/
include( ROOT . 'style/default/header.php' );
-include( ROOT . 'inc/lib/lib.home.php' );
+require( ROOT . 'inc/lib/lib.home.php' );
$SASHA = new Home();
@@ -82,7 +82,7 @@
/**
* Output this month's calendar by default.
*/
-include( ROOT . 'inc/lib/lib.calendar.php' );
+require( ROOT . 'inc/lib/lib.calendar.php' );
$Calendar = new Calendar_Monthly( date( 'Y' ), date( 'n' ), date( 'j' ) );
Modified: trunk/SASHA/install/index.php
===================================================================
--- trunk/SASHA/install/index.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/install/index.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -15,7 +15,7 @@
header( 'Content-Type: text/html; charset=UTF-8' );
-include( ROOT . 'inc/inc.main.php' );
+require( ROOT . 'inc/inc.main.php' );
// Number of steps in installation
$steps = 10;
Modified: trunk/SASHA/install/schema/mysql.sql
===================================================================
--- trunk/SASHA/install/schema/mysql.sql 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/install/schema/mysql.sql 2010-01-04 23:28:21 UTC (rev 77)
@@ -180,6 +180,7 @@
full_name tinytext NOT NULL,
preferred_name tinytext NOT NULL,
default_institution varchar(63) NOT NULL,
+ registration_date int(10) unsigned zerofill NOT NULL,
user_type int(11) NOT NULL,
PRIMARY KEY (user_id),
UNIQUE KEY username (username),
Modified: trunk/SASHA/login.php
===================================================================
--- trunk/SASHA/login.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/login.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -24,7 +24,7 @@
$page_title = 'Login';
$tab = 'login';
-include( ROOT . 'inc/inc.main.php' );
+require( ROOT . 'inc/inc.main.php' );
/**
* Include the style header, required for proper page output.
Modified: trunk/SASHA/register.php
===================================================================
--- trunk/SASHA/register.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/register.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -24,7 +24,7 @@
$page_title = 'Register';
$tab = 'register';
-include( ROOT . 'inc/inc.main.php' );
+require( ROOT . 'inc/inc.main.php' );
/**
* Include the style header, required for proper page output.
Modified: trunk/SASHA/schedule.php
===================================================================
--- trunk/SASHA/schedule.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/schedule.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -23,7 +23,7 @@
$page_title = 'Schedule';
$tab = 'schedule';
-include( ROOT . 'inc/inc.main.php' );
+require( ROOT . 'inc/inc.main.php' );
$mode = ( exists( $_REQUEST['mode'] ) ) ? $_REQUEST['mode'] : 'view';
@@ -54,7 +54,7 @@
/**
* Output current user's schedule.
*/
-include( ROOT . 'inc/lib/lib.schedule.php' );
+require( ROOT . 'inc/lib/lib.schedule.php' );
$SASHA = new Schedule();
Modified: trunk/SASHA/style/default/footer.php
===================================================================
--- trunk/SASHA/style/default/footer.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/style/default/footer.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -6,18 +6,24 @@
* This is the style footer for all pages.
*
* @package SASHA
- * @copyright (C) 2006-2009 Gordon P. Hemsley
+ * @copyright (C) 2006-2010 Gordon P. Hemsley
* @license docs/LICENSE BSD License
* @version $Id$
*/
+if( !defined( 'ROOT' ) )
+{
+ exit;
+}
+
+@require_once( ROOT . 'inc/inc.main.php' );
+
?>
-
</div>
<div id="copyright">
<p><a href="http://sasha.sourceforge.net/">Student Assignment, Scheduling, and Homework Assistant</a></p>
- <p>Copyright © 2006–2009 <a href="mailto:gph...@us...">Gordon P. Hemsley</a></p>
+ <p>Copyright © 2006–2010 <a href="mailto:gph...@us...">Gordon P. Hemsley</a></p>
</div>
<div id="debug">
Modified: trunk/SASHA/style/default/header.php
===================================================================
--- trunk/SASHA/style/default/header.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/style/default/header.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -11,6 +11,13 @@
* @version $Id$
*/
+if( !defined( 'ROOT' ) )
+{
+ exit;
+}
+
+@require_once( ROOT . 'inc/inc.main.php' );
+
header( 'Content-Type: text/html; charset=UTF-8' );
if( !isset( $tab ) )
@@ -95,4 +102,14 @@
</ul>
</div>
+<?php
+
+if( !empty( $config['message']['message'] ) )
+{
+ print '<div id="global-msg">' . "\n";
+ print_message( $config['message']['type'], $config['message']['message'], $config['message']['title'] );
+ print '</div>' . "\n\n";
+}
+
+?>
<div id="page-content">
Modified: trunk/SASHA/style/default/screen.css
===================================================================
--- trunk/SASHA/style/default/screen.css 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/style/default/screen.css 2010-01-04 23:28:21 UTC (rev 77)
@@ -113,6 +113,12 @@
border: 1px solid red;
}
+p.message.system {
+ background-color: #C0CBFF; /* blue counterpart of pink */
+ color: black;
+ border: 1px solid blue;
+}
+
p.message.good strong {
background-color: transparent;
color: darkgreen;
@@ -123,6 +129,11 @@
color: darkred;
}
+p.message.system strong {
+ background-color: transparent;
+ color: darkblue;
+}
+
table {
padding: 0px;
border: 1px solid black;
@@ -254,7 +265,7 @@
color: white;
}
-#page-content {
+#global-msg, #page-content {
width: 96%;
margin: 0% auto;
}
@@ -270,6 +281,10 @@
padding: 0.5em 0em 1em;
}
+#global-msg + #page-content > #sub-nav {
+ margin-top: -1em;
+}
+
#sub-nav ul {
margin: 1em auto;
padding: 0em;
Modified: trunk/SASHA/tests.php
===================================================================
--- trunk/SASHA/tests.php 2009-12-30 22:48:00 UTC (rev 76)
+++ trunk/SASHA/tests.php 2010-01-04 23:28:21 UTC (rev 77)
@@ -23,7 +23,7 @@
$page_title = 'Tests';
$tab = 'tests';
-include( ROOT . 'inc/inc.main.php' );
+require( ROOT . 'inc/inc.main.php' );
$mode = ( exists( $_REQUEST['mode'] ) ) ? $_REQUEST['mode'] : 'view';
@@ -54,7 +54,7 @@
/**
* Output current user's tests.
*/
-include( ROOT . 'inc/lib/lib.tests.php' );
+require( ROOT . 'inc/lib/lib.tests.php' );
$SASHA = new Tests();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|