2
0
forked from Wavyzz/dolibarr

Debug v22

This commit is contained in:
ldestailleur
2025-06-06 02:09:42 +02:00
parent 04f1176d50
commit 67161c3980
7 changed files with 36 additions and 24 deletions

View File

@@ -1309,7 +1309,7 @@ if ($mode == 'marketplace') {
print '</td>';
print '<td class="center">';
if (!getDolGlobalString('MAIN_DISABLE_EXTERNALMODULES_COMMUNITY') && getDolGlobalInt('MAIN_ENABLE_EXTERNALMODULES_COMMUNITY')) {
$messagetoadd = '<br><br><span class="small">Content of the repository index file '.$remotestore->file_source_url.' is in the local cache file '.$remotestore->cache_file.'</span>';
$messagetoadd = '<br><br><span class="small">Content of the repository index file '.$remotestore->file_source_url.' is in the local cache file '.$remotestore->cache_file.' (Date: '.dol_print_date(dol_filemtime($remotestore->cache_file), 'dayhour', 'tzuserrel').')</span>';
print $remotestore->libStatus($remotestore->githubFileStatus, 2, $messagetoadd);
}
print '</td>';

View File

@@ -383,12 +383,12 @@ class ExternalModules
// check new product ?
$newapp = '';
if ($last_month < strtotime($product['datec'])) {
$newapp .= '<span class="newApp">'.$langs->trans('New').'</span> ';
$newapp .= '<span class="newApp" title="'.$product['tms'].'">'.$langs->trans('New').'</span> ';
}
// check updated ?
if ($last_month < strtotime($product['tms']) && $newapp == '') {
$newapp .= '<span class="updatedApp">'.$langs->trans('Updated').'</span> ';
$newapp .= '<span class="updatedApp" title="'.$product['tms'].'">'.$langs->trans('UpdatedRecently').'</span> ';
}
// add image or default ?
@@ -434,8 +434,8 @@ class ExternalModules
$version = '<span class="compatible">'.$langs->trans(
'CompatibleUpTo',
$dolibarrversiontouse,
(float) $product["dolibarr_min"],
(float) $product["dolibarr_max"]
$product["dolibarr_min"],
$product["dolibarr_max"]
).'</span>';
$compatible = '';
} else {
@@ -443,8 +443,8 @@ class ExternalModules
$version = '<span class="warning">'.$langs->trans(
'NotCompatible',
$dolibarrversiontouse,
(float) $product["dolibarr_min"],
(float) $product["dolibarr_max"]
$product["dolibarr_min"],
$product["dolibarr_max"]
).'</span>';
$compatible = 'NotCompatible';
}
@@ -454,8 +454,8 @@ class ExternalModules
$version = '<span class="warning">'.$langs->trans(
'NotCompatible',
$dolibarrversiontouse,
(float) $product["dolibarr_min"],
(float) $product["dolibarr_max"]
$product["dolibarr_min"],
$product["dolibarr_max"]
).'</span>';
$compatible = 'NotCompatible';
} else {
@@ -929,6 +929,12 @@ class ExternalModules
if ($source === 'dolistore') {
foreach ($data as $package) {
$urlphoto = $this->shop_url.$package['cover_photo_url'];
if (preg_match('/^\/?wrapper\.php\?hashp=/', $package['cover_photo_url']) && !preg_match('/attachment=/', $package['cover_photo_url'])) {
$urlphoto .= '&attachment=0';
}
$adaptedPackage = [
'id' => $package['id'],
'ref' => $package['ref'],
@@ -942,7 +948,7 @@ class ExternalModules
'phpmin' => $package['phpmin'],
'phpmax' => $package['phpmax'],
'module_version' => $package['module_version'],
'cover_photo_url' => $this->shop_url.$package['cover_photo_url'],
'cover_photo_url' => $urlphoto,
'source' => 'dolistore'
];

View File

@@ -4,8 +4,8 @@ table#list_of_modules {
}
.imgstore {
max-height:120px;
max-width: 120px;
box-shadow: 3px 3px 20px #ddd;
width: 120px;
/* box-shadow: 3px 3px 20px #ddd; */
}
div.divsearchfield {
@@ -19,6 +19,9 @@ div.divsearchfield {
.margeCote,.margeCoteDroite{
padding-left: 20px!important;
}
.margeCote {
padding-bottom: 10px;
}
.nomargesupinf{
margin-top: 0;
margin-bottom: 0;
@@ -88,6 +91,7 @@ div.divsearchfield {
overflow: hidden;
padding: 10px;
/* min-height: 100px; */
box-shadow: 1px 1px 6px #bbb;
}
.newApp, .updatedApp{
background-color: orange;
@@ -95,19 +99,18 @@ div.divsearchfield {
box-sizing: border-box;
color: white;
display: block;
font-size: 18px;
font-weight: bold;
left: -34px;
padding: 5px 0;
font-size: 0.8em;
left: -25px;
padding: 5px 20px 5px 20px;
position: absolute;
text-align: center;
text-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
top: 22px;
top: 20px;
transform: rotate(-45deg);
width: 150px;
width: 120px;
}
.updatedApp{
background-color: greenyellow;
background-color: #25a580;
}
.notcompatible {
color: red;

View File

@@ -930,11 +930,11 @@ print '<br>';
print '<strong>MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED</strong> = '.getDolGlobalString('MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED', '<span class="opacitymedium">'.$langs->trans("Undefined").' &nbsp; ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 0)</span>')."<br>";
print '<br>';
$examplecsprule = "frame-ancestors 'self'; img-src * data:; font-src *; default-src 'self' 'unsafe-inline' 'unsafe-eval' *.paypal.com *.stripe.com *.google.com *.googleapis.com *.google-analytics.com *.googletagmanager.com;";
$examplecsprule = "frame-ancestors 'self'; img-src * data:; font-src *; default-src 'self' 'unsafe-inline' 'unsafe-eval' *.paypal.com *.stripe.com *.google.com *.googleapis.com *.google-analytics.com *.googletagmanager.com *.dolistore.com *.githubusercontent.com";
print '<strong>MAIN_SECURITY_FORCECSPRO</strong> = '.getDolGlobalString('MAIN_SECURITY_FORCECSPRO', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' &nbsp; <span class="opacitymedium">('.$langs->trans("Example").': "'.$examplecsprule.'")</span><br>';
print '<br>';
$examplecsprule = "frame-ancestors 'self'; img-src * data:; font-src *; default-src 'self' 'unsafe-inline' 'unsafe-eval' *.paypal.com *.stripe.com *.google.com *.googleapis.com *.google-analytics.com *.googletagmanager.com;";
$examplecsprule = "frame-ancestors 'self'; img-src * data:; font-src *; default-src 'self' 'unsafe-inline' 'unsafe-eval' *.paypal.com *.stripe.com *.google.com *.googleapis.com *.google-analytics.com *.googletagmanager.com *.dolistore.com *.githubusercontent.com";
print '<strong>MAIN_SECURITY_FORCECSP</strong> = '.getDolGlobalString('MAIN_SECURITY_FORCECSP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' &nbsp; <span class="opacitymedium">('.$langs->trans("Example").': "'.$examplecsprule.'")</span><br>';
print '<br>';

View File

@@ -1029,8 +1029,8 @@ function newpopup(url, title) {
}
/**
* Function show document preview. It uses the "dialog" function.
* The a tag around the img must have the src='', class='documentpreview', mime='image/xxx', target='_blank' from getAdvancedPreviewUrl().
* Function to show a document preview popup. It uses the "dialog" function.
* The "a" tag around the "img" must have the src='', class='documentpreview', mime='image/xxx', target='_blank' from getAdvancedPreviewUrl().
*
* @param file Url
* @param type Mime file type ("image/jpeg", "application/pdf", "text/html")
@@ -1075,7 +1075,7 @@ function document_preview(file, type, title)
console.log("object_height="+object_height+" window height="+height);
if(object_height < height){
console.log("Object height is small, we set height of popup according to image height.");
height = object_height + 80
height = object_height + 100
}
else
{
@@ -1104,6 +1104,7 @@ function document_preview(file, type, title)
};
}
$("#dialogforpopup").addClass("center");
$("#dialogforpopup").html(newElem);
$("#dialogforpopup").dialog({

View File

@@ -1364,3 +1364,4 @@ Automatic=Automatic
Nobody=Nobody
Registered=Registered
ClickOnPlusToCreateOne=Click the "Plus" button to add one.
Free=Free

View File

@@ -458,3 +458,4 @@ GenerateImage=Generate image
GenerateWithAI=Generate with AI
PriceByCustomeAndMultiPricesAbility=Different prices for each customer + Multiple price segments per product/service (each customer is in one price segment)
WhenProductVirtualOnOptionAreForced=When virtual products option is on, automatic stock decrease is forced to 'Decrease real stocks on shipping validation' and automatic increase mode is forced to 'Increase real stocks on manual dispatching into warehouses' and can't be edited. Other options can be defined as you want.
UpdatedRecently=Updated recently