Uniformize link to stripe.lib

This commit is contained in:
Alexandre SPANGARO 2017-04-29 07:34:30 +02:00
parent 586ea54bfc
commit d73374cc5b
5 changed files with 31 additions and 35 deletions

View File

@ -20,7 +20,7 @@ define("NOLOGIN",1);
define("NOCSRFCHECK",1);
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/stripe.lib.php';
require_once DOL_DOCUMENT_ROOT.'/stripe/lib/stripe.lib.php';
require_once DOL_DOCUMENT_ROOT.'/public/stripe/config.php';
require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php';

View File

@ -25,7 +25,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/stripe.lib.php';
require_once DOL_DOCUMENT_ROOT.'/stripe/lib/stripe.lib.php';
require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php';
//use \includes\stripe as stripe;

View File

@ -23,7 +23,7 @@
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/stripe.lib.php';
require_once DOL_DOCUMENT_ROOT.'/stripe/lib/stripe.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';

View File

View File

@ -21,7 +21,35 @@
* \brief Library for common stripe functions
*/
/**
* Define head array for tabs of stripe tools setup pages
*
* @return Array of head
*/
function stripeadmin_prepare_head()
{
global $langs, $conf;
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT."/stripe/admin/stripe.php";
$head[$h][1] = $langs->trans("Stripe");
$head[$h][2] = 'stripeaccount';
$h++;
$object=new stdClass();
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
// $this->tabs = array('entity:-tabname); to remove a tab
complete_head_from_modules($conf,$langs,$object,$head,$h,'stripeadmin');
complete_head_from_modules($conf,$langs,$object,$head,$h,'stripeadmin','remove');
return $head;
}
/**
* Show header
@ -70,38 +98,6 @@ function llxFooterStripe()
print "</html>\n";
}
/**
* Define head array for tabs of stripe tools setup pages
*
* @return Array of head
*/
function stripeadmin_prepare_head()
{
global $langs, $conf;
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT."/stripe/admin/stripe.php";
$head[$h][1] = $langs->trans("Stripe");
$head[$h][2] = 'stripeaccount';
$h++;
$object=new stdClass();
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
// $this->tabs = array('entity:-tabname); to remove a tab
complete_head_from_modules($conf,$langs,$object,$head,$h,'stripeadmin');
complete_head_from_modules($conf,$langs,$object,$head,$h,'stripeadmin','remove');
return $head;
}
/**
* Return string with full Url
*