diff --git a/htdocs/public/stripe/checkout.php b/htdocs/public/stripe/checkout.php index 4bea80bce6c..3f0b6f84016 100644 --- a/htdocs/public/stripe/checkout.php +++ b/htdocs/public/stripe/checkout.php @@ -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'; diff --git a/htdocs/public/stripe/config.php b/htdocs/public/stripe/config.php index ac315762b29..b94617b4c69 100644 --- a/htdocs/public/stripe/config.php +++ b/htdocs/public/stripe/config.php @@ -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; diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index 4da06e61de8..1882d1065b0 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -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'; diff --git a/htdocs/stripe/lib/index.html b/htdocs/stripe/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/lib/stripe.lib.php b/htdocs/stripe/lib/stripe.lib.php similarity index 99% rename from htdocs/core/lib/stripe.lib.php rename to htdocs/stripe/lib/stripe.lib.php index 175df3554ce..0ab73437e17 100644 --- a/htdocs/core/lib/stripe.lib.php +++ b/htdocs/stripe/lib/stripe.lib.php @@ -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 "\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 *