Completed
Pull Request — master (#10)
by
unknown
02:50
created
index.php 6 patches
Doc Comments   +1 added lines, -101 removed lines patch added patch discarded remove patch
@@ -416,104 +416,4 @@
 block discarded – undo
416 416
 
417 417
 				var win = $(window);
418 418
 				var lastPostId = "<?php echo $lastPostId; ?>";
419
-				var view = "<?php echo $view; ?>"
420
-				var old_lastPostId = "";
421
-				var morePostsAvailable = true;
422
-
423
-				if(window.location.hash)
424
-				{
425
-					var hash = window.location.hash.slice(1);
426
-
427
-					if(!$("article[id='"+ hash +"']").length)
428
-					{
429
-						for (var i = 5; i >= 0; i--)
430
-						{
431
-							if(!$("article[id='"+ hash +"']").length)
432
-							{
433
-								$.ajax({
434
-									url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
435
-									dataType: 'html',
436
-									async: false,
437
-									success: function(html) {
438
-										var div = document.createElement('div');
439
-										div.innerHTML = html;
440
-										var elements = div.childNodes;
441
-										old_lastPostId = lastPostId;
442
-										lastPostId = elements[3].textContent;
443
-										lastPostId = lastPostId.replace(/\s+/g, '');
444
-										//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
445
-										if(lastPostId == old_lastPostId) {
446
-											
447
-											//morePostsAvailable = false;
448
-										}
449
-										else {
450
-											//alert(elements[3].textContent);
451
-											$('#posts').append(elements[1].innerHTML);
452
-											$('#posts').hide().show(0);
453
-										}
454
-										$('#loading').hide();
455
-									}
456
-								});
457
-
458
-								$('.jodel > content').Emoji();
459
-							}
460
-							
461
-						}
462
-						scrollToAnchor(hash);
463
-
464
-					}						
465
-				}
466
-
467
-				// Each time the user scrolls
468
-				win.scroll(function() {
469
-
470
-
471
-					// End of the document reached?
472
-					if ($(window).scrollTop() + $(window).height() > $(document).height() - 100 && morePostsAvailable)
473
-					{
474
-						$('#loading').show();
475
-
476
-						$.ajax({
477
-							url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
478
-							dataType: 'html',
479
-							async: false,
480
-							success: function(html) {
481
-								var div = document.createElement('div');
482
-								div.innerHTML = html;
483
-								var elements = div.childNodes;
484
-								old_lastPostId = lastPostId;
485
-								lastPostId = elements[3].textContent;
486
-								lastPostId = lastPostId.replace(/\s+/g, '');
487
-								//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
488
-								if(lastPostId == old_lastPostId)
489
-								{
490
-									
491
-									//morePostsAvailable = false;
492
-								}
493
-								else
494
-								{
495
-									//alert(elements[3].textContent);
496
-									$('#posts').append(elements[1].innerHTML);
497
-								}
498
-								$('#loading').hide();
499
-							}
500
-						});
501
-
502
-						$('.jodel > content').Emoji();
503
-					}
504
-				});
505
-			<?php } ?>
506
-			});	
507
-
508
-		</script>
509
-
510
-		<?php  
511
-			if(is_file('./piwik-script.html'))
512
-			{
513
-			    require_once('./piwik-script.html');
514
-			}
515
-		?>
516
-
517
-	</body>
518
-</html>
519
-
419
+				var view = "<?php echo $view
520 420
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +1 added lines, -101 removed lines patch added patch discarded remove patch
@@ -416,104 +416,4 @@
 block discarded – undo
416 416
 
417 417
 				var win = $(window);
418 418
 				var lastPostId = "<?php echo $lastPostId; ?>";
