Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix(TDM-1) : fix issue #1
  • Loading branch information
Pierre Trollé committed Apr 13, 2017
1 parent aafa47d commit 2e89019
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Webhook.php
Expand Up @@ -2,7 +2,7 @@
use \Dropbox as dbx;

function verify(){
echo $_GET['challenge'];
echo htmlspecialchars($_GET['challenge']);
}

function webhook(){
Expand Down Expand Up @@ -44,26 +44,26 @@ function delta($myCustomClient ,$cursortxt, $url, $pathPrefix){
file_put_contents($cursortxt,$deltaPage["cursor"]);

if($numAdds+$numRemoves>0){
header('Location: lib/ajax/'.$url.'.php?id='.$id);
header('Location: ../lib/ajax/'.$url.'.php?id='.$id);
}
}


function process_user(){
#'''Call /delta for the given user ID and process any changes.'''
// creation d'un client dropbox
include("lib/dropboxAPI.php");
include("../lib/dropboxAPI.php");
$myCustomClient = new dbx\Client($accessToken, $clientIdentifier);

//Articles
$pathPrefix="/Chargements appareil photo/ArticleTdm";
$cursortxt = "lib/cursor.txt";
$cursortxt = "../lib/cursor.txt";
$url="url";
delta($myCustomClient ,$cursortxt, $url, $pathPrefix);

//Challenge
$pathPrefix="/Chargements appareil photo/ChallengeTdm";
$cursortxt = "lib/cursorC.txt";
$cursortxt = "../lib/cursorC.txt";
$url="challenge_update";
delta($myCustomClient , $cursortxt, $url, $pathPrefix);
}
Expand Down
2 changes: 1 addition & 1 deletion webhook.php
Expand Up @@ -2,7 +2,7 @@
use \Dropbox as dbx;

function verify(){
echo $_GET['challenge'];
echo htmlspecialchars($_GET['challenge']);
}

function webhook(){
Expand Down

0 comments on commit 2e89019

Please sign in to comment.