Skip to content

Commit

Permalink
1. Utility: Fix the symbolic path
Browse files Browse the repository at this point in the history
  • Loading branch information
dongnl committed Feb 13, 2019
1 parent ed4ccee commit c72f068
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## Version 3.25.1

1. `Utility`: Fix the symbolic path

## Version 3.25.0

1. `Table`: Adding `css` and `cssStyle` options for group row.
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# Changelog

* [Version 3.25.1 (Feb 13st, 2019)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.25.1)
* [Version 3.25.0 (Feb 11st, 2019)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.25.0)
* [Version 3.1.0 (Nov 17rd, 2018)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.1.0)
* [Version 3.0.0 (Nov 13rd, 2018)](https://www.koolreport.com/docs/koolreport/change_log/#version-3.0.0)
Expand Down Expand Up @@ -217,12 +218,12 @@ The KoolReport is licensed under MIT License.
* [Statistics](https://www.koolreport.com/packages/statistics): Provide various statistical measures for your data [__Free__]
* [Bootstrap3](https://www.koolreport.com/packages/bootstrap3): Create beautiful report with Bootstrap 3 [__Free__]
* [Bootstrap4](https://www.koolreport.com/packages/bootstrap3): Create modern report with Bootstrap 4 [__Free__]
* [Excel](https://www.koolreport.com/packages/excel): Import and export data to Excel [__$19__]
* [Cube](https://www.koolreport.com/packages/cube): Turn your data into two dimensions cross-tab table [__$19__]
* [Pivot](https://www.koolreport.com/packages/pivot): Build multi-dimenstional pivot table [__$49__]
* [Export](https://www.koolreport.com/packages/export): Export your report to PDF, JPG, PNG and other formats [__$29__]
* [Excel](https://www.koolreport.com/packages/excel): Import and export data to Excel [__$9__]
* [Cube](https://www.koolreport.com/packages/cube): Turn your data into two dimensions cross-tab table [__$9__]
* [Pivot](https://www.koolreport.com/packages/pivot): Build multi-dimenstional pivot table [__$29__]
* [Export](https://www.koolreport.com/packages/export): Export your report to PDF, JPG, PNG and other formats [__$19__]
* [Morris Chart](https://www.koolreport.com/packages/morris_chart): Use morris charts in your report [__$9__]
* [Inputs](https://www.koolreport.com/packages/inputs): A simplest way to build dynamic reports [__$29__]
* [Inputs](https://www.koolreport.com/packages/inputs): A simplest way to build dynamic reports [__$19__]
* [BarCode](https://www.koolreport.com/packages/barcode): Generate BarCode and QRCode [__$9__]
* [Sparklines](https://www.koolreport.com/packages/sparklines): Create tiny charts [__$9__]
* [DataGrid](https://www.koolreport.com/packages/datagrid): Display data in table format, search, sort, group data and more.. [__$19__]
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "koolphp/koolreport",
"version":"3.25.0",
"version":"3.25.1",
"description": "An Open Source PHP Reporting Framework for easier and faster report delivery.",
"keywords": ["php reporting framework","php reporting tools","data processing","data visualization","charts and graphs"],
"homepage": "https://www.koolreport.com",
Expand Down
9 changes: 5 additions & 4 deletions src/core/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,20 +480,21 @@ static function getDir($path)
*/
static function getSymbolicPath($realpath)
{
$root = $root = $_SERVER['DOCUMENT_ROOT'];
$root = $_SERVER['DOCUMENT_ROOT'];
$script = $_SERVER['SCRIPT_FILENAME'];
$root = str_replace('\\', '/', $root);
$script = str_replace('\\', '/', $script);
$realpath = str_replace('\\', '/', $realpath);

$dir = str_replace($root, '', $script);
$pos = false;
while ($dir !== '') {
$dir = self::getDir($dir);
$dir = self::getDir($dir);
while (! empty($dir)) {
$pos = strpos($realpath, $dir);
if ($pos) {
break;
}
$dir = self::getDir($dir);
}
if ($pos) {
$realpath = $root . substr($realpath, $pos);
Expand Down
2 changes: 1 addition & 1 deletion src/core/Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ protected function standardizeDataSource($dataSource, $args)
}

if ($dataSource instanceof DataStore) {
$finalDataSource = $dataSource->clone();
$finalDataSource = $dataSource;
} else if (($dataSource instanceof DataSource) || ($dataSource instanceof Process)) {
$finalDataSource = $this->onFurtherProcessRequest($dataSource)->pipe(new DataStore());
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/datasources/SQLSRVDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static function processQuery($query, $queryParams)
$search = Util::get($queryParams, 'search', '');
$searchSql = ! empty($search) ? "WHERE $search" : "";

$order = Util::get($queryParams, 'order', '');
$order = Util::get($queryParams, 'order', '1');
$orderSql = ! empty($order) ? "ORDER BY $order" : "";

$start = (int) Util::get($queryParams, 'start', 0);
Expand Down
2 changes: 1 addition & 1 deletion tests/_cases/cloudexport/simple/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

$report = new Report;
$report->run()->cloudExport()
->chromeHeadlessio("753edd18c907f25905778a7de9a02b564475629cbf7b04928c5edc445befec93")
->chromeHeadlessio("token-key")
->pdf()
->toBrowser("test.pdf");

0 comments on commit c72f068

Please sign in to comment.