419
-				var view = "<?php echo $view; ?>"
420
-				var old_lastPostId = "";
421
-				var morePostsAvailable = true;
422
-
423
-				if(window.location.hash)
424
-				{
425
-					var hash = window.location.hash.slice(1);
426
-
427
-					if(!$("article[id='"+ hash +"']").length)
428
-					{
429
-						for (var i = 5; i >= 0; i--)
430
-						{
431
-							if(!$("article[id='"+ hash +"']").length)
432
-							{
433
-								$.ajax({
434
-									url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
435
-									dataType: 'html',
436
-									async: false,
437
-									success: function(html) {
438
-										var div = document.createElement('div');
439
-										div.innerHTML = html;
440
-										var elements = div.childNodes;
441
-										old_lastPostId = lastPostId;
442
-										lastPostId = elements[3].textContent;
443
-										lastPostId = lastPostId.replace(/\s+/g, '');
444
-										//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
445
-										if(lastPostId == old_lastPostId) {
446
-											
447
-											//morePostsAvailable = false;
448
-										}
449
-										else {
450
-											//alert(elements[3].textContent);
451
-											$('#posts').append(elements[1].innerHTML);
452
-											$('#posts').hide().show(0);
453
-										}
454
-										$('#loading').hide();
455
-									}
456
-								});
457
-
458
-								$('.jodel > content').Emoji();
459
-							}
460
-							
461
-						}
462
-						scrollToAnchor(hash);
463
-
464
-					}						
465
-				}
466
-
467
-				// Each time the user scrolls
468
-				win.scroll(function() {
469
-
470
-
471
-					// End of the document reached?
472
-					if ($(window).scrollTop() + $(window).height() > $(document).height() - 100 && morePostsAvailable)
473
-					{
474
-						$('#loading').show();
475
-
476
-						$.ajax({
477
-							url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
478
-							dataType: 'html',
479
-							async: false,
480
-							success: function(html) {
481
-								var div = document.createElement('div');
482
-								div.innerHTML = html;
483
-								var elements = div.childNodes;
484
-								old_lastPostId = lastPostId;
485
-								lastPostId = elements[3].textContent;
486
-								lastPostId = lastPostId.replace(/\s+/g, '');
487
-								//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
488
-								if(lastPostId == old_lastPostId)
489
-								{
490
-									
491
-									//morePostsAvailable = false;
492
-								}
493
-								else
494
-								{
495
-									//alert(elements[3].textContent);
496
-									$('#posts').append(elements[1].innerHTML);
497
-								}
498
-								$('#loading').hide();
499
-							}
500
-						});
501
-
502
-						$('.jodel > content').Emoji();
503
-					}
504
-				});
505
-			<?php } ?>
506
-			});	
507
-
508
-		</script>
509
-
510
-		<?php  
511
-			if(is_file('./piwik-script.html'))
512
-			{
513
-			    require_once('./piwik-script.html');
514
-			}
515
-		?>
516
-
517
-	</body>
518
-</html>
519
-
419
+				var view = "<?php echo $view
520 420
\ No newline at end of file
Please login to merge, or discard this patch.
Switch Indentation   +1 added lines, -101 removed lines patch added patch discarded remove patch
@@ -416,104 +416,4 @@
 block discarded – undo
416 416
 
417 417
 				var win = $(window);
418 418
 				var lastPostId = "<?php echo $lastPostId; ?>";
