Skip to content

Commit

Permalink
Merge branch 'master' of [email protected]:/DoliCloud/dolimods
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 6, 2024
2 parents 1afc111 + 080d37d commit 97b0436
Show file tree
Hide file tree
Showing 45 changed files with 3,732 additions and 267 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
# with:
# gh_event: ${{ github.event_name }}
phan:
if: false # disable phan, too complex to maintain stub file for the moment
uses: ./.github/workflows/phan.yml
secrets: inherit
# needs: [pre-commit]
Expand Down
3 changes: 2 additions & 1 deletion dev/tools/phan/stubs/dolibarr.php
Original file line number Diff line number Diff line change
Expand Up @@ -15711,9 +15711,10 @@ public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleI
* @param CommonObject $object Object we want to show links to
* @param string[] $restrictlinksto Restrict links to some elements, for example array('order') or array('supplier_order'). null or array() if no restriction.
* @param string[] $excludelinksto Do not show links of this type, for example array('order') or array('supplier_order'). null or array() if no exclusion.
* @param int<0,1> $nooutput 1=Return array with content instead of printing it.
* @return string HTML block
*/
public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array())
public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array(), $nooutput = 0)
{
}
/**
Expand Down
2 changes: 1 addition & 1 deletion htdocs/concatpdf/admin/concatpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
}

if ($action == 'save') {
dolibarr_set_const($db, 'CONCATPDF_PRESELECTED_MODELS', GETPOST('CONCATPDF_PRESELECTED_MODELS'), 'chaine', 0, '', 0);
dolibarr_set_const($db, 'CONCATPDF_PRESELECTED_MODELS', GETPOST('CONCATPDF_PRESELECTED_MODELS'), 'chaine', 0, '', $conf->entity);
}

/*
Expand Down
114 changes: 114 additions & 0 deletions htdocs/google/admin/google_other.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?php
/* Copyright (C) 2008-2011 Laurent Destailleur <[email protected]>
*/

/**
* \file htdocs/google/admin/google_an.php
* \ingroup google
* \brief Setup page for google module (Analytics)
*/

// Load Dolibarr environment
$res=0;
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
if (! $res && ! empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res=@include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
// Try main.inc.php into web root detected using web root caluclated from SCRIPT_FILENAME
$tmp=empty($_SERVER['SCRIPT_FILENAME'])?'':$_SERVER['SCRIPT_FILENAME'];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i]==$tmp2[$j]) { $i--; $j--; }
if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/main.inc.php")) $res=@include substr($tmp, 0, ($i+1))."/main.inc.php";
if (! $res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i+1)))."/main.inc.php")) $res=@include dirname(substr($tmp, 0, ($i+1)))."/main.inc.php";
// Try main.inc.php using relative path
if (! $res && file_exists("../../main.inc.php")) $res=@include "../../main.inc.php";
if (! $res && file_exists("../../../main.inc.php")) $res=@include "../../../main.inc.php";
if (! $res) die("Include of main fails");

require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
dol_include_once("/google/lib/google.lib.php");

if (!$user->admin) accessforbidden();

$langs->load("google@google");
$langs->load("admin");
$langs->load("other");

$def = array();
$actiontest = GETPOST("test");
$actionsave = GETPOST("save");



/*
* Actions
*/





/*
* View
*/


$form=new Form($db);
$formadmin=new FormAdmin($db);
$formother=new FormOther($db);

$help_url='EN:Module_Google_EN|FR:Module_Google|ES:Modulo_Google';
llxHeader('', $langs->trans("GoogleSetup"), $help_url);

$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("GoogleSetup"), $linkback, 'setup');
print '<br>';


print '<form name="googleconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';

$head=googleadmin_prepare_head();

dol_fiche_head($head, 'tabother', '', -1);

print '<div class="fichecenter">';

print '<span class="opacitymedium">'.$langs->trans("GoogleAddAnalyticsOnLogonPage").'</span><br>';
print '<br>';

print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';

print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter")."</td>";
print "<td>".$langs->trans("Value")."</td>";
print "<td>".$langs->trans("Example")."</td>";
print "</tr>";

// Google debug
print '<tr class="oddeven"><td>'.$langs->trans("GOOGLE_DEBUG").'</td>';
print '<td>';
print ajax_constantonoff('GOOGLE_DEBUG', array(), $conf->entity, 0, 0, 1);
print '</td>';
print '<td><span class="opacitymedium small">1</span></td>';
print '</tr>';

print "</table>";
print '</div>';

print '</div>';

dol_fiche_end();

print '<div align="center">';
//print '<input type="submit" name="save" class="button" value="'.$langs->trans("Save").'">';
print "</div>";

print "</form>\n";


dol_htmloutput_mesg($mesg);

llxFooter();

$db->close();
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

