Minor - format code.

1.9.x
Julio Montoya 12 years ago
parent 01313ac8ee
commit aa735666fb
  1. 18
      main/dropbox/dropbox_class.inc.php
  2. 183
      main/dropbox/dropbox_download.php
  3. 19
      main/dropbox/dropbox_functions.inc.php
  4. 24
      main/dropbox/dropbox_init.inc.php
  5. 100
      main/dropbox/dropbox_submit.php

@ -68,11 +68,11 @@ class Dropbox_Work
* @param unknown_type $arg6 * @param unknown_type $arg6
* @return Dropbox_Work * @return Dropbox_Work
*/ */
function Dropbox_Work($arg1, $arg2 = null, $arg3 = null, $arg4 = null, $arg5 = null, $arg6 = null) public function Dropbox_Work($arg1, $arg2 = null, $arg3 = null, $arg4 = null, $arg5 = null, $arg6 = null)
{ {
if (func_num_args() > 1) { if (func_num_args() > 1) {
$this->_createNewWork($arg1, $arg2, $arg3, $arg4, $arg5, $arg6); $this->_createNewWork($arg1, $arg2, $arg3, $arg4, $arg5, $arg6);
} else { } else {
$this->_createExistingWork($arg1); $this->_createExistingWork($arg1);
} }
} }
@ -80,17 +80,17 @@ class Dropbox_Work
/** /**
* private function creating a new work object * private function creating a new work object
* *
* @param unknown_type $uploader_id * @param int $uploader_id
* @param unknown_type $title * @param string $title
* @param unknown_type $description * @param string $description
* @param unknown_type $author * @param string $author
* @param unknown_type $filename * @param string $filename
* @param unknown_type $filesize * @param int $filesize
* *
* @todo $author was originally a field but this has now been replaced by the first and lastname of the uploader (to prevent anonymous uploads) * @todo $author was originally a field but this has now been replaced by the first and lastname of the uploader (to prevent anonymous uploads)
* As a consequence this parameter can be removed * As a consequence this parameter can be removed
*/ */
function _createNewWork($uploader_id, $title, $description, $author, $filename, $filesize) public function _createNewWork($uploader_id, $title, $description, $author, $filename, $filesize)
{ {
global $_user, $dropbox_cnf; global $_user, $dropbox_cnf;
// Fill in the properties // Fill in the properties

@ -6,10 +6,8 @@
/** /**
* Code * Code
*/ */
/* INIT SECTION */
// We cannot use dropbox_init.inc.php because this one already outputs data. // We cannot use dropbox_init.inc.php because this one already outputs data.
$language_file = 'dropbox'; $language_file = 'dropbox';
// including the basic Chamilo initialisation file // including the basic Chamilo initialisation file
@ -32,137 +30,126 @@ $course_id = api_get_course_int_id();
$user_id = api_get_user_id(); $user_id = api_get_user_id();
if (isset($_GET['cat_id']) AND is_numeric($_GET['cat_id']) AND $_GET['action'] == 'downloadcategory' AND isset($_GET['sent_received'])) { if (isset($_GET['cat_id']) AND is_numeric($_GET['cat_id']) AND $_GET['action'] == 'downloadcategory' AND isset($_GET['sent_received'])) {
// step 1: constructingd' the sql statement. Due to the nature off the classes of the dropbox the categories for sent files are stored in the table /** step 1: constructing the sql statement.
// dropbox_file while the categories for the received files are stored in dropbox_post. It would have been more elegant if these could be stored Due to the nature off the classes of the dropbox the categories for sent files are stored in the table
// in dropbox_person (which stores the link file-person) dropbox_file while the categories for the received files are stored in dropbox_post.
// Therefore we have to create to separate sql statements to find which files are in the categorie (depending if we zip-download a sent category or a It would have been more elegant if these could be stored in dropbox_person (which stores the link file-person)
// received category) Therefore we have to create to separate sql statements to find which files are in the category
(depending if we zip-download a sent category or a received category)*/
if ($_GET['sent_received'] == 'sent') {
// here we also incorporate the person table to make sure that deleted sent documents are not included. if ($_GET['sent_received'] == 'sent') {
$sql = "SELECT DISTINCT file.id, file.filename, file.title // here we also incorporate the person table to make sure that deleted sent documents are not included.
$sql = "SELECT DISTINCT file.id, file.filename, file.title
FROM ".$dropbox_cnf['tbl_file']." file INNER JOIN ".$dropbox_cnf['tbl_person']." person FROM ".$dropbox_cnf['tbl_file']." file INNER JOIN ".$dropbox_cnf['tbl_person']." person
ON (person.file_id=file.id AND file.c_id = $course_id AND person.c_id = $course_id) ON (person.file_id=file.id AND file.c_id = $course_id AND person.c_id = $course_id)
WHERE WHERE
file.uploader_id = $user_id AND file.uploader_id = $user_id AND
file.cat_id='".intval($_GET['cat_id'])."' AND file.cat_id='".intval($_GET['cat_id'])."' AND
person.user_id = $user_id"; person.user_id = $user_id";
} }
if ($_GET['sent_received'] == 'received') { if ($_GET['sent_received'] == 'received') {
$sql = "SELECT DISTINCT file.id, file.filename, file.title $sql = "SELECT DISTINCT file.id, file.filename, file.title
FROM ".$dropbox_cnf['tbl_file']." file INNER JOIN ".$dropbox_cnf['tbl_person']." person FROM ".$dropbox_cnf['tbl_file']." file INNER JOIN ".$dropbox_cnf['tbl_person']." person
ON (person.file_id=file.id AND file.c_id = $course_id AND person.c_id = $course_id) ON (person.file_id=file.id AND file.c_id = $course_id AND person.c_id = $course_id)
INNER JOIN ".$dropbox_cnf['tbl_post']." post INNER JOIN ".$dropbox_cnf['tbl_post']." post
ON (post.file_id = file.id AND post.c_id = $course_id AND file.c_id = $course_id) ON (post.file_id = file.id AND post.c_id = $course_id AND file.c_id = $course_id)
WHERE WHERE
post.cat_id = ".intval($_GET['cat_id'])." AND post.cat_id = ".intval($_GET['cat_id'])." AND
post.dest_user_id = $user_id" ; post.dest_user_id = $user_id" ;
} }
$result = Database::query($sql);
while ($row = Database::fetch_array($result)) {
$files_to_download[] = $row['id'];
}
if (!is_array($files_to_download) OR empty($files_to_download)) {
header('location: index.php?view='.Security::remove_XSS($_GET['sent_received']).'&error=ErrorNoFilesInFolder');
exit;
}
zip_download($files_to_download);
exit;
}
$result = Database::query($sql);
while ($row = Database::fetch_array($result)) {
$files_to_download[] = $row['id'];
}
if (!is_array($files_to_download) OR empty($files_to_download)) {
header('location: index.php?view='.Security::remove_XSS($_GET['sent_received']).'&error=ErrorNoFilesInFolder');
exit;
}
zip_download($files_to_download);
exit;
}
/* DOWNLOAD A FILE */ /* DOWNLOAD A FILE */
/* AUTHORIZATION */
/* AUTHORIZATION */
// Check if the id makes sense // Check if the id makes sense
if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { if (!isset($_GET['id']) || !is_numeric($_GET['id'])) {
Display::display_header($nameTools, 'Dropbox'); Display::display_header($nameTools, 'Dropbox');
Display :: display_error_message(get_lang('Error')); Display :: display_error_message(get_lang('Error'));
Display::display_footer(); Display::display_footer();
exit; exit;
} }
// Check if the user is allowed to download the file // Check if the user is allowed to download the file
$allowed_to_download = false; $allowed_to_download = false;
if (user_can_download_file($_GET['id'], api_get_user_id())) { if (user_can_download_file($_GET['id'], api_get_user_id())) {
$allowed_to_download = true; $allowed_to_download = true;
} }
/* ERROR IF NOT ALLOWED TO DOWNLOAD */ /* ERROR IF NOT ALLOWED TO DOWNLOAD */
if (!$allowed_to_download) { if (!$allowed_to_download) {
Display::display_header($nameTools, 'Dropbox'); Display::display_header($nameTools, 'Dropbox');
Display::display_error_message(get_lang('YouAreNotAllowedToDownloadThisFile')); Display::display_error_message(get_lang('YouAreNotAllowedToDownloadThisFile'));
Display::display_footer(); Display::display_footer();
exit; exit;
} else { } else {
/* DOWNLOAD THE FILE */ /* DOWNLOAD THE FILE */
// the user is allowed to download the file // the user is allowed to download the file
$_SESSION['_seen'][$_course['id']][TOOL_DROPBOX][] = intval($_GET['id']); $_SESSION['_seen'][$_course['id']][TOOL_DROPBOX][] = intval($_GET['id']);
$work = new Dropbox_work($_GET['id']); $work = new Dropbox_work($_GET['id']);
$path = dropbox_cnf('sysPath') . '/' . $work -> filename; //path to file as stored on server $path = dropbox_cnf('sysPath') . '/' . $work -> filename; //path to file as stored on server
if (!Security::check_abs_path($path, dropbox_cnf('sysPath').'/')) { if (!Security::check_abs_path($path, dropbox_cnf('sysPath').'/')) {
exit; exit;
}
$file = $work->title;
$mimetype = DocumentManager::file_get_mime_type(true);
$fileinfo = pathinfo($file);
$extension = $fileinfo['extension'];
if (!empty($extension) && isset($mimetype[$extension]) && $_GET['action'] != 'download') {
// give hint to browser about filetype
header( 'Content-type: ' . $mimetype[$extension] . "\n");
} else {
//no information about filetype: force a download dialog window in browser
header( "Content-type: application/octet-stream\n");
} }
$file = $work->title; header('Content-Disposition: attachment; filename='.$file);
$mimetype = DocumentManager::file_get_mime_type(true);
$fileinfo = pathinfo($file); /**
$extension = $fileinfo['extension']; * Note that if you use these two headers from a previous example:
* header('Cache-Control: no-cache, must-revalidate');
if (!empty($extension) && isset($mimetype[$extension]) && $_GET['action'] != 'download') { * header('Pragma: no-cache');
// give hint to browser about filetype * before sending a file to the browser, the "Open" option on Internet Explorer's file download dialog will not work properly. If the user clicks "Open" instead of "Save," the target application will open an empty file, because the downloaded file was not cached. The user will have to save the file to their hard drive in order to use it.
header( 'Content-type: ' . $mimetype[$extension] . "\n"); * Make sure to leave these headers out if you'd like your visitors to be able to use IE's "Open" option.
} else { */
//no information about filetype: force a download dialog window in browser header("Pragma: \n");
header( "Content-type: application/octet-stream\n"); header("Cache-Control: \n");
} header("Cache-Control: public\n"); // IE cannot download from sessions without a cache
/*if (!in_array(strtolower($extension), array('doc', 'xls', 'ppt', 'pps', 'sxw', 'sxc', 'sxi'))) { /*if (isset($_SERVER['HTTPS'])) {
header('Content-Disposition: inline; filename='.$file); // bugs with open office /**
} else { * We need to set the following headers to make downloads work using IE in HTTPS mode.
header('Content-Disposition: attachment; filename='.$file); *
}*/ //header('Pragma: ');
//header('Cache-Control: ');
header('Content-Disposition: attachment; filename='.$file); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT\n");
header("Last-Modified: " . gmdate( "D, d M Y H:i:s") . " GMT\n");
/** header("Cache-Control: no-store, no-cache, must-revalidate\n"); // HTTP/1.1
* Note that if you use these two headers from a previous example: header("Cache-Control: post-check=0, pre-check=0\n", false);
* header('Cache-Control: no-cache, must-revalidate'); }*/
* header('Pragma: no-cache');
* before sending a file to the browser, the "Open" option on Internet Explorer's file download dialog will not work properly. If the user clicks "Open" instead of "Save," the target application will open an empty file, because the downloaded file was not cached. The user will have to save the file to their hard drive in order to use it. header('Content-Description: '.trim(htmlentities($file)));
* Make sure to leave these headers out if you'd like your visitors to be able to use IE's "Open" option. header('Content-transfer-encoding: binary');
*/
header("Pragma: \n"); header("Content-Length: " . filesize($path)."\n" );
header("Cache-Control: \n");
header("Cache-Control: public\n"); // IE cannot download from sessions without a cache $fp = fopen( $path, 'rb');
fpassthru($fp);
/*if (isset($_SERVER['HTTPS'])) { exit();
/**
* We need to set the following headers to make downloads work using IE in HTTPS mode.
*
//header('Pragma: ');
//header('Cache-Control: ');
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT\n");
header("Last-Modified: " . gmdate( "D, d M Y H:i:s") . " GMT\n");
header("Cache-Control: no-store, no-cache, must-revalidate\n"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0\n", false);
}*/
header('Content-Description: '.trim(htmlentities($file)));
header('Content-transfer-encoding: binary');
header("Content-Length: " . filesize($path)."\n" );
$fp = fopen( $path, 'rb');
fpassthru($fp);
exit();
} }
//@todo clean this file the code below is useless there are 2 exits in previous conditions ... maybe a bad copy/paste/merge? //@todo clean this file the code below is useless there are 2 exits in previous conditions ... maybe a bad copy/paste/merge?
exit; exit;

