From 722f1a1f288f4b589c2e894ed8936a9e6d2fc51a Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 1 Jul 2016 09:41:41 +0100 Subject: [PATCH] bytes2h --- etc/dbs/ui.php | 2 +- etc/profile.d/functions | 4 ++-- lib/perl/NB/Functions.pm | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/dbs/ui.php b/etc/dbs/ui.php index 8da2799f..d7a32161 100644 --- a/etc/dbs/ui.php +++ b/etc/dbs/ui.php @@ -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')); diff --git a/etc/profile.d/functions b/etc/profile.d/functions index 35311c02..ccf8a71a 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -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 } diff --git a/lib/perl/NB/Functions.pm b/lib/perl/NB/Functions.pm index 24e33792..e89eda02 100644 --- a/lib/perl/NB/Functions.pm +++ b/lib/perl/NB/Functions.pm @@ -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 @_; -- 2.47.3