Commit 42c4fa5b authored by RobertPlummer's avatar RobertPlummer

[FIX] Removed deprecated code from invoices and removed install lib checks for...

[FIX] Removed deprecated code from invoices and removed install lib checks for profile, rely now on invoice items tracker
[NEW] Added tracker query lib definition to TikiLib
parent aba209f8
......@@ -82,6 +82,9 @@ class TikiLib extends TikiDb_Bridge
case 'trk':
global $trklib; require_once('lib/trackers/trackerlib.php');
return $libraries[$name] = $trklib;
case 'trkqry':
global $trkqrylib; require_once('lib/trackers/trackerquerylib.php');
return $libraries[$name] = $trkqrylib;
case 'wiki':
global $wikilib; include_once('lib/wiki/wikilib.php');
return $libraries[$name] = $wikilib;
......
<?php
require_once('tiki-setup.php');
require_once('lib/profilelib/installlib.php');
require_once('lib/profilelib/profilelib.php');
require_once('lib/trackers/trackerlib.php');
require_once('lib/trackers/trackerquerylib.php');
global $tikilib, $trklib, $trkqrylib;
$trklib = TikiLib::lib('trk');
$trkqrylib = TikiLib::lib('trkqry');
$access->check_feature('feature_invoice');
$access->check_permission('tiki_p_admin');
......
<?php
require_once('tiki-setup.php');
require_once('lib/profilelib/installlib.php');
require_once('lib/profilelib/profilelib.php');
require_once('lib/trackers/trackerlib.php');
require_once('lib/trackers/trackerquerylib.php');
global $tikilib, $trkqrylib;
$trklib = TikiLib::lib('trk');
$trkqrylib = TikiLib::lib('trkqry');
$access->check_feature('feature_invoice');
$access->check_permission('tiki_p_admin');
......
<?php
require_once('tiki-setup.php');
require_once('lib/profilelib/installlib.php');
require_once('lib/profilelib/profilelib.php');
require_once('lib/trackers/trackerquerylib.php');
global $tikilib, $trkqrylib;
$trklib = TikiLib::lib('trk');
$trkqrylib = TikiLib::lib('trkqry');
$access->check_feature('feature_invoice');
$access->check_permission('tiki_p_admin');
//check if profile is created
$installer = new Tiki_Profile_Installer();
$profile = Tiki_Profile::fromNames( "profiles.tiki.org","Invoice" );
if (!$installer->isInstalled( $profile )) {
if ($trklib->get_tracker_by_name("Invoice Items") < 1) {
$smarty->assign('msg', tra('You need to apply the "Invoice" profile'));
$smarty->display("error.tpl");
die;
......
<?php
require_once('tiki-setup.php');
require_once('lib/profilelib/installlib.php');
require_once('lib/profilelib/profilelib.php');
require_once('lib/trackers/trackerquerylib.php');
global $tikilib, $trkqrylib;
$trklib = TikiLib::lib('trk');
$trkqrylib = TikiLib::lib('trkqry');
$access->check_feature('feature_invoice');
$access->check_permission('tiki_p_admin');
//check if profile is created
$installer = new Tiki_Profile_Installer();
$profile = Tiki_Profile::fromNames( "profiles.tiki.org","Invoice" );
if (!$installer->isInstalled( $profile )) {
if ($trklib->get_tracker_by_name("Invoice Items") < 1) {
$smarty->assign('msg', tra('You need to apply the "Invoice" profile'));
$smarty->display("error.tpl");
die;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment