2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Maxime Kohlhaas
2013-07-10 15:44:53 +02:00
parent 8f72e16444
commit cfc999a06d
4 changed files with 98 additions and 98 deletions

View File

@@ -90,7 +90,7 @@ if (! empty($conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE))
} }
else else
{ {
if (function_exists('geoip_country_code_by_name')) $geointernal=true; if (function_exists('geoip_country_code_by_name')) $geointernal=true;
} }
// Mode // Mode

View File

@@ -22,8 +22,8 @@
require '../../main.inc.php'; require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
$langs->load("admin"); $langs->load("admin");
$langs->load("install"); $langs->load("install");
@@ -55,18 +55,18 @@ print $langs->trans("YouMayFindPerfAdviceHere",'http://wiki.dolibarr.org/index.p
print '<br>'; print '<br>';
print '<strong>'.$langs->trans("XDebug").'</strong>: '; print '<strong>'.$langs->trans("XDebug").'</strong>: ';
$test=!function_exists('xdebug_is_enabled'); $test=!function_exists('xdebug_is_enabled');
if ($test) print img_picto('','tick.png').' '.$langs->trans("NotInstalled"); if ($test) print img_picto('','tick.png').' '.$langs->trans("NotInstalled");
else else
{ {
print img_picto('','warning').' '.$langs->trans("XDebugInstalled"); print img_picto('','warning').' '.$langs->trans("XDebugInstalled");
print $langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/xdebug.php'.'">XDebug admin page</a>'; print $langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/xdebug.php'.'">XDebug admin page</a>';
} }
print '<br>'; print '<br>';
// Applicative cache // Applicative cache
print '<br>'; print '<br>';
print '<strong>'.$langs->trans("ApplicativeCache").'</strong>: '; print '<strong>'.$langs->trans("ApplicativeCache").'</strong>: ';
$test=!empty($conf->memcached->enabled); $test=!empty($conf->memcached->enabled);
if ($test) if ($test)
{ {
if (!empty($conf->global->MEMCACHED_SERVER)) if (!empty($conf->global->MEMCACHED_SERVER))
@@ -78,28 +78,28 @@ if ($test)
{ {
print img_picto('','warning').' '.$langs->trans("MemcachedModuleAvailableButNotSetup"); print img_picto('','warning').' '.$langs->trans("MemcachedModuleAvailableButNotSetup");
} }
} }
else print img_picto('','warning').' '.$langs->trans("MemcachedNotAvailable"); else print img_picto('','warning').' '.$langs->trans("MemcachedNotAvailable");
print '</br>'; print '</br>';
// OPCode cache // OPCode cache
print '<br>'; print '<br>';
print '<strong>'.$langs->trans("OPCodeCache").'</strong>: '; print '<strong>'.$langs->trans("OPCodeCache").'</strong>: ';
$test1=function_exists('xcache_info'); $test1=function_exists('xcache_info');
if ($test1) if ($test1)
{ {
print img_picto('','tick.png').' '.$langs->trans("XCacheInstalled"); print img_picto('','tick.png').' '.$langs->trans("XCacheInstalled");
print $langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/xcache.php'.'">Xcache admin page</a>'; print $langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/xcache.php'.'">Xcache admin page</a>';
} }
else else
{ {
$test2=function_exists('eaccelerator_info'); $test2=function_exists('eaccelerator_info');
if ($test2) print img_picto('','tick.png').' '.$langs->trans("EAcceleratorInstalled"); if ($test2) print img_picto('','tick.png').' '.$langs->trans("EAcceleratorInstalled");
else print $langs->trans("NoOPCodeCacheFound"); else print $langs->trans("NoOPCodeCacheFound");
} }
print '<br>'; print '<br>';
// HTTPCacheStaticResources // HTTPCacheStaticResources
print '<script type="text/javascript" language="javascript"> print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
var getphpurl; var getphpurl;
@@ -360,28 +360,28 @@ print '<div id="httpcachejsphpko">'.img_picto('','warning.png').' '.$langs->tran
print '<br>'; print '<br>';
print '<strong>'.$langs->trans("HTTPCacheStaticResources").' - '; print '<strong>'.$langs->trans("HTTPCacheStaticResources").' - ';
print $langs->trans("CacheByClient").':</strong><br>'; print $langs->trans("CacheByClient").':</strong><br>';
print $langs->trans("TestNotPossibleWithCurrentBrowsers").'<br>'; print $langs->trans("TestNotPossibleWithCurrentBrowsers").'<br>';
// Compressions // Compressions
print '<br>'; print '<br>';
print '<strong>'.$langs->trans("CompressionOfResources").'</strong>: '; print '<strong>'.$langs->trans("CompressionOfResources").'</strong>: ';
//$tmp=getURLContent(DOL_URL_ROOT.'/index.php','GET');var_dump($tmp); //$tmp=getURLContent(DOL_URL_ROOT.'/index.php','GET');var_dump($tmp);
print '<br>'; print '<br>';
// on PHP // on PHP
print '<div id="httpcompphpok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'php (.php)').'</div>'; print '<div id="httpcompphpok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'php (.php)').'</div>';
print '<div id="httpcompphpko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'php (.php)').'</div>'; print '<div id="httpcompphpko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'php (.php)').'</div>';
// on rest // on rest
print '<div id="httpcompcssok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'css (.css)').'</div>'; print '<div id="httpcompcssok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'css (.css)').'</div>';
print '<div id="httpcompcssko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'css (.css)').'</div>'; print '<div id="httpcompcssko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'css (.css)').'</div>';
print '<div id="httpcompcssphpok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'css (.css.php)').'</div>'; print '<div id="httpcompcssphpok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'css (.css.php)').'</div>';
print '<div id="httpcompcssphpko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'css (.css.php)').'</div>'; print '<div id="httpcompcssphpko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'css (.css.php)').'</div>';
//print '<div id="httpcompimgok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'img (.png)').'</div>'; //print '<div id="httpcompimgok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'img (.png)').'</div>';
//print '<div id="httpcompimgko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'img (.png)').'</div>'; //print '<div id="httpcompimgko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'img (.png)').'</div>';
print '<div id="httpcompjsok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'javascript (.js)').'</div>'; print '<div id="httpcompjsok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'javascript (.js)').'</div>';
print '<div id="httpcompjsko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'javascript (.js)').'</div>'; print '<div id="httpcompjsko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'javascript (.js)').'</div>';
print '<div id="httpcompjsphpok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'javascript (.js.php)').'</div>'; print '<div id="httpcompjsphpok">'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'javascript (.js.php)').'</div>';
print '<div id="httpcompjsphpko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'javascript (.js.php)').'</div>'; print '<div id="httpcompjsphpko">'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'javascript (.js.php)').'</div>';
// Database driver // Database driver
print '<br>'; print '<br>';
@@ -389,60 +389,60 @@ print '<strong>'.$langs->trans("DriverType").'</strong>: ';
print '<br>'; print '<br>';
if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
{ {
$test=($conf->db->type == 'mysqli'); $test=($conf->db->type == 'mysqli');
if ($test) if ($test)
{ {
print img_picto('','tick.png').' '.$langs->trans("YouUseBestDriver",$conf->db->type); print img_picto('','tick.png').' '.$langs->trans("YouUseBestDriver",$conf->db->type);
} }
else else
{ {
print img_picto('','warning.png').' '.$langs->trans("YouDoNotUseBestDriver",$conf->db->type,'mysqli'); print img_picto('','warning.png').' '.$langs->trans("YouDoNotUseBestDriver",$conf->db->type,'mysqli');
} }
print '<br>'; print '<br>';
} }
// Product search // Product search
print '<br>';
print '<strong>'.$langs->trans("ProductSearch").'</strong>: ';
print '<br>'; print '<br>';
$tab = array(); print '<strong>'.$langs->trans("ProductSearch").'</strong>: ';
$sql = "SELECT COUNT(*) as nb"; print '<br>';
$sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $tab = array();
$resql=$db->query($sql); $sql = "SELECT COUNT(*) as nb";
if ($resql) $sql.= " FROM ".MAIN_DB_PREFIX."product as p";
$resql=$db->query($sql);
if ($resql)
{ {
$limitforoptim=10000; $limitforoptim=10000;
$num=$db->num_rows($resql); $num=$db->num_rows($resql);
if ($nb > $limitforoptim) if ($nb > $limitforoptim)
{ {
if (empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE)) if (empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE))
{ {
print img_picto('','warning.png').' '.$langs->trans("YouHaveXProductUseSearchOptim",$num); print img_picto('','warning.png').' '.$langs->trans("YouHaveXProductUseSearchOptim",$num);
} }
else else
{ {
print img_picto('','tick.png').' '.$langs->trans("YouHaveXProductAndSearchOptimOn",$num); print img_picto('','tick.png').' '.$langs->trans("YouHaveXProductAndSearchOptimOn",$num);
} }
} }
else else
{ {
print img_picto('','tick.png').' '.$langs->trans("NbOfProductIsLowerThanNoPb",$limitforoptim); print img_picto('','tick.png').' '.$langs->trans("NbOfProductIsLowerThanNoPb",$limitforoptim);
} }
print '<br>'; print '<br>';
$db->free($resql); $db->free($resql);
} }
// Browser // Browser
print '<br>'; print '<br>';
print '<strong>'.$langs->trans("Browser").'</strong>: '; print '<strong>'.$langs->trans("Browser").'</strong>: ';
var_dump($conf->browser); var_dump($conf->browser);
print '<br>'; print '<br>';
// Database statistics update // Database statistics update
print '<br>'; print '<br>';
print '<strong>'.$langs->trans("DatabaseStatistics").'</strong>: '; print '<strong>'.$langs->trans("DatabaseStatistics").'</strong>: ';
print '<br>'; print '<br>';
llxFooter(); llxFooter();