@ -37,10 +37,9 @@ function handle_multiple_actions() {
// STEP 2: at least one file has to be selected. If not we return an error message // STEP 2: at least one file has to be selected. If not we return an error message
$ids = Request::get('id', array()); $ids = Request::get('id', array());
if(count($ids)>0){ if (count($ids)>0) {
$checked_file_ids = $_POST['id']; $checked_file_ids = $_POST['id'];
} } else {
else{
foreach ($_POST as $key => $value) { foreach ($_POST as $key => $value) {
if (strstr($value, $part.'_') AND $key != 'view_received_category' AND $key != 'view_sent_category') { if (strstr($value, $part.'_') AND $key != 'view_received_category' AND $key != 'view_sent_category') {
$checked_files = true; $checked_files = true;
@ -107,7 +106,8 @@ function handle_multiple_actions() {
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version march 2006 * @version march 2006
*/ */
function delete_category($action, $id, $user_id = null) { function delete_category($action, $id, $user_id = null)
{
$course_id = api_get_course_int_id(); $course_id = api_get_course_int_id();
global $dropbox_cnf; global $dropbox_cnf;
@ -160,11 +160,8 @@ function delete_category($action, $id, $user_id = null) {
/** /**
* Displays the form to move one individual file to a category * Displays the form to move one individual file to a category
* *@ return html code of the form that appears in a message box.
* @return html code of the form that appears in a message box.
*
* @author Julio Montoya - function rewritten * @author Julio Montoya - function rewritten
*/ */
function display_move_form($part, $id, $target = array(), $extra_params = array()) function display_move_form($part, $id, $target = array(), $extra_params = array())
{ {
@ -180,7 +177,6 @@ function display_move_form($part, $id, $target = array(), $extra_params = array(
$form->addElement('select', 'move_target', get_lang('MoveFileTo'), $options); $form->addElement('select', 'move_target', get_lang('MoveFileTo'), $options);
$form->addElement('button', 'do_move', get_lang('MoveFile')); $form->addElement('button', 'do_move', get_lang('MoveFile'));
$form->display(); $form->display();
} }
/** /**
@ -241,7 +237,7 @@ function display_action_options($part, $categories, $current_category = 0)
if ($current_category != 0) { if ($current_category != 0) {
echo '<option value="move_0">'.get_lang('Root').'</a>'; echo '<option value="move_0">'.get_lang('Root').'</a>';
} }
foreach ($categories as $key => $value) { foreach ($categories as $value) {
if ($current_category != $value['cat_id']) { if ($current_category != $value['cat_id']) {
echo '<option value="move_'.$value['cat_id'].'">'.$value['cat_name'].'</option>'; echo '<option value="move_'.$value['cat_id'].'">'.$value['cat_name'].'</option>';
} }
@ -310,7 +306,8 @@ function get_dropbox_categories($filter = '')
* @param int The category ID * @param int The category ID
* @return array The details of this category * @return array The details of this category
*/ */
function get_dropbox_category($id) { function get_dropbox_category($id)
{
global $dropbox_cnf; global $dropbox_cnf;
$course_id = api_get_course_int_id(); $course_id = api_get_course_int_id();
if (empty($id) or $id != intval($id)) { return array(); } if (empty($id) or $id != intval($id)) { return array(); }

@ -54,12 +54,8 @@ require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
// protecting the script // protecting the script
api_protect_course_script(); api_protect_course_script();
/* Libraries */ /* Libraries */
// including the library for the sortable table
//require_once api_get_path(LIBRARY_PATH).'tablesort.lib.php';moved to autoload
// including the library for the dropbox // including the library for the dropbox
require_once 'dropbox_class.inc.php'; require_once 'dropbox_class.inc.php';
@ -68,7 +64,6 @@ require_once api_get_path(SYS_CODE_PATH).'document/document.inc.php'; // we use
require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php'; // the function choose_image is used require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php'; // the function choose_image is used
require_once api_get_path(LIBRARY_PATH).'document.lib.php'; require_once api_get_path(LIBRARY_PATH).'document.lib.php';
/* Virtual course support */ /* Virtual course support */
$user_id = api_get_user_id(); $user_id = api_get_user_id();
@ -139,7 +134,6 @@ if (dropbox_cnf('allowOverwrite')) {
$javascript .= ", "; $javascript .= ", ";
} }
$javascript .= "'".$dropbox_person->sentWork[$i]->title."'"; $javascript .= "'".$dropbox_person->sentWork[$i]->title."'";
//echo '***'.$dropbox_person->sentWork[$i]->title;
} }
$javascript .= "); $javascript .= ");
@ -188,9 +182,7 @@ if (dropbox_cnf('allowOverwrite')) {
$javascript .= " $javascript .= "
</script>"; </script>";
$htmlHeadXtra[] = $javascript; $htmlHeadXtra[] = $javascript;
$htmlHeadXtra[] = $htmlHeadXtra[] =
"<script type=\"text/javascript\"> "<script type=\"text/javascript\">
function confirmation (name) function confirmation (name)
@ -218,17 +210,17 @@ if (!$_GET['view'] OR $_GET['view'] == 'received') {
} }
if (($_POST['action'] == 'download_received' || $_POST['action'] == 'download_sent') and !$_POST['store_feedback']) { if (($_POST['action'] == 'download_received' || $_POST['action'] == 'download_sent') and !$_POST['store_feedback']) {
$checked_file_ids = $_POST['id']; $checked_file_ids = $_POST['id'];
if (!is_array($checked_file_ids) || count($checked_file_ids) == 0) { if (!is_array($checked_file_ids) || count($checked_file_ids) == 0) {
header ('location: index.php?view='.$_GET['view'].'&error=CheckAtLeastOneFile'); header ('location: index.php?view='.$_GET['view'].'&error=CheckAtLeastOneFile');
} else { } else {
handle_multiple_actions(); handle_multiple_actions();
} }
exit; exit;
} }
/* /*
* AUTHORISATION SECTION * AUTHORISATION SECTION
* Prevents access of all users that are not course members * Prevents access of all users that are not course members
*/ */

@ -95,55 +95,55 @@ if (isset($_POST['submitWork'])) {
// Transform any .php file in .phps fo security // Transform any .php file in .phps fo security
$dropbox_filename = php2phps($dropbox_filename); $dropbox_filename = php2phps($dropbox_filename);
if (!filter_extension($dropbox_filename)) { if (!filter_extension($dropbox_filename)) {
$error = true; $error = true;
$errormsg = get_lang('UplUnableToSaveFileFilteredExtension'); $errormsg = get_lang('UplUnableToSaveFileFilteredExtension');
} else { } else {
// set title // set title
$dropbox_title = $dropbox_filename; $dropbox_title = $dropbox_filename;
// set author // set author
if ($_POST['authors'] == '') { if ($_POST['authors'] == '') {
$_POST['authors'] = getUserNameFromId($_user['user_id']); $_POST['authors'] = getUserNameFromId($_user['user_id']);
} }
if ($dropbox_overwrite) { if ($dropbox_overwrite) {
$dropbox_person = new Dropbox_Person($_user['user_id'], $is_courseAdmin, $is_courseTutor); $dropbox_person = new Dropbox_Person($_user['user_id'], $is_courseAdmin, $is_courseTutor);
foreach ($dropbox_person->sentWork as $w) { foreach ($dropbox_person->sentWork as $w) {
if ($w->title == $dropbox_filename) { if ($w->title == $dropbox_filename) {
if (($w->recipients[0]['id'] > dropbox_cnf('mailingIdBase')) xor $thisIsAMailing) { if (($w->recipients[0]['id'] > dropbox_cnf('mailingIdBase')) xor $thisIsAMailing) {
$error = true; $error = true;
$errormsg = get_lang('MailingNonMailingError'); $errormsg = get_lang('MailingNonMailingError');
} }
if ( ($w->recipients[0]['id'] == $_user['user_id']) xor $thisIsJustUpload) { if (($w->recipients[0]['id'] == $_user['user_id']) xor $thisIsJustUpload) {
$error = true; $error = true;
$errormsg = get_lang('MailingJustUploadSelectNoOther'); $errormsg = get_lang('MailingJustUploadSelectNoOther');
} }
$dropbox_filename = $w->filename; $dropbox_filename = $w->filename;
$found = true; $found = true;
break; break;
} }
} }
} else { } else {
// rename file to login_filename_uniqueId format // rename file to login_filename_uniqueId format
$dropbox_filename = getLoginFromId( $_user['user_id']) . '_' . $dropbox_filename . '_'.uniqid(''); $dropbox_filename = getLoginFromId( $_user['user_id']) . '_' . $dropbox_filename . '_'.uniqid('');
} }
if (!is_dir(dropbox_cnf('sysPath'))) { if (!is_dir(dropbox_cnf('sysPath'))) {
//The dropbox subdir doesn't exist yet so make it and create the .htaccess file //The dropbox subdir doesn't exist yet so make it and create the .htaccess file
mkdir(dropbox_cnf('sysPath'), api_get_permissions_for_new_directories()) or die(get_lang('ErrorCreatingDir').' (code 404)'); mkdir(dropbox_cnf('sysPath'), api_get_permissions_for_new_directories()) or die(get_lang('ErrorCreatingDir').' (code 404)');
$fp = fopen(dropbox_cnf('sysPath').'/.htaccess', 'w') or die(get_lang('ErrorCreatingDir').' (code 405)'); $fp = fopen(dropbox_cnf('sysPath').'/.htaccess', 'w') or die(get_lang('ErrorCreatingDir').' (code 405)');
fwrite($fp, "AuthName AllowLocalAccess fwrite($fp, "AuthName AllowLocalAccess
AuthType Basic AuthType Basic
order deny,allow order deny,allow
deny from all deny from all
php_flag zlib.output_compression off") or die(get_lang('ErrorCreatingDir').' (code 406)'); php_flag zlib.output_compression off") or die(get_lang('ErrorCreatingDir').' (code 406)');
} }
if ($error) {} if ($error) {
elseif ($thisIsAMailing) { } elseif ($thisIsAMailing) {
if (preg_match(dropbox_cnf('mailingZipRegexp'), $dropbox_title)) { if (preg_match(dropbox_cnf('mailingZipRegexp'), $dropbox_title)) {
$newWorkRecipients = dropbox_cnf('mailingIdBase'); $newWorkRecipients = dropbox_cnf('mailingIdBase');
} else { } else {
@ -172,7 +172,7 @@ if (isset($_POST['submitWork'])) {
// After uploading the file, create the db entries // After uploading the file, create the db entries
if (!$error) { if (!$error) {
@move_uploaded_file( $dropbox_filetmpname, dropbox_cnf('sysPath') . '/' . $dropbox_filename) @move_uploaded_file($dropbox_filetmpname, dropbox_cnf('sysPath') . '/' . $dropbox_filename)
or die(get_lang('UploadError').' (code 407)'); or die(get_lang('UploadError').' (code 407)');
new Dropbox_SentWork($_user['user_id'], $dropbox_title, $_POST['description'], strip_tags($_POST['authors']), $dropbox_filename, $dropbox_filesize, $newWorkRecipients); new Dropbox_SentWork($_user['user_id'], $dropbox_title, $_POST['description'], strip_tags($_POST['authors']), $dropbox_filename, $dropbox_filesize, $newWorkRecipients);
} }
@ -180,11 +180,9 @@ if (isset($_POST['submitWork'])) {
} }
} //end if(!$error) } //end if(!$error)
/** /**
* SUBMIT FORM RESULTMESSAGE * SUBMIT FORM RESULTMESSAGE
*/ */
if (!$error) { if (!$error) {
$return_message = get_lang('FileUploadSucces'); $return_message = get_lang('FileUploadSucces');
} else { } else {

Loading…
Cancel
Save