419
-				var view = "<?php echo $view; ?>"
420
-				var old_lastPostId = "";
421
-				var morePostsAvailable = true;
422
-
423
-				if(window.location.hash)
424
-				{
425
-					var hash = window.location.hash.slice(1);
426
-
427
-					if(!$("article[id='"+ hash +"']").length)
428
-					{
429
-						for (var i = 5; i >= 0; i--)
430
-						{
431
-							if(!$("article[id='"+ hash +"']").length)
432
-							{
433
-								$.ajax({
434
-									url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
435
-									dataType: 'html',
436
-									async: false,
437
-									success: function(html) {
438
-										var div = document.createElement('div');
439
-										div.innerHTML = html;
440
-										var elements = div.childNodes;
441
-										old_lastPostId = lastPostId;
442
-										lastPostId = elements[3].textContent;
443
-										lastPostId = lastPostId.replace(/\s+/g, '');
444
-										//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
445
-										if(lastPostId == old_lastPostId) {
446
-											
447
-											//morePostsAvailable = false;
448
-										}
449
-										else {
450
-											//alert(elements[3].textContent);
451
-											$('#posts').append(elements[1].innerHTML);
452
-											$('#posts').hide().show(0);
453
-										}
454
-										$('#loading').hide();
455
-									}
456
-								});
457
-
458
-								$('.jodel > content').Emoji();
459
-							}
460
-							
461
-						}
462
-						scrollToAnchor(hash);
463
-
464
-					}						
465
-				}
466
-
467
-				// Each time the user scrolls
468
-				win.scroll(function() {
469
-
470
-
471
-					// End of the document reached?
472
-					if ($(window).scrollTop() + $(window).height() > $(document).height() - 100 && morePostsAvailable)
473
-					{
474
-						$('#loading').show();
475
-
476
-						$.ajax({
477
-							url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
478
-							dataType: 'html',
479
-							async: false,
480
-							success: function(html) {
481
-								var div = document.createElement('div');
482
-								div.innerHTML = html;
483
-								var elements = div.childNodes;
484
-								old_lastPostId = lastPostId;
485
-								lastPostId = elements[3].textContent;
486
-								lastPostId = lastPostId.replace(/\s+/g, '');
487
-								//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
488
-								if(lastPostId == old_lastPostId)
489
-								{
490
-									
491
-									//morePostsAvailable = false;
492
-								}
493
-								else
494
-								{
495
-									//alert(elements[3].textContent);
496
-									$('#posts').append(elements[1].innerHTML);
497
-								}
498
-								$('#loading').hide();
499
-							}
500
-						});
501
-
502
-						$('.jodel > content').Emoji();
503
-					}
504
-				});
505
-			<?php } ?>
506
-			});	
507
-
508
-		</script>
509
-
510
-		<?php  
511
-			if(is_file('./piwik-script.html'))
512
-			{
513
-			    require_once('./piwik-script.html');
514
-			}
515
-		?>
516
-
517
-	</body>
518
-</html>
519
-
419
+				var view = "<?php echo $view
520 420
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +5 added lines, -105 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 		if(!isset($_COOKIE['JodelDeviceId']) || !isDeviceUidInDatabase($_COOKIE['JodelDeviceId']))
37 37
 		{
38 38
 			$deviceUid = createAccount();
39
-			setcookie('JodelDeviceId', $deviceUid, time()+60*60*24*365*10);
40
-			error_log('Created account with JodelDeviceId:' . $deviceUid .  ' for [' . $_SERVER ['HTTP_USER_AGENT'] . ']');
39
+			setcookie('JodelDeviceId', $deviceUid, time() + 60 * 60 * 24 * 365 * 10);
40
+			error_log('Created account with JodelDeviceId:' . $deviceUid . ' for [' . $_SERVER ['HTTP_USER_AGENT'] . ']');
41 41
 			
42 42
 		}
43 43
 		else
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	//Set View
58 58
 	if(isset($_GET['view']))
