More information in shared memory area
This commit is contained in:
parent
651d0f8b2b
commit
08fad11a44
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -101,12 +101,19 @@ if (sizeof($shmoparray) > 0)
|
|||||||
{
|
{
|
||||||
$var=true;
|
$var=true;
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").'</td><td colspan="2">'.$langs->trans("NbOfEntries").'</td></tr>'."\n";
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>'.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").'</td>';
|
||||||
|
print '<td>'.$langs->trans("NbOfEntries").'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans("Address").'</td>';
|
||||||
|
print '</tr>'."\n";
|
||||||
|
|
||||||
foreach($shmoparray as $key => $val)
|
foreach($shmoparray as $key => $val)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var]."><td width=\"300\">".$key.'</td><td colspan="2">'.sizeof($val)."</td></tr>\n";
|
print "<tr ".$bc[$var]."><td width=\"300\">".$key.'</td>';
|
||||||
|
print '<td>'.sizeof($val)."</td>";
|
||||||
|
print '<td align="right">'.dol_getshmopaddress($key).'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -263,6 +263,7 @@ ModuleDisabled=Module disabled
|
|||||||
ModuleDisabledSoNoEvent=Module disabled so event never created
|
ModuleDisabledSoNoEvent=Module disabled so event never created
|
||||||
ConfirmPurge=Are you sure you want to execute this purge ?<br>This will delete definitely all your data files with no way to restore them (ECM files, attached files...).
|
ConfirmPurge=Are you sure you want to execute this purge ?<br>This will delete definitely all your data files with no way to restore them (ECM files, attached files...).
|
||||||
MinLength=Minimum length
|
MinLength=Minimum length
|
||||||
|
LanguageFilesCachedIntoShmopSharedMemory=Files .lang loaded in shared memory
|
||||||
|
|
||||||
# Modules
|
# Modules
|
||||||
Module0Name=Users & groups
|
Module0Name=Users & groups
|
||||||
|
|||||||
@ -47,6 +47,7 @@ ErrorFailedToSaveFile=Error, failed to save file.
|
|||||||
ErrorOnlyPngJpgSupported=Error, only .png and .jpg image format file are supported.
|
ErrorOnlyPngJpgSupported=Error, only .png and .jpg image format file are supported.
|
||||||
ErrorImageFormatNotSupported=Your PHP does not support functions to convert images of this format.
|
ErrorImageFormatNotSupported=Your PHP does not support functions to convert images of this format.
|
||||||
BackgroundColorByDefault=Default background color
|
BackgroundColorByDefault=Default background color
|
||||||
|
NbOfEntries=Nb of entries
|
||||||
GoToWikiHelpPage=Read online help (need Internet access)
|
GoToWikiHelpPage=Read online help (need Internet access)
|
||||||
GoToHelpPage=Read help
|
GoToHelpPage=Read help
|
||||||
RecordSaved=Record saved
|
RecordSaved=Record saved
|
||||||
|
|||||||
@ -263,6 +263,7 @@ ModuleDisabled=Module désactivé
|
|||||||
ModuleDisabledSoNoEvent=Module désactivé donc évênement jamais créé
|
ModuleDisabledSoNoEvent=Module désactivé donc évênement jamais créé
|
||||||
ConfirmPurge=Etes vous sur de vouloir réaliser cette purge ?<br>Ceci effacera définitivement toutes vos données fichier (espace GED, pièces jointes, etc...).
|
ConfirmPurge=Etes vous sur de vouloir réaliser cette purge ?<br>Ceci effacera définitivement toutes vos données fichier (espace GED, pièces jointes, etc...).
|
||||||
MinLength=Longueur minimale
|
MinLength=Longueur minimale
|
||||||
|
LanguageFilesCachedIntoShmopSharedMemory=Fichiers .lang en mémoire partagée
|
||||||
|
|
||||||
# Modules = undefined
|
# Modules = undefined
|
||||||
Module0Name = Utilisateurs & groupes
|
Module0Name = Utilisateurs & groupes
|
||||||
@ -310,7 +311,7 @@ Module58Desc = Intégration de ClickToDial
|
|||||||
Module59Name = Bookmark4u
|
Module59Name = Bookmark4u
|
||||||
Module59Desc = Ajoute fonction pour générer un compte Bookmark4u depuis un compte Dolibarr
|
Module59Desc = Ajoute fonction pour générer un compte Bookmark4u depuis un compte Dolibarr
|
||||||
Module70Name = Interventions
|
Module70Name = Interventions
|
||||||
Module70Desc = Gestion des interventions
|
Module70Desc = Gestion des interventions chez les tiers
|
||||||
Module75Name = Notes de frais et déplacements
|
Module75Name = Notes de frais et déplacements
|
||||||
Module75Desc = Gestion des notes de frais et déplacements
|
Module75Desc = Gestion des notes de frais et déplacements
|
||||||
Module80Name = Expéditions
|
Module80Name = Expéditions
|
||||||
|
|||||||
@ -47,6 +47,7 @@ ErrorFailedToSaveFile=Erreur, l'enregistrement du fichier a échoué.
|
|||||||
ErrorOnlyPngJpgSupported=Erreur, seuls les formats images .jpg et .png sont supportés.
|
ErrorOnlyPngJpgSupported=Erreur, seuls les formats images .jpg et .png sont supportés.
|
||||||
ErrorImageFormatNotSupported=Votre PHP ne supporte pas les fonctions de conversion de ce format d'image.
|
ErrorImageFormatNotSupported=Votre PHP ne supporte pas les fonctions de conversion de ce format d'image.
|
||||||
BackgroundColorByDefault=Couleur de fond
|
BackgroundColorByDefault=Couleur de fond
|
||||||
|
NbOfEntries=Nb d'entrées
|
||||||
GoToWikiHelpPage=Consulter l'aide (nécessite un accès internet)
|
GoToWikiHelpPage=Consulter l'aide (nécessite un accès internet)
|
||||||
GoToHelpPage=Consulter l'aide
|
GoToHelpPage=Consulter l'aide
|
||||||
RecordSaved=Enregistrement sauvegardé
|
RecordSaved=Enregistrement sauvegardé
|
||||||
|
|||||||
@ -34,6 +34,18 @@ $shmoffset=100;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** \brief Return shared memory address used to store dataset with key memoryid
|
||||||
|
* \param $memoryid Memory id of shared area
|
||||||
|
* \return int <0 if KO, Memoy address of shared memory for key
|
||||||
|
*/
|
||||||
|
function dol_getshmopaddress($memoryid)
|
||||||
|
{
|
||||||
|
global $shmkeys,$shmoffset;
|
||||||
|
if (empty($shmkeys[$memoryid])) return 0;
|
||||||
|
return $shmkeys[$memoryid]+$shmoffset;
|
||||||
|
}
|
||||||
|
|
||||||
/** \brief Return list of contents of all memory area shared
|
/** \brief Return list of contents of all memory area shared
|
||||||
* \return int 0=Nothing is done, <0 if KO, >0 if OK
|
* \return int 0=Nothing is done, <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
@ -59,7 +71,7 @@ function dol_getshmop($memoryid)
|
|||||||
global $shmkeys,$shmoffset;
|
global $shmkeys,$shmoffset;
|
||||||
|
|
||||||
if (empty($shmkeys[$memoryid]) || ! function_exists("shmop_open")) return 0;
|
if (empty($shmkeys[$memoryid]) || ! function_exists("shmop_open")) return 0;
|
||||||
$shmkey=($shmkeys[$memoryid]+$shmoffset);
|
$shmkey=dol_getshmopaddress($memoryid);;
|
||||||
//print 'dol_getshmop memoryid='.$memoryid." shmkey=".$shmkey."<br>\n";
|
//print 'dol_getshmop memoryid='.$memoryid." shmkey=".$shmkey."<br>\n";
|
||||||
$handle=@shmop_open($shmkey,'a',0,0);
|
$handle=@shmop_open($shmkey,'a',0,0);
|
||||||
if ($handle)
|
if ($handle)
|
||||||
@ -87,7 +99,7 @@ function dol_setshmop($memoryid,$data)
|
|||||||
|
|
||||||
//print 'dol_setshmop memoryid='.$memoryid."<br>\n";
|
//print 'dol_setshmop memoryid='.$memoryid."<br>\n";
|
||||||
if (empty($shmkeys[$memoryid]) || ! function_exists("shmop_write")) return 0;
|
if (empty($shmkeys[$memoryid]) || ! function_exists("shmop_write")) return 0;
|
||||||
$shmkey=$shmkeys[$memoryid]+$shmoffset;
|
$shmkey=dol_getshmopaddress($memoryid);
|
||||||
$newdata=serialize($data);
|
$newdata=serialize($data);
|
||||||
$size=strlen($newdata);
|
$size=strlen($newdata);
|
||||||
//print 'dol_setshmop memoryid='.$memoryid." shmkey=".$shmkey." newdata=".$size."bytes<br>\n";
|
//print 'dol_setshmop memoryid='.$memoryid." shmkey=".$shmkey." newdata=".$size."bytes<br>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user