/**
* \file htdocs/core/modules/security/captcha/modCaptchaStandard.class.php
* \file htdocs/core/modules/security/captcha/modCaptchaGoogle.class.php
* \ingroup core
* \brief File to manage captcha generation according to dolibarr native code
*/
Expand Down
3 changes: 2 additions & 1 deletion htdocs/google/langs/en_US/google.lang
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,5 @@ CustomersOnly=Customers only
ProspectsOnly=Prospects only
RefreshEventFromGoogle=Refresh events from Google
Tool=Tool
DateExpiration=Expiration date
DateExpiration=Expiration date
GOOGLE_DEBUG=Enable additional logs specific to the Google module (dolibarr_google.* files)
4 changes: 4 additions & 0 deletions htdocs/google/lib/google.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ function googleadmin_prepare_head()
$head[$h][2] = 'tabanalytics';
$h++;
}
$head[$h][0] = dol_buildpath('/google/admin/google_other.php', 1) ;
$head[$h][1] = $langs->trans("Other");
$head[$h][2] = 'tabother';
$h++;

$head[$h][0] = 'about.php';
$head[$h][1] = $langs->trans("About");
Expand Down
7 changes: 3 additions & 4 deletions htdocs/helloasso/class/actions_helloasso.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public function doAddButton($parameters, &$object, &$action, $hookmanager)

if (!$error) {
$this->resprints = $resprints;
return 1; // or return 1 to replace standard code
return 0; // or return 1 to replace standard code
} else {
$this->errors[] = $error;
return -1;
Expand Down Expand Up @@ -741,12 +741,11 @@ public function getBankAccountPaymentMethod($parameters, &$object, &$action, $ho
}
}

if (!$error) {
if (!$error && $bankaccountid > 0) {
$this->results["bankaccountid"] = $bankaccountid;
return 1;
} else {
$this->errors[] = $langs->trans("BankAccountNotFound");
return -1;
return 0;
}
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions htdocs/payplugdolicloud/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CHANGELOG MODULE PAYPLUGDOLICLOUD FOR [DOLIBARR ERP CRM](https://www.dolibarr.org)

## 1.0

Initial version
96 changes: 96 additions & 0 deletions htdocs/payplugdolicloud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# PAYPLUGDOLICLOUD FOR [DOLIBARR ERP & CRM](https://www.dolibarr.org)

## Features

Provides a way to make an online checkout of any membership dues, donation, customer invoice or customer order with the PayPlug API.

<!--
![Screenshot payplugdolicloud](img/screenshot_payplugdolicloud.png?raw=true "PayplugDolicloud"){imgmd}
-->

Other external modules are available on [Dolistore.com](https://www.dolistore.com).

## Translations

Translations can be completed manually by editing files in the module directories under `langs`.

<!--
This module contains also a sample configuration for Transifex, under the hidden directory [.tx](.tx), so it is possible to manage translation using this service.
For more information, see the [translator's documentation](https://wiki.dolibarr.org/index.php/Translator_documentation).
There is a [Transifex project](https://transifex.com/projects/p/dolibarr-module-template) for this module.
-->


## Installation

Prerequisites: You must have the Dolibarr ERP CRM software installed. You can download it from [Dolibarr.org](https://www.dolibarr.org).
You can also get a ready to use instance in the cloud from [Dolicloud.com](https://www.dolicloud.com/fr/fr.php)


### From the ZIP file and GUI interface

If the module is a ready-to-deploy zip file, so with a name `module_xxx-version.zip` (e.g., when downloading it from a marketplace like [Dolistore](https://www.dolistore.com)),
go to menu `Home> Setup> Modules> Deploy external module` and upload the zip file.

Note: If this screen tells you that there is no "custom" directory, check that your setup is correct:

<!--
- In your Dolibarr installation directory, edit the `htdocs/conf/conf.php` file and check that following lines are not commented:
```php
//$dolibarr_main_url_root_alt ...
//$dolibarr_main_document_root_alt ...
```
- Uncomment them if necessary (delete the leading `//`) and assign the proper value according to your Dolibarr installation
For example :
- UNIX:
```php
$dolibarr_main_url_root_alt = '/custom';
$dolibarr_main_document_root_alt = '/var/www/Dolibarr/htdocs/custom';
```
- Windows:
```php
$dolibarr_main_url_root_alt = '/custom';
$dolibarr_main_document_root_alt = 'C:/My Web Sites/Dolibarr/htdocs/custom';
```
-->

<!--
### From a GIT repository
Clone the repository in `$dolibarr_main_document_root_alt/payplugdolicloud`
```shell
cd ....../custom
git clone [email protected]:gitlogin/payplugdolicloud.git payplugdolicloud
```
-->

### Final steps

Using your browser:

- Log into Dolibarr as a super-administrator
- Go to "Setup"> "Modules"
- You should now be able to find and enable the module



## Licenses

### Main code

GPLv3 or (at your option) any later version. See file COPYING for more information.

### Documentation

All texts and readme's are licensed under [GFDL](https://www.gnu.org/licenses/fdl-1.3.en.html).
Loading

0 comments on commit 97b0436

Please sign in to comment.