59 59
 	{
60
-		switch ($_GET['view']) {
60
+		switch($_GET['view']) {
61 61
 			case 'comment':
62 62
 				$view = 'comment';
63 63
 				break;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	//Vote
92 92
 	if(isset($_GET['vote']) && isset($_GET['postID']))
93 93
 	{
94
-<<<<<<< HEAD
94
+<< << <<< HEAD
95 95
 		if(!deviceUidHasVotedThisPostId($deviceUid_forId1, $_GET['postID']))
96 96
 		{
97 97
 			if($_GET['vote'] == "up")
@@ -416,104 +416,4 @@  discard block
 block discarded – undo
416 416
 
417 417
 				var win = $(window);
418 418
 				var lastPostId = "<?php echo $lastPostId; ?>";
419
-				var view = "<?php echo $view; ?>"
420
-				var old_lastPostId = "";
421
-				var morePostsAvailable = true;
422
-
423
-				if(window.location.hash)
424
-				{
425
-					var hash = window.location.hash.slice(1);
426
-
427
-					if(!$("article[id='"+ hash +"']").length)
428
-					{
429
-						for (var i = 5; i >= 0; i--)
430
-						{
431
-							if(!$("article[id='"+ hash +"']").length)
432
-							{
433
-								$.ajax({
434
-									url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
435
-									dataType: 'html',
436
-									async: false,
437
-									success: function(html) {
438
-										var div = document.createElement('div');
439
-										div.innerHTML = html;
440
-										var elements = div.childNodes;
441
-										old_lastPostId = lastPostId;
442
-										lastPostId = elements[3].textContent;
443
-										lastPostId = lastPostId.replace(/\s+/g, '');
444
-										//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
445
-										if(lastPostId == old_lastPostId) {
446
-											
447
-											//morePostsAvailable = false;
448
-										}
449
-										else {
450
-											//alert(elements[3].textContent);
451
-											$('#posts').append(elements[1].innerHTML);
452
-											$('#posts').hide().show(0);
453
-										}
454
-										$('#loading').hide();
455
-									}
456
-								});
457
-
458
-								$('.jodel > content').Emoji();
459
-							}
460
-							
461
-						}
462
-						scrollToAnchor(hash);
463
-
464
-					}						
465
-				}
466
-
467
-				// Each time the user scrolls
468
-				win.scroll(function() {
469
-
470
-
471
-					// End of the document reached?
472
-					if ($(window).scrollTop() + $(window).height() > $(document).height() - 100 && morePostsAvailable)
473
-					{
474
-						$('#loading').show();
475
-
476
-						$.ajax({
477
-							url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
478
-							dataType: 'html',
479
-							async: false,
480
-							success: function(html) {
481
-								var div = document.createElement('div');
482
-								div.innerHTML = html;
483
-								var elements = div.childNodes;
484
-								old_lastPostId = lastPostId;
485
-								lastPostId = elements[3].textContent;
486
-								lastPostId = lastPostId.replace(/\s+/g, '');
487
-								//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
488
-								if(lastPostId == old_lastPostId)
489
-								{
490
-									
491
-									//morePostsAvailable = false;
492
-								}
493
-								else
494
-								{
495
-									//alert(elements[3].textContent);
496
-									$('#posts').append(elements[1].innerHTML);
497
-								}
498
-								$('#loading').hide();
499
-							}
500
-						});
501
-
502
-						$('.jodel > content').Emoji();
503
-					}
504
-				});
505
-			<?php } ?>
506
-			});	
507
-
508
-		</script>
509
-
510
-		<?php  
511
-			if(is_file('./piwik-script.html'))
512
-			{
513
-			    require_once('./piwik-script.html');
514
-			}
515
-		?>
516
-
517
-	</body>
518
-</html>
519
-
419
+				var view = "<?php echo $view
520 420
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -102 removed lines patch added patch discarded remove patch
@@ -57,7 +57,8 @@  discard block
 block discarded – undo
57 57
 	//Set View
58 58
 	if(isset($_GET['view']))
59 59
 	{
60
-		switch ($_GET['view']) {
60
+		switch ($_GET['view'])
61
+		{
61 62
 			case 'comment':
62 63
 				$view = 'comment';
63 64
 				break;
@@ -416,104 +417,4 @@  discard block
 block discarded – undo
416 417
 
417 418
 				var win = $(window);
418 419
 				var lastPostId = "<?php echo $lastPostId; ?>";
419
-				var view = "<?php echo $view; ?>"
420
-				var old_lastPostId = "";
421
-				var morePostsAvailable = true;
422
-
423
-				if(window.location.hash)
424
-				{
425
-					var hash = window.location.hash.slice(1);
426
-
427
-					if(!$("article[id='"+ hash +"']").length)
428
-					{
429
-						for (var i = 5; i >= 0; i--)
430
-						{
431
-							if(!$("article[id='"+ hash +"']").length)
432
-							{
433
-								$.ajax({
434
-									url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
435
-									dataType: 'html',
436
-									async: false,
437
-									success: function(html) {
438
-										var div = document.createElement('div');
439
-										div.innerHTML = html;
440
-										var elements = div.childNodes;
441
-										old_lastPostId = lastPostId;
442
-										lastPostId = elements[3].textContent;
443
-										lastPostId = lastPostId.replace(/\s+/g, '');
444
-										//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
445
-										if(lastPostId == old_lastPostId) {
446
-											
447
-											//morePostsAvailable = false;
448
-										}
449
-										else {
450
-											//alert(elements[3].textContent);
451
-											$('#posts').append(elements[1].innerHTML);
452
-											$('#posts').hide().show(0);
453
-										}
454
-										$('#loading').hide();
455
-									}
456
-								});
457
-
458
-								$('.jodel > content').Emoji();
459
-							}
460
-							
461
-						}
462
-						scrollToAnchor(hash);
463
-
464
-					}						
465
-				}
466
-
467
-				// Each time the user scrolls
468
-				win.scroll(function() {
469
-
470
-
471
-					// End of the document reached?
472
-					if ($(window).scrollTop() + $(window).height() > $(document).height() - 100 && morePostsAvailable)
473
-					{
474
-						$('#loading').show();
475
-
476
-						$.ajax({
477
-							url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
478
-							dataType: 'html',
479
-							async: false,
480
-							success: function(html) {
481
-								var div = document.createElement('div');
482
-								div.innerHTML = html;
483
-								var elements = div.childNodes;
484
-								old_lastPostId = lastPostId;
485
-								lastPostId = elements[3].textContent;
486
-								lastPostId = lastPostId.replace(/\s+/g, '');
487
-								//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
488
-								if(lastPostId == old_lastPostId)
489
-								{
490
-									
491
-									//morePostsAvailable = false;
492
-								}
493
-								else
494
-								{
495
-									//alert(elements[3].textContent);
496
-									$('#posts').append(elements[1].innerHTML);
497
-								}
498
-								$('#loading').hide();
499
-							}
500
-						});
501
-
502
-						$('.jodel > content').Emoji();
503
-					}
504
-				});
505
-			<?php } ?>
506
-			});	
507
-
508
-		</script>
509
-
510
-		<?php  
511
-			if(is_file('./piwik-script.html'))
512
-			{
513
-			    require_once('./piwik-script.html');
514
-			}
515
-		?>
516
-
517
-	</body>
518
-</html>
519
-
420
+				var view = "<?php echo $view
520 421
\ No newline at end of file
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -101 removed lines patch added patch discarded remove patch
@@ -416,104 +416,4 @@
 block discarded – undo
416 416
 
417 417
 				var win = $(window);
418 418
 				var lastPostId = "<?php echo $lastPostId; ?>";
419
-				var view = "<?php echo $view; ?>"
420
-				var old_lastPostId = "";
421
-				var morePostsAvailable = true;
422
-
423
-				if(window.location.hash)
424
-				{
425
-					var hash = window.location.hash.slice(1);
426
-
427
-					if(!$("article[id='"+ hash +"']").length)
428
-					{
429
-						for (var i = 5; i >= 0; i--)
430
-						{
431
-							if(!$("article[id='"+ hash +"']").length)
432
-							{
433
-								$.ajax({
434
-									url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
435
-									dataType: 'html',
436
-									async: false,
437
-									success: function(html) {
438
-										var div = document.createElement('div');
439
-										div.innerHTML = html;
440
-										var elements = div.childNodes;
441
-										old_lastPostId = lastPostId;
442
-										lastPostId = elements[3].textContent;
443
-										lastPostId = lastPostId.replace(/\s+/g, '');
444
-										//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
445
-										if(lastPostId == old_lastPostId) {
446
-											
447
-											//morePostsAvailable = false;
448
-										}
449
-										else {
450
-											//alert(elements[3].textContent);
451
-											$('#posts').append(elements[1].innerHTML);
452
-											$('#posts').hide().show(0);
453
-										}
454
-										$('#loading').hide();
455
-									}
456
-								});
457
-
458
-								$('.jodel > content').Emoji();
459
-							}
460
-							
461
-						}
462
-						scrollToAnchor(hash);
463
-
464
-					}						
465
-				}
466
-
467
-				// Each time the user scrolls
468
-				win.scroll(function() {
469
-
470
-
471
-					// End of the document reached?
472
-					if ($(window).scrollTop() + $(window).height() > $(document).height() - 100 && morePostsAvailable)
473
-					{
474
-						$('#loading').show();
475
-
476
-						$.ajax({
477
-							url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view,
478
-							dataType: 'html',
479
-							async: false,
480
-							success: function(html) {
481
-								var div = document.createElement('div');
482
-								div.innerHTML = html;
483
-								var elements = div.childNodes;
484
-								old_lastPostId = lastPostId;
485
-								lastPostId = elements[3].textContent;
486
-								lastPostId = lastPostId.replace(/\s+/g, '');
487
-								//alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId);
488
-								if(lastPostId == old_lastPostId)
489
-								{
490
-									
491
-									//morePostsAvailable = false;
492
-								}
493
-								else
494
-								{
495
-									//alert(elements[3].textContent);
496
-									$('#posts').append(elements[1].innerHTML);
497
-								}
498
-								$('#loading').hide();
499
-							}
500
-						});
501
-
502
-						$('.jodel > content').Emoji();
503
-					}
504
-				});
505
-			<?php } ?>
506
-			});	
507
-
508
-		</script>
509
-
510
-		<?php  
511
-			if(is_file('./piwik-script.html'))
512
-			{
513
-			    require_once('./piwik-script.html');
514
-			}
515
-		?>
516
-
517
-	</body>
518
-</html>
519
-
419
+				var view = "<?php echo $view
520 420
\ No newline at end of file
Please login to merge, or discard this patch.
vote-ajax.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 $config = parse_ini_file('config/config.ini.php');
4 4
 if(!isset($_GET['pw']) || $config['pw'] != $_GET['pw'])
