Преглед на файлове

Merge pull request #1244 from Arantor/release-2.1

Minor things
Arantor преди 11 години
родител
ревизия
21aced9dff
променени са 5 файла, в които са добавени 8 реда и са изтрити 2 реда
  1. 1 0
      Sources/Errors.php
  2. 1 1
      Sources/Likes.php
  3. 3 0
      Sources/Subscriptions-PayPal.php
  4. 2 0
      Themes/default/languages/ManageMaintenance.english.php
  5. 1 1
      subscriptions.php

+ 1 - 0
Sources/Errors.php

@@ -83,6 +83,7 @@ function log_error($error_message, $error_type = 'general', $file = null, $line
 		'template',
 		'debug',
 		'cron',
+		'paidsubs',
 	);
 
 	// This prevents us from infinite looping if the hook or call produces an error.

+ 1 - 1
Sources/Likes.php

@@ -278,7 +278,7 @@ function viewLikes($like_type, $like_content)
 		}
 
 		$context['likers'][$liker]['profile'] = &$memberContext[$liker];
-		$context['likers'][$liker]['time'] = timeformat($dummy['timestamp']);
+		$context['likers'][$liker]['time'] = !empty($dummy['timestamp']) ? timeformat($dummy['timestamp']) : '';
 	}
 
 	$count = count($context['likers']);

+ 3 - 0
Sources/Subscriptions-PayPal.php

@@ -256,6 +256,9 @@ class paypal_payment
 			exit;
 
 		// Is this a subscription - and if so is it a secondary payment that we need to process?
+		// If so, make sure we get it in the expected format. Seems PayPal sometimes sends it without urlencoding.
+		if (!empty($_POST['item_number']) && strpos($_POST['item_number'], ' ') !== false)
+			$_POST['item_number'] = str_replace(' ', '+', $_POST['item_number']);
 		if ($this->isSubscription() && (empty($_POST['item_number']) || strpos($_POST['item_number'], '+') === false))
 			// Calculate the subscription it relates to!
 			$this->_findSubscription();

+ 2 - 0
Themes/default/languages/ManageMaintenance.english.php

@@ -126,6 +126,8 @@ $txt['errortype_user'] = 'User';
 $txt['errortype_user_desc'] = 'Errors resulting from user errors.  Includes failed passwords, trying to login when banned, and trying to do an action for which they do not have permission.';
 $txt['errortype_cron'] = 'Cron';
 $txt['errortype_cron_desc'] = 'Errors resulting from background tasks.';
+$txt['errortype_paidsubs'] = 'Paid Subs';
+$txt['errortype_paidsubs'] = 'Errors resulting from paid subscriptions, which can include notification of payment failures.';
 
 $txt['maintain_recount'] = 'Recount all forum totals and statistics';
 $txt['maintain_recount_info'] = 'Should the total replies of a topic or the number of PMs in your inbox be incorrect: this function will recount all saved counts and statistics for you.';

+ 1 - 1
subscriptions.php

@@ -312,7 +312,7 @@ function generateSubscriptionError($text)
 	}
 
 	// Then just log and die.
-	log_error($text);
+	log_error($text, 'paidsubs');
 
 	exit;
 }