Skip to content

Commit

Permalink
More Minor Bug Fixes!
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr. Simon A. Xaies committed Jul 3, 2019
1 parent c9ec6d5 commit b44643a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apiconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@

mkdirSecure(API_PATH_IO_CACHE);
mkdirSecure(API_PATH_IO_REFEREE);
?>

require_once __DIR__ . DIRECTORY_SEPARATOR . 'protocols.php';
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ function jumpShortenURL($url = '')
unset($emails[$finger]);
}
}
$result = $jumps[$hash = md5($url.$referee.microtime(true))] = array("created" => microtime(true), "last" => microtime(true), 'inactive' => (API_DROP_DAYS_INACTIVE * (3600 * 24)), "short" => API_PROTOCOL.API_HOSTNAME.'/v2/'.$referee . (isset($_REQUEST['username']) && !empty($_REQUEST['username']) ? '?' . $_REQUEST['username'] :''), "domain" => API_PROTOCOL.$referee.'.'.API_HOSTNAME . (isset($_REQUEST['username']) && !empty($_REQUEST['username']) ? '/?' . $_REQUEST['username'] :''), 'url' => $url, 'referee' => $referee, 'timezone' => date_default_timezone_get(), 'data' => array('php' => API_PROTOCOL.$referee.'.'.API_HOSTNAME . '/data/php', 'json' => API_PROTOCOL.$referee.'.'.API_HOSTNAME . '/data/json', 'serial' => API_PROTOCOL.$referee.'.'.API_HOSTNAME . '/data/serial', 'xml' => API_PROTOCOL.$referee.'.'.API_HOSTNAME . '/data/xml'));
$result = $jumps[$hash = md5($url.$referee.microtime(true))] = array("created" => microtime(true), "last" => microtime(true), 'inactive' => (API_DROP_DAYS_INACTIVE * (3600 * 24)), "short" => API_ROOT_PROTOCOL.API_HOSTNAME.'/v2/'.$referee . (isset($_REQUEST['username']) && !empty($_REQUEST['username']) ? '?' . $_REQUEST['username'] :''), "domain" => API_SUB_PROTOCOL.$referee.'.'.API_HOSTNAME . (isset($_REQUEST['username']) && !empty($_REQUEST['username']) ? '/?' . $_REQUEST['username'] :''), 'url' => $url, 'referee' => $referee, 'timezone' => date_default_timezone_get(), 'data' => array('php' => API_SUB_PROTOCOL.$referee.'.'.API_HOSTNAME . '/data/php', 'json' => API_SUB_PROTOCOL.$referee.'.'.API_HOSTNAME . '/data/json', 'serial' => API_SUB_PROTOCOL.$referee.'.'.API_HOSTNAME . '/data/serial', 'xml' => API_SUB_PROTOCOL.$referee.'.'.API_HOSTNAME . '/data/xml'));
$emails[$hash] = array('create-username' => $_REQUEST['username'], 'email' => $_REQUEST['email'], 'callback-hits' => $_REQUEST['callback-hits'], 'callback-stats' => $_REQUEST['callback-stats'], 'callback-reports' => $_REQUEST['callback-reports'], 'callback-expires' => $_REQUEST['callback-expires']);
if (constant('API_DEPLOYMENT_CALLING') == true) {
$calls['create'][$hash][time()] = array_merge(array('ipdata' => $ipdata), $emails[$hash], $jumps[$hash], array('hostname' => parse_url(API_URL, PHP_URL_HOST)));
Expand Down
28 changes: 28 additions & 0 deletions protocols.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* Chronolabs REST Short Link URIs API
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Chronolabs Cooperative http://au.syd.labs.coop
* @license Academic + GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
* @package api
* @since 2.2.1
* @author Simon Roberts <[email protected]>
* @version 2.2.1
* @subpackage shortening-url
* @description Short Link URIs API
* @link http://internetfounder.wordpress.com
* @link http://sourceoforge.net/projects/chronolabsapis/files/jump.labs.coop
* @link https://github.com/Chronolabs-Cooperative/Jump-API-PHP
*/

define('API_ROOT_PROTOCOL', API_PROTOCOL);
define('API_SUB_PROTOCOL', API_PROTOCOL);


0 comments on commit b44643a

Please sign in to comment.