Skip to content

Commit

Permalink
Support PHP7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
reportico-web committed May 2, 2016
1 parent 546b441 commit c74ce74
Show file tree
Hide file tree
Showing 51 changed files with 491 additions and 238 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "reportico/laravel-reportico",
"description": "",
"version": "5.1.0",
"version": "5.2.0",
"authors": [
{
"name": "Reportico",
Expand All @@ -11,7 +11,7 @@
"license": "GPL-3.0",
"require": {
"php": ">=5.4.0",
"illuminate/support": "~5.1"
"illuminate/support": "~5.2"
},
"autoload": {
"classmap": [
Expand Down
4 changes: 2 additions & 2 deletions src/Reportico/Reportico/fpdf/ufpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class UFPDF extends FPDF
* Public methods *
* *
*******************************************************************************/
function UFPDF($orientation='P',$unit='mm',$format='A4')
function __construct($orientation='P',$unit='mm',$format='A4')
{
FPDF::FPDF($orientation, $unit, $format);
__parent::construct($orientation, $unit, $format);
}

function GetStringWidth($s)
Expand Down
4 changes: 2 additions & 2 deletions src/Reportico/Reportico/pChart/pCache.class
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
var $CacheFolder = "Cache/";

/* Create the pCache object */
function pCache($CacheFolder="Cache/")
function __construct($CacheFolder="Cache/")
{
$this->CacheFolder = $CacheFolder;
}
Expand Down Expand Up @@ -116,4 +116,4 @@
return(md5($mKey));
}
}
?>
?>
102 changes: 88 additions & 14 deletions src/Reportico/Reportico/reportico.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class reportico extends reportico_object
var $delete_project_url;
var $create_report_url;

var $version = "4.3";
var $version = "4.4";

var $name;
var $rowselection="all";
Expand Down Expand Up @@ -1422,18 +1422,18 @@ function set_request_columns()
}
else
{
$this->target_show_detail = true;
$this->target_show_graph = true;
$this->target_show_group_headers = true;
$this->target_show_group_trailers = true;
$this->target_show_column_headers = true;
$this->target_show_criteria = true;
set_reportico_session_param("target_show_detail",true);
set_reportico_session_param("target_show_graph",true);
set_reportico_session_param("target_show_group_headers",true);
set_reportico_session_param("target_show_group_trailers",true);
set_reportico_session_param("target_show_column_headers",true);
set_reportico_session_param("target_show_criteria",true);
//$this->target_show_detail = true;
//$this->target_show_graph = true;
//$this->target_show_group_headers = true;
//$this->target_show_group_trailers = true;
//$this->target_show_column_headers = true;
//$this->target_show_criteria = true;
//set_reportico_session_param("target_show_detail",true);
//set_reportico_session_param("target_show_graph",true);
//set_reportico_session_param("target_show_group_headers",true);
//set_reportico_session_param("target_show_group_trailers",true);
//set_reportico_session_param("target_show_column_headers",true);
//set_reportico_session_param("target_show_criteria",true);
}
}
else
Expand Down Expand Up @@ -3961,6 +3961,7 @@ function execute($mode=false, $draw=true)

case "MENU":
$this->handle_xml_query_input($mode);
$this->set_request_columns();
$this->build_menu();
load_mode_language_pack("languages", $this->output_charset);
load_mode_language_pack("menu", $this->output_charset);
Expand Down Expand Up @@ -6058,6 +6059,77 @@ function execute_criteria_lookup($in_is_expanding = false)
$g_code_area = "";
}


// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
function criteria_summary_text(&$label, &$value)
{
$label = "";
$value = "";

if ( isset($this->criteria_summary) && $this->criteria_summary )
{
$label = $this->derive_attribute("column_title", $this->query_name);
$value = $this->criteria_summary;
}
else
{
if ( get_request_item($name."_FROMDATE_DAY", "" ) )
{
$label = $this->derive_attribute("column_title", $this->query_name);
$label = sw_translate($label);
$mth = get_request_item($name."_FROMDATE_MONTH","") + 1;
$value = get_request_item($name."_FROMDATE_DAY","")."/".
$mth."/".
get_request_item($name."_FROMDATE_YEAR","");
if ( get_request_item($name."_TODATE_DAY", "" ) )
{
$mth = get_request_item($name."_TODATE_MONTH","") + 1;
$value .= "-";
$value .= get_request_item($name."_TODATE_DAY","")."/".
$mth."/".
get_request_item($name."_TODATE_YEAR","");
}
}
else if ( get_request_item("MANUAL_".$name."_FROMDATE", "" ) )
{
$label = $this->derive_attribute("column_title", $this->query_name);
$label = sw_translate($label);
$value = get_request_item("MANUAL_".$name."_FROMDATE","");
if ( get_request_item("MANUAL_".$name."_TODATE", "" ) )
{
$value .= "-";
$value .= get_request_item("MANUAL_".$name."_TODATE");
}

}
else if ( get_request_item("HIDDEN_".$name."_FROMDATE", "" ) )
{
$label = $this->derive_attribute("column_title", $this->query_name);
$label = sw_translate($label);
$value = get_request_item("HIDDEN_".$name."_FROMDATE","");
if ( get_request_item("HIDDEN_".$name."_TODATE", "" ) )
{
$value .= "-";
$value .= get_request_item("HIDDEN_".$name."_TODATE");
}

}
else if ( get_request_item("EXPANDED_".$name, "" ) )
{
$label = $this->derive_attribute("column_title", $this->query_name);
$label = sw_translate($label);
$value .= implode(get_request_item("EXPANDED_".$name, ""),",");
}
else if ( get_request_item("MANUAL_".$name, "" ) )
{
$label = $this->derive_attribute("column_title", $this->query_name);
$label = sw_translate($label);
$value .= get_request_item("MANUAL_".$name, "");
}
}
}

