Merge branch 'master' into composer

This commit is contained in:
FrancescoUK
2016-09-07 19:31:52 +01:00
10 changed files with 60 additions and 87 deletions

View File

@@ -1,13 +1,22 @@
Before submitting an issue please make sure you tick (add a x between the square brakets) and agree all the following check boxes:
### New Feature or Enhacement
- [ ] Checked the current issues database and no similar issue was already discussed
- [ ] Read the README, WHATS_NEW and UPGRADE
- [ ] Read the FAQ (https://github.com/jekkos/opensourcepos#faq) for any known install and/or upgrade gotchas
- [ ] Reporting an issue of an unmodified OSPOS installation
- [ ] Ran any database upgrade scripts (e.g. database/2.4_to_3.0.sql)
- [ ] PHP version is at least 5.5 and not 7.x
- [ ] Know the version of OSPOS and git commit hash (check the footer of your OSPOS) and will add to my issue report
- [ ] Know the name and version of OS, Web server and MySQL and will add to my issue report
For new Features or Enhacements please remove all the template text and clearly write your proposal.
It's important to state whether you expect the community to implement it or you will contribute the work.
Please bear in mind that we will implement new features only on the current code, there is no support for old versions.
### Issue, Question or Bug
Before submitting an issue please make sure you remove the first section of the template and you tick (add a x between the square brakets) and agree with all the following check boxes:
- [] Checked the current issues database and no similar issue was already discussed
- [] Read the README, WHATS_NEW and UPGRADE
- [] Read the FAQ (https://github.com/jekkos/opensourcepos#faq) for any known install and/or upgrade gotchas (in specific PHP has php5-gd, php-intl and sockets installed)
- [] Reporting an issue of an unmodified OSPOS installation
- [] Ran any database upgrade scripts (e.g. database/2.4_to_3.0.sql)
- [] PHP version is at least 5.5 and not 7.x
- [] Know the version of OSPOS and git commit hash (check the footer of your OSPOS) and will add to my issue report
- [] Know the name and version of OS, Web server and MySQL and will add to my issue report
IMPORTANT: If you remove the template when submitting an issue your issue will be closed.

View File

@@ -130,3 +130,5 @@ FAQ
* You are getting following error `Message: Can't use method return value in write context` saying that you are probably using PHP7 which is not completely supported yet. Check your hosting configuration to verify whether you have a supported PHP version installed
* If you read errors containing messages with Socket word in it, please make sure you have installed PHP Sockets support (e.g. Goto PHP.ini and make sure all the needed modules are not commented out. this means php5-gd ,php-intl and sockets. Restart the web server)

View File

@@ -1,21 +1,26 @@
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
function pdf_create($html, $filename='', $stream=TRUE)
function pdf_create($html, $filename = '', $stream = TRUE)
{
// need to enable magic quotes for the
$magic_quotes_enabled = get_magic_quotes_runtime();
// need to enable magic quotes for the
$magic_quotes_enabled = get_magic_quotes_runtime();
if(!$magic_quotes_enabled)
{
ini_set("magic_quotes_runtime", true);
}
$dompdf = new Dompdf\Dompdf();
$dompdf->load_html($html);
$dompdf->loadHtml($html);
$dompdf->render();
ini_set("magic_quotes_runtime", $magic_quotes_enabled);
if ($stream) {
if ($stream)
{
$dompdf->stream($filename.".pdf");
} else {
}
else
{
return $dompdf->output();
}
}

View File

@@ -10,7 +10,7 @@ class Tracking_lib
$this->CI =& get_instance();
$clientId = $this->CI->Appconfig->get('client_id');
/**
* Setup the class
* optional
@@ -27,20 +27,13 @@ class Tracking_lib
)
);
try
$this->tracking = new \Racecore\GATracking\GATracking('UA-82359828-1', $options);
if(empty($clientId))
{
$this->tracking = new \Racecore\GATracking\GATracking('UA-82359828-1', $options);
if(empty($clientId))
{
$clientId = $this->tracking->getClientId();
$clientId = $this->tracking->getClientId();
$this->CI->Appconfig->batch_save(array('client_id' => $clientId));
}
}
finally
{
$this->CI->Appconfig->batch_save(array('client_id' => $clientId));
}
}
@@ -61,9 +54,9 @@ class Tracking_lib
return $this->tracking->sendTracking($event);
}
finally
catch(Exception $e)
{
error_log($e->getMessage());
}
}
@@ -87,9 +80,9 @@ class Tracking_lib
return $this->tracking->sendTracking($event);
}
finally
catch(Exception $e)
{
error_log($e->getMessage());
}
}
}

View File

@@ -41,7 +41,7 @@
"chartist-plugin-pointlabels": "^0.0.4",
"chartist-plugin-tooltip": "^0.0.13",
"remarkable-bootstrap-notify": "^3.1.3",
"js-cookie": "^2.1.2",
"js-cookie": "^2.1.3",
"blockUI": "*"
},
"overrides": {

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2014 - 2016, British Columbia Institute of Technology
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -1 +0,0 @@
Code Igniter 3.1.0

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2014 Marco Rieger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1 +0,0 @@
GATracking 2.1.1

View File

@@ -18,23 +18,29 @@ class Socket extends Client\AbstractClientAdapter
* @param $endpoint
* @throws Exception\EndpointServerException
*/
private function createConenction($endpoint)
private function createConnection($endpoint)
{
// port
$port = $this->getOption('ssl') == true ? 443 : 80;
$connection = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_connect($connection, $endpoint['host'], $port);
if (!($connection = socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) {
$errorcode = socket_last_error();
$errormsg = socket_strerror($errorcode);
throw new Exception\EndpointServerException('Analytics Socket failure! Error:' . $errormsg);
}
if (!socket_connect($connection, $endpoint['host'], $port)) {
$errorcode = socket_last_error();
$errormsg = socket_strerror($errorcode);
throw new Exception\EndpointServerException('Analytics Host not reachable! Error:' . $errormsg);
}
socket_set_option($connection, SOL_SOCKET, SO_RCVTIMEO, array('sec' => self::READ_TIMEOUT, 'usec' => 0));
if ($this->getOption('async')) {
socket_set_nonblock($connection);
}
if (!$connection) {
throw new Exception\EndpointServerException('Analytics Host not reachable! Error:');
}
$this->connection = $connection;
}
@@ -60,7 +66,9 @@ class Socket extends Client\AbstractClientAdapter
// fwrite + check if fwrite was ok
if (!socket_write($this->connection, $header) || !socket_write($this->connection, $payloadString)) {
throw new Exception\EndpointServerException('Server closed connection unexpectedly');
$errorcode = socket_last_error();
$errormsg = socket_strerror($errorcode);
throw new Exception\EndpointServerException('Server closed connection unexpectedly' . $errormsg);
}
return $header;
@@ -103,7 +111,7 @@ class Socket extends Client\AbstractClientAdapter
// get endpoint
$endpoint = parse_url($url);
$this->createConenction($endpoint);
$this->createConnection($endpoint);
/** @var Request\TrackingRequest $request */
while ($requestCollection->valid()) {