Просмотр исходного кода

Merge commit 'afef0790671bb7a1eee622d2c3202595f3a37d71' of http://192.168.8.168/mint/

Bhikkhu-Kosalla 5 лет назад
Родитель
Сommit
3be217754c
3 измененных файлов с 7 добавлено и 4 удалено
  1. 2 1
      app/sync/function.php
  2. 1 1
      app/sync/index.php
  3. 4 2
      app/sync/sync.php

+ 2 - 1
app/sync/function.php

@@ -4,6 +4,7 @@ require_once '../redis/function.php';
 
 function do_sync($param)
 {
+	/*
 	$redis=redis_connect();
 	if($redis){
 		$key = $redis->hget("sync://key",$_POST["userid"]);
@@ -19,7 +20,7 @@ function do_sync($param)
 	else{
 		return false;
 	}
-
+*/
     if (isset($_GET["op"])) {
         $op = $_GET["op"];
     } else if (isset($_POST["op"])) {

+ 1 - 1
app/sync/index.php

@@ -26,7 +26,7 @@ require_once "../pcdl/html_head.php";
 		<div id="wiki_search" style="width:100%;">
 			<div>
 				<h3>Server Address</h3>
-				<input id="sync_server_address" type="input" readonly value="<?php echo $_COOKIE["sync_sverver"];?>" style="width:30em;" />
+				<input id="sync_server_address" type="input" readonly value="<?php echo $_COOKIE["sync_server"];?>" style="width:30em;" />
 				<h3>Local Address</h3>
 				<input id="sync_local_address" type="input" placeholder="local address" value="" style="width:30em;" />
 				

+ 4 - 2
app/sync/sync.php

@@ -132,23 +132,25 @@ else{
 
 	if(count($insert_to_local)>0){
 		$message .=  "需要新增到本地".count($insert_to_local)."条记录<br>";
-		
+		/*
 		$idInServer = json_encode($insert_to_local, JSON_UNESCAPED_UNICODE);
 		$response = $client->request('POST', $server.'/app/'.$path,['verify' => false,'form_params'=>['op'=>'get','id'=>"{$idInServer}","key"=>$sync_key]]);
 		$serverData=$response->getBody();
 		$response = $client->request('POST', $localhost.'/app/'.$path, ['verify' => false,'form_params'=>['op'=>'insert','data'=>"{$serverData}","key"=>$sync_key]]);
 		$message .=  $response->getBody()."<br>";
+		*/
 		
 	}
 
 	if(count($update_to_local)>0){
 		$message .=  "需要更新到本地".count($update_to_local)."条记录<br>";
-		
+		/*
 		$idInServer = json_encode($update_to_local, JSON_UNESCAPED_UNICODE);
 		$response = $client->request('POST', $server.'/app/'.$path,['verify' => false,'form_params'=>['op'=>'get','id'=>"{$idInServer}","key"=>$sync_key]]);
 		$serverData=$response->getBody();
 		$response = $client->request('POST', $localhost.'/app/'.$path,['verify' => false,'form_params'=>['op'=>'update','data'=>"{$serverData}","key"=>$sync_key]]);
 		$message .=  $response->getBody()."<br>";
+		*/
 		
 	}