// -----------------------------------------------------------------------------
// Function : criteria_summary_display
//
Expand Down Expand Up @@ -7787,8 +7859,10 @@ static function reportico_meta_sql_criteria(&$in_query, $in_string, $prev_col_va
{
$crit = substr ( $crit, 1 );
$critexp = $crit;
$clause = "";
$label = "";
if ( array_key_exists($crit, $in_query->lookup_queries) )
$clause = $in_query->lookup_queries[$crit]->get_criteria_clause(false, false, true);
$clause = $in_query->lookup_queries[$crit]->criteria_summary_text($label,$clause);
else if ( $cl = get_query_column($crit, $this->query->columns ) )
if ( $prev_col_value )
$clause = $cl->old_column_value;
Expand Down
6 changes: 3 additions & 3 deletions src/Reportico/Reportico/reportico_adodb/adodb.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class ADOConnection {
/**
* Constructor
*/
function ADOConnection()
function __construct()
{
die('Virtual Class -- cannot instantiate');
}
Expand Down Expand Up @@ -2864,7 +2864,7 @@ class ADORecordSet implements IteratorAggregate {
* @param queryID this is the queryID returned by ADOConnection->_query()
*
*/
function ADORecordSet($queryID)
function __construct($queryID)
{
$this->_queryID = $queryID;
}
Expand Down Expand Up @@ -3853,7 +3853,7 @@ class ADORecordSet_array extends ADORecordSet
* Constructor
*
*/
function ADORecordSet_array($fakeid=1)
function __construct($fakeid=1)
{
global $ADODB_FETCH_MODE,$ADODB_COMPAT_FETCH;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ class ADODB_access extends ADODB_odbc {
var $hasTransactions = false;
var $upperCase = 'ucase';

function ADODB_access()
function __construct()
{
global $ADODB_EXTENSION;

$ADODB_EXTENSION = false;
$this->ADODB_odbc();
parent::__construct();

}

function Time()
Expand Down Expand Up @@ -78,10 +79,10 @@ class ADORecordSet_access extends ADORecordSet_odbc {

var $databaseType = "access";

function ADORecordSet_access($id,$mode=false)
function __construct($id,$mode=false)
{
return $this->ADORecordSet_odbc($id,$mode);
}
}// class
}
?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ADODB_ado extends ADOConnection {
var $poorAffectedRows = true;
var $charPage;

function ADODB_ado()
function __construct()
{
$this->_affectedRows = new VARIANT;
}
Expand Down Expand Up @@ -325,14 +325,14 @@ class ADORecordSet_ado extends ADORecordSet {
var $canSeek = true;
var $hideErrors = true;

function ADORecordSet_ado($id,$mode=false)
function __construct($id,$mode=false)
{
if ($mode === false) {
global $ADODB_FETCH_MODE;
$mode = $ADODB_FETCH_MODE;
}
$this->fetchMode = $mode;
return $this->ADORecordSet($id,$mode);
return parent::__construct($id,$mode);
}


Expand Down Expand Up @@ -631,4 +631,4 @@ function _close() {

}

?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ADODB_ado extends ADOConnection {
var $poorAffectedRows = true;
var $charPage;

function ADODB_ado()
function __construct()
{
$this->_affectedRows = new VARIANT;
}
Expand Down Expand Up @@ -358,14 +358,14 @@ class ADORecordSet_ado extends ADORecordSet {
var $canSeek = true;
var $hideErrors = true;

function ADORecordSet_ado($id,$mode=false)
function __construct($id,$mode=false)
{
if ($mode === false) {
global $ADODB_FETCH_MODE;
$mode = $ADODB_FETCH_MODE;
}
$this->fetchMode = $mode;
return $this->ADORecordSet($id,$mode);
return __parent::constructor($id,$mode);
}


Expand Down Expand Up @@ -665,4 +665,4 @@ function _close() {

}

?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class ADODB_ado_access extends ADODB_ado {
var $hasTransactions = false;
var $upperCase = 'ucase';

function ADODB_ado_access()
function __construct()
{
$this->ADODB_ado();
parent::__construct();
}

function BeginTrans() { return false;}
Expand All @@ -47,9 +47,9 @@ class ADORecordSet_ado_access extends ADORecordSet_ado {

var $databaseType = "ado_access";

function ADORecordSet_ado_access($id,$mode=false)
function __construct($id,$mode=false)
{
return $this->ADORecordSet_ado($id,$mode);
return parent::__construct($id,$mode);
}
}
?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ class ADODB_ado_mssql extends ADODB_ado {

//var $_inTransaction = 1; // always open recordsets, so no transaction problems.

function ADODB_ado_mssql()
function __construct()
{
$this->ADODB_ado();
parent::__construct();

}

function _insertid()
Expand Down Expand Up @@ -146,9 +147,9 @@ class ADORecordSet_ado_mssql extends ADORecordSet_ado {

var $databaseType = 'ado_mssql';

function ADORecordSet_ado_mssql($id,$mode=false)
function __construct($id,$mode=false)
{
return $this->ADORecordSet_ado($id,$mode);
return parent::_construct($id,$mode);
}
}
?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ class ADODB_borland_ibase extends ADODB_ibase {
var $databaseType = "borland_ibase";


function ADODB_borland_ibase()
function __construct()
{
$this->ADODB_ibase();
parent::__construct();
}

function BeginTrans()
Expand Down Expand Up @@ -84,9 +84,9 @@ class ADORecordSet_borland_ibase extends ADORecordSet_ibase {

var $databaseType = "borland_ibase";

function ADORecordSet_borland_ibase($id,$mode=false)
function __construct($id,$mode=false)
{
$this->ADORecordSet_ibase($id,$mode);
parent::__construct($id,$mode);
}
}
?>
?>
Loading

0 comments on commit c74ce74

Please sign in to comment.