View File

@@ -556,20 +556,20 @@ class InterfaceActionsAuto
} }
// Projects // Projects
elseif ($action == 'PROJECT_CREATE') elseif ($action == 'PROJECT_CREATE')
{ {
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other"); $langs->load("other");
$langs->load("projects"); $langs->load("projects");
$langs->load("agenda"); $langs->load("agenda");
$object->actiontypecode='AC_OTH_AUTO'; $object->actiontypecode='AC_OTH_AUTO';
if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProjectCreatedInDolibarr",$object->ref); if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProjectCreatedInDolibarr",$object->ref);
$object->actionmsg=$langs->transnoentities("ProjectCreatedInDolibarr",$object->ref); $object->actionmsg=$langs->transnoentities("ProjectCreatedInDolibarr",$object->ref);
$object->actionmsg.="\n".$langs->transnoentities("Project").': '.$object->ref; $object->actionmsg.="\n".$langs->transnoentities("Project").': '.$object->ref;
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
$object->sendtoid=0; $object->sendtoid=0;
$ok=1; $ok=1;
} }
// If not found // If not found

View File

@@ -1,12 +1,12 @@
# Makefile for generating minified files # Makefile for generating minified files
.PHONY: all .PHONY: all
# we cheat and process all .js files instead of an exhaustive list # we cheat and process all .js files instead of an exhaustive list
all: $(patsubst %.js,%.min.js,$(filter-out %.min.js,$(wildcard *.js))) all: $(patsubst %.js,%.min.js,$(filter-out %.min.js,$(wildcard *.js)))
%.min.js: %.js %.min.js: %.js
yui-compressor $< -o $@ yui-compressor $< -o $@
test: test:
./node_modules/.bin/jshint *jquery.flot.js ./node_modules/.bin/jshint *jquery.flot.js