Skip to content
This repository has been archived by the owner on Dec 29, 2024. It is now read-only.

Commit

Permalink
Set base API URL to https
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael committed Jul 27, 2019
1 parent b058f71 commit ae76bb5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "millsoft/aceproject",
"description": "PHP Library for AceProject API.",
"keywords": ["aceproject", "api", "taskmanagerv"],
"keywords": ["aceproject", "api", "taskmanager"],
"license": "CC-BY-1.0",
"homepage": "https://github.com/millsoft/aceproject",
"version" : "0.12",
"authors": [
{
"name": "Michael Milawski",
Expand Down
6 changes: 3 additions & 3 deletions src/AceProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ class AceProject {
/** @var string $m_SampleProperty define here what this variable is for, do this for every instance variable */
protected $isLoggedIn = false;
private static $GUID = null;
private static $GUIDfile = __DIR__ . '/../.aceproject';

private static $apiUrl = "http://api.aceproject.com";
private static $apiUrl = "https://api.aceproject.com";
public static $lastError = null;

public static $subdomain = '';
Expand Down Expand Up @@ -43,7 +42,8 @@ public static function getGUID() {
//Try to read the GUID from file
//This will save us one API call

$own_guid_file = self::$GUIDfile . "_" . self::$subdomain;
$GUIDfile = __DIR__ . '/../.aceproject';
$own_guid_file = $GUIDfile . "_" . self::$subdomain;

if ( file_exists( $own_guid_file ) ) {
if(filemtime($own_guid_file) < (time()-259200)){
Expand Down
9 changes: 7 additions & 2 deletions src/tools/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@


class Tools {
public static $out_file = __DIR__ . "/out.txt";
public static $out_file = null;

public static function init(){
self::$out_file = __DIR__ . "/out.txt";
}

public static function extractParamsFromFile( $file = 'params.txt' ) {
$params_file = __DIR__ . "/" . $file;
Expand Down Expand Up @@ -38,7 +42,7 @@ public static function extractParams( $str ) {
$new[] = "'" . $match[1] . "' => " . $match[3];
}

$str = join( ",\n", $new );
$str = implode( ",\n", $new );

echo $str;

Expand Down Expand Up @@ -177,6 +181,7 @@ private static function cleanArrayVal( $ar ) {


//create new out file:
Tools::init();
file_put_contents(Tools::$out_file, "");

foreach($matches as $match){
Expand Down

0 comments on commit ae76bb5

Please sign in to comment.