5 5
 {
6
-	error_log($_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php');
7
-	$respone = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => false);
6
+	error_log($_SERVER['REMOTE_ADDR'] . ' used a wrong password on vote-ajax.php');
7
+	$respone = array("message" => $_SERVER['REMOTE_ADDR'] . ' used a wrong password on vote-ajax.php', "success" => false);
8 8
 	echo json_encode($response);
9 9
 	
10 10
 	die();
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 		}
71 71
 	}
72 72
 
73
-if (isset($captcha))
73
+if(isset($captcha))
74 74
 {
75 75
 	$response = array("success" => $success, "message" => $message, "captcha" => $captcha, "accessToken" => $token);
76 76
 }
Please login to merge, or discard this patch.
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,17 +40,20 @@  discard block
 block discarded – undo
40 40
 				$token = $accessToken;
41 41
 				$success = false;
42 42
 			}
43
-			else {
43
+			else
44
+			{
44 45
 				
45 46
 				$location = getLocationByAccessToken($accessToken);
46 47
 
47 48
 				$accessToken = isTokenFreshByAccessToken($location, $accessToken);
48 49
 
49 50
 
50
-				if($_POST['vote'] == "up") {
51
+				if($_POST['vote'] == "up")
52
+				{
51 53
 					$accountCreator = new Upvote();
52 54
 				}
53
-				else if($_POST['vote'] == "down") {
55
+				else if($_POST['vote'] == "down")
56
+				{
54 57
 					$accountCreator = new Downvote();
55 58
 				}
56 59
 
@@ -74,7 +77,7 @@  discard block
 block discarded – undo
74 77
 {
75 78
 	$response = array("success" => $success, "message" => $message, "captcha" => $captcha, "accessToken" => $token);
76 79
 }
77
-else 
80
+else
78 81
 {
79 82
 	$response = array("success" => $success, "message" => $message);
80 83
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 if(!isset($_GET['pw']) || $config['pw'] != $_GET['pw'])
5 5
 {
6 6
 	error_log($_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php');
7
-	$respone = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => false);
7
+	$respone = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => FALSE);
8 8
 	echo json_encode($response);
9 9
 	
10 10
 	die();
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 }
21 21
 
22 22
 $message = "";
23
-$success = true;
23
+$success = TRUE;
24 24
 $token = "";
25 25
 	if(isset($_POST['vote']) && isset($_POST['postId']))
26 26
 	{
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 				$message = "This account is not verified. Please verify this account first.";
39 39
 				$captcha = getCaptcha($accessToken);
40 40
 				$token = $accessToken;
41
-				$success = false;
41
+				$success = FALSE;
42 42
 			}
43 43
 			else {
44 44
 				
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		else
67 67
 		{
68 68
 			$message = 'There is no account available for this jodel. Please create at least one new account to vote this jodel.';
69
-			$success = false;
69
+			$success = FALSE;
70 70
 		}
71 71
 	}
72 72
 
Please login to merge, or discard this patch.