소스 검색

A couple of bug fixes.

Kays48 12 년 전
부모
커밋
c5f7c2ac59
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      Sources/Attachments.php
  2. 1 1
      Sources/Post.php
  3. 1 1
      Themes/default/languages/Admin.english.php

+ 1 - 1
Sources/Attachments.php

@@ -29,7 +29,7 @@ function automanage_attachments_check_directory()
 		return;
 	elseif (!isset($_FILES))
 		return;
-	elseif (isset($_FILES))
+	elseif (isset($_FILES['attachment']))
 		foreach ($_FILES['attachment']['tmp_name'] as $dummy)
 			if (!empty($dummy))
 			{

+ 1 - 1
Sources/Post.php

@@ -1302,7 +1302,7 @@ function Post2()
 
 	// Then try to upload any attachments.
 	$context['can_post_attachment'] = !empty($modSettings['attachmentEnable']) && $modSettings['attachmentEnable'] == 1 && (allowedTo('post_attachment') || ($modSettings['postmod_active'] && allowedTo('post_unapproved_attachments')));
-	if ($context['can_post_attachment'] && !empty($_FILES['attachment']) && empty($_POST['from_qr']))
+	if ($context['can_post_attachment'] && empty($_POST['from_qr']))
 	{
 		 require_once($sourcedir . '/Attachments.php');
 		 processAttachments();

+ 1 - 1
Themes/default/languages/Admin.english.php

@@ -450,7 +450,7 @@ $txt['attachment_transfer_forum_root'] = 'Forum root directory.';
 $txt['attachment_transfer_no_room'] = 'Directory size or file count limit reached.';
 $txt['attachment_transfer_no_find'] = 'No files were found to transfer.';
 $txt['attachments_transfered'] = '%1$d files were transfered to %2$s';
-$txt['attachment_not_transfered'] = '%1$d files were not transfered.';
+$txt['attachments_not_transfered'] = '%1$d files were not transfered.';
 $txt['attachment_transfer_no_dir'] = 'Either the source directory or one of the target options were not selected.';
 $txt['attachment_transfer_same_dir'] = 'You cannot select the same directory as both the source and target.';
 $txt['attachment_transfer_progress'] = 'Please wait. Transfer in progess.';