소스 검색

Fix chat time outs
Fix error path
Add timeout to ajax pings
Add Github Issue Template

causefx 8 년 전
부모
커밋
e481a1f63a
4개의 변경된 파일42개의 추가작업 그리고 4개의 파일을 삭제
  1. 22 0
      .github/ISSUE_TEMPLATE.md
  2. 2 2
      chat/connect.php
  3. 1 1
      error.php
  4. 17 1
      index.php

+ 22 - 0
.github/ISSUE_TEMPLATE.md

@@ -0,0 +1,22 @@
+<!-- Please Fill out as much information as possible, Thanks! -->
+###### Organizr Version: V 1.x
+###### Branch: Master/Develop
+###### WebSever: Nginx/Apache
+###### Operating System: Windows/MacOS/Ubuntu
+<hr>
+
+##### Problem Description:
+<!---TYPE HERE--->
+
+<hr>
+
+##### Reproduction Steps:
+<!---TYPE HERE--->
+
+<hr>
+
+#### Errors on screen?  If so paste here:
+<!-- (Errors go below the first ``` . Don't remove the ' tags) -->
+```
+
+```

+ 2 - 2
chat/connect.php

@@ -1,7 +1,7 @@
 <?php
 
 $db = new SQLite3("../chatpack.db");
-$db->busyTimeout(5000);
+$db->busyTimeout(60000);
 $db->exec("PRAGMA journal_mode = wal;");
 
-?>
+?>

+ 1 - 1
error.php

@@ -39,7 +39,7 @@ foreach(loadAppearance() as $key => $value) {
 	$$key = $value;
 }
 //error stuff
-$requested = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
+$requested = $_SERVER['REQUEST_URI'];
 $codes = array(
        400 => array('Bad Request', 'The server cannot or will not process the request due to an apparent client error.', 'sowwy'),
        401 => array('Unauthorized', 'You do not have access to this page.', 'sowwy'),

+ 17 - 1
index.php

@@ -1733,7 +1733,23 @@ $group = (isset($group) ? $group : "guest");
 					$name = str_replace(array(':', '\\', '/', '*'), 'x', $ping);
 					if(strpos($type, 'image') !== false){ $style = "margin-top:28px"; }else{ $style = ""; }?>
 					var  pingTab<?php echo $pingCount;?> = function() {
-						$("ping[class^='ping-<?php echo $name;?>']").load("ajax.php?a=get-ping&url=<?php echo $ping;?>&style=<?php echo $style;?>");
+						//$("ping[class^='ping-<?php echo $name;?>']").load("ajax.php?a=get-ping&url=<?php echo $ping;?>&style=<?php echo $style;?>");
+						$.ajax({
+							url: 'ajax.php?a=get-ping&url=<?php echo $ping;?>&style=<?php echo $style;?>',
+							timeout: 10000,
+							type: 'GET',
+							success: function(response) {
+								var getDiv = response;
+								if (typeof getDiv !== 'undefined') {
+									$("ping[class^='ping-<?php echo $name;?>']").html($(getDiv).prop('outerHTML'));
+								}else{
+									console.log('ping-<?php echo $name;?> data was not sufficent or is offline');
+								}
+							},
+							error: function(jqXHR, textStatus, errorThrown) {
+								console.error('ping-<?php echo $name;?> could not be updated');
+							}
+						});
 					};
 					// Initial Loads
 					pingTab<?php echo $pingCount;?>();