]> git.nbdom.net Git - nb.git/commitdiff
bytes2h
authorNicolas Boisselier <nicolas.boisselier@semantico.com>
Fri, 1 Jul 2016 08:41:41 +0000 (09:41 +0100)
committerNicolas Boisselier <nicolas.boisselier@semantico.com>
Fri, 1 Jul 2016 08:41:41 +0000 (09:41 +0100)
etc/dbs/ui.php
etc/profile.d/functions
lib/perl/NB/Functions.pm

index 8da2799ff8516c6172a9d148b95aa7a08a4f11b0..d7a3216181a58d6d994093a166d69d9b98bab0f7 100644 (file)
@@ -170,7 +170,7 @@ $CONF['ui-mysql'] = array(
   'type' => 'mysql',
   'name' => 'ui',
   'pdo' => '',
-  '_import' => array('_ui'),
+  '_import' => array('_ui','_semadm'),
 );
 #bye(realpath(dirname(__FILE__).'/../../lib/php/db.php'));
 #require_once(realpath(dirname(__FILE__).'/../../lib/php/db/types/sqlite.php'));
index 35311c02cc1b47a2ffd2451648c46938b184d0c8..ccf8a71a0568aa59f601fcbb2431506e42b836ab 100644 (file)
@@ -144,14 +144,14 @@ bytes2h() {
   [ -z "$@" ] || in="echo $@"
 
   $in | perl -pe 'BEGIN{
-  use NB::Functions qw/&oct2h/;
+  use NB::Functions qw/&bytes2h/;
   $exp = "([\\d\\.]+)";
   if (@ARGV and $ARGV[0] =~ /regex=(\S+)/) {
     shift @ARGV;
     $exp = $1;
   }
 };
-s/$exp/oct2h($1*1024)/ge;
+s/$exp/bytes2h($1)/ge;
 ' $args
 }
 
index 24e337922ae56ecaf2afb1ff21188f345630b872..e89eda029c742f16eb4d08badc5c05a5eac9b3de 100644 (file)
@@ -167,7 +167,7 @@ our %CHAR_ENTITIES = (
        &epoch2date
        &price_from_to
        &sec2h
-       &oct2h
+       &bytes2h
        &mysql_exec
        &table_get_no_primaries
        &table_get_primaries
@@ -274,7 +274,7 @@ sub sec2h {
 
 }
 
-sub oct2h {
+sub bytes2h {
 
        my $o = shift @_;