mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-15 22:11:36 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
@@ -3565,6 +3565,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $morehtml is the right part (link "Back to list")
|
// $morehtml is the right part (link "Back to list")
|
||||||
|
// $morehtmlref is the part after the ref
|
||||||
// $morehtmlleft is the picto or photo of banner
|
// $morehtmlleft is the picto or photo of banner
|
||||||
// $morehtmlstatus is part under the status
|
// $morehtmlstatus is part under the status
|
||||||
// $morehtmlright is part of htmlright
|
// $morehtmlright is part of htmlright
|
||||||
@@ -4351,11 +4352,13 @@ function getArrayOfSocialNetworks()
|
|||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/memory.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/memory.lib.php';
|
||||||
$cachekey = 'socialnetworks_' . $conf->entity;
|
$cachekey = 'socialnetworks_' . $conf->entity;
|
||||||
$dataretrieved = dol_getcache($cachekey);
|
$dataretrieved = dol_getcache($cachekey);
|
||||||
|
|
||||||
if (!is_null($dataretrieved)) {
|
if (!is_null($dataretrieved)) {
|
||||||
$socialnetworks = $dataretrieved;
|
$socialnetworks = $dataretrieved;
|
||||||
} else {
|
} else {
|
||||||
$sql = "SELECT rowid, code, label, url, icon, active FROM " . MAIN_DB_PREFIX . "c_socialnetworks";
|
$sql = "SELECT rowid, code, label, url, icon, active FROM " . MAIN_DB_PREFIX . "c_socialnetworks";
|
||||||
$sql .= " WHERE entity =" . ((int) $conf->entity);
|
$sql .= " WHERE entity = " . ((int) $conf->entity);
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
while ($obj = $db->fetch_object($resql)) {
|
while ($obj = $db->fetch_object($resql)) {
|
||||||
|
|||||||
@@ -204,11 +204,11 @@ function dol_getcache($memoryid, $filecache = 0)
|
|||||||
//print "Get memoryid=".$memoryid;
|
//print "Get memoryid=".$memoryid;
|
||||||
$data = $m->get($memoryid);
|
$data = $m->get($memoryid);
|
||||||
$rescode = $m->getResultCode();
|
$rescode = $m->getResultCode();
|
||||||
//print "memoryid=".$memoryid." - rescode=".$rescode." - count(response)=".count($data)."\n<br>";
|
//print "memoryid=".$memoryid." - rescode=".$rescode." - count(response)=".json_encode($data)."\n<br>";
|
||||||
//var_dump($data);
|
//var_dump($data);
|
||||||
if ($rescode == 0) {
|
if ($rescode == 0) {
|
||||||
return $data;
|
return $data;
|
||||||
} elseif ($rescode == 16) { // = Memcached::MEMCACHED_NOTFOUND but this constant doe snot exists.
|
} elseif ($rescode == 16) { // = Memcached::MEMCACHED_NOTFOUND but this constant does not exists.
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return -$rescode;
|
return -$rescode;
|
||||||
|
|||||||
Reference in New Issue
Block a user