http://www.atutor.ca/atutor/mantis/view.php?id=2611
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Tue, 4 Jul 2006 16:38:58 +0000 (16:38 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Tue, 4 Jul 2006 16:38:58 +0000 (16:38 -0000)
docs/documentation/add_note.php
docs/documentation/approve_note.php
docs/documentation/common/vitals.inc.php
docs/documentation/delete_note.php
docs/documentation/index_list.php

index 2457fa0..0e8fdc9 100644 (file)
@@ -1,6 +1,5 @@
 <?php\r
 require(dirname(__FILE__) .'/common/vitals.inc.php');\r
-\r
 function my_add_null_slashes( $string ) {\r
     return ( $string );\r
 }\r
@@ -64,10 +63,6 @@ if (isset($_POST['submit'])) {
        }\r
 }\r
 \r
-if (!isset($_GET['p'])) {\r
-       $_GET['p'] = '';\r
-}\r
-\r
 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
 <html lang="en">\r
 <head>\r
@@ -82,7 +77,7 @@ div.input-form div.row {
 </head>\r
 <body>\r
 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
-<input type="hidden" name="section" value="<?php echo key($_GET); ?>" />\r
+<input type="hidden" name="section" value="<?php echo $section; ?>" />\r
 <input type="hidden" name="page" value="<?php echo htmlspecialchars($_GET['p']); ?>" />\r
 \r
 <div class="input-form">\r
index b63c611..255daae 100644 (file)
@@ -1,5 +1,5 @@
 <?php\r
-session_start();\r
+require(dirname(__FILE__) .'/common/vitals.inc.php');\r
 \r
 if (!isset($_SESSION['handbook_admin']) || !$_SESSION['handbook_admin'] || !isset($_GET['id'])) {\r
        exit;\r
index a901400..76fb79e 100644 (file)
@@ -94,7 +94,6 @@ function get_available_languages($section) {
 define('AT_HANDBOOK', true);\r
 session_name('ATutorID');\r
 session_start();\r
-session_write_close();\r
 // $lang is the language we've found to display\r
 // $req_lang is the language we're requesting\r
 \r
index d230ae1..0e271fe 100644 (file)
@@ -1,5 +1,5 @@
 <?php\r
-session_start();\r
+require(dirname(__FILE__) .'/common/vitals.inc.php');\r
 \r
 if (!isset($_SESSION['handbook_admin']) || !$_SESSION['handbook_admin'] || !isset($_GET['id'])) {\r
        exit;\r
@@ -54,7 +54,7 @@ if ($enable_user_notes) {
 }\r
 \r
 if (isset($_GET['p'])) {\r
-       header('Location: '.key($_GET). '/' . $_GET['p']);\r
+       header('Location: '.$section. '/' . $_GET['p']);\r
 } else {\r
        header('Location: index_list.php');\r
 }\r
index 6c2407e..4fd4198 100644 (file)
@@ -1,6 +1,4 @@
 <?php\r
-session_start();\r
-\r
 require(dirname(__FILE__) .'/common/vitals.inc.php');\r
 \r
 if($_GET['lang']){\r
@@ -106,7 +104,6 @@ if (!$db && defined('AT_HANDBOOK_ENABLE') && AT_HANDBOOK_ENABLE) {
        @mysql_select_db(AT_HANDBOOK_DB_DATABASE, $db);\r
        $enable_user_notes = true;\r
 }\r
-\r
 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
 <html lang="<?php if ($req_lang) { echo $req_lang; } else { echo 'dp'; } ?>">\r
 <head>\r
@@ -120,6 +117,7 @@ if (!$db && defined('AT_HANDBOOK_ENABLE') && AT_HANDBOOK_ENABLE) {
                <?php get_text('page_not_translated'); ?>\r
        </div>\r
 <?php endif; ?>\r
+\r
 <h1><?php get_text('doc_title'); ?></h1>\r
 <p><?php get_text('doc_welcome'); ?></p>\r
 \r