Update of /cvsroot/stack/stack-dev/lib/ui
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv22042/lib/ui
Modified Files:
questionImporter.php
Log Message:
Fix notices generated by lib/ui/questionImporter.php.
Index: questionImporter.php
===================================================================
RCS file: /cvsroot/stack/stack-dev/lib/ui/questionImporter.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** questionImporter.php 30 Sep 2010 16:56:15 -0000 1.18
--- questionImporter.php 29 Nov 2010 17:43:18 -0000 1.19
***************
*** 35,39 ****
die($diemessage);
}
!
$root = $config->get('docroot');
--- 35,39 ----
die($diemessage);
}
! $sumbiturl = $url.'/lib/ui/questionImporter.php';
$root = $config->get('docroot');
***************
*** 43,46 ****
--- 43,47 ----
require_once $root.'/lib/translator.php';
+ $error = '';
if(!empty($_FILES['uploaded']))
{
***************
*** 66,70 ****
// not uploaded a file but has AiM text been entered?
! $entry = trim($_POST['entry']);
if(!empty($entry)) {
$converter = new AimConverter();
--- 67,78 ----
// not uploaded a file but has AiM text been entered?
! if (array_key_exists('entry', $_POST))
! {
! $entry = trim($_POST['entry']);
! }
! else
! {
! $entry = '';
! }
if(!empty($entry)) {
$converter = new AimConverter();
***************
*** 176,180 ****
?>
</p>
! <form action="<?php $PHP_SELF ?>" method="POST">
<p><textarea name="entry" cols="80" rows="20" /><?php echo get_magic_quotes_gpc() ? stripslashes($entry) : $entry; ?></textarea></p>
<p><input type="submit" value="<?php echo get_string('stackImport_button_submitAim','stack',''); ?>" />
--- 184,188 ----
?>
</p>
! <form action="<?php $sumbiturl ?>" method="post">
<p><textarea name="entry" cols="80" rows="20" /><?php echo get_magic_quotes_gpc() ? stripslashes($entry) : $entry; ?></textarea></p>
<p><input type="submit" value="<?php echo get_string('stackImport_button_submitAim','stack',''); ?>" />
***************
*** 186,193 ****
else
{
! if($_GET['src'] == 'aim') {
?>
<p><?php echo get_string('stackImport_Aim_description','stack',''); ?></p>
! <form action="<?php echo $PHP_SELF."?src=aim" ?>" method="POST">
<p><textarea name="entry" cols="80" rows="20" /></textarea></p>
<p><input type="submit" value="<?php echo get_string('stackImport_button_submitAim','stack',''); ?>" />
--- 194,201 ----
else
{
! if(array_key_exists('src', $_GET) && $_GET['src'] == 'aim') {
?>
<p><?php echo get_string('stackImport_Aim_description','stack',''); ?></p>
! <form action="<?php echo $sumbiturl."?src=aim" ?>" method="post">
<p><textarea name="entry" cols="80" rows="20" /></textarea></p>
<p><input type="submit" value="<?php echo get_string('stackImport_button_submitAim','stack',''); ?>" />
***************
*** 199,203 ****
?>
<p><?php echo get_string('stackImport_description','stack',''); ?></p>
! <form enctype="multipart/form-data" action="<?php echo $PHP_SELF ?>" method="POST">
<p><?php echo get_string('stackImport_fileSelect','stack',''); ?>
<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
--- 207,211 ----
?>
<p><?php echo get_string('stackImport_description','stack',''); ?></p>
! <form enctype="multipart/form-data" action="<?php echo $sumbiturl ?>" method="post">
<p><?php echo get_string('stackImport_fileSelect','stack',''); ?>
<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
|