aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel/Shared.pm
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-10-05 12:06:00 +0200
committerAngelo Naselli <anaselli@linux.it>2014-10-05 12:06:00 +0200
commit5b42f3332afcc5f42e9c028113af0ad65a5acf23 (patch)
treeb5ce56e7fcc80ad9dddd6e9e63dcb6c15357ce91 /lib/AdminPanel/Shared.pm
parent1c7b9933d1191049e49232194070f01882561a1f (diff)
downloadcolin-keep-5b42f3332afcc5f42e9c028113af0ad65a5acf23.tar
colin-keep-5b42f3332afcc5f42e9c028113af0ad65a5acf23.tar.gz
colin-keep-5b42f3332afcc5f42e9c028113af0ad65a5acf23.tar.bz2
colin-keep-5b42f3332afcc5f42e9c028113af0ad65a5acf23.tar.xz
colin-keep-5b42f3332afcc5f42e9c028113af0ad65a5acf23.zip
First attempt to move user management backend from the frontend
Diffstat (limited to 'lib/AdminPanel/Shared.pm')
-rw-r--r--lib/AdminPanel/Shared.pm29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/AdminPanel/Shared.pm b/lib/AdminPanel/Shared.pm
index b6c8fe1..5103997 100644
--- a/lib/AdminPanel/Shared.pm
+++ b/lib/AdminPanel/Shared.pm
@@ -89,6 +89,9 @@ our @EXPORT = qw(
distName
apcat
find
+ inArray
+ disable_x_screensaver
+ enable_x_screensaver
);
@@ -214,6 +217,32 @@ sub trim {
return $st;
}
+#=============================================================
+
+=head2 inArray
+
+=head3 INPUT
+
+ $self: this object
+ $item: item to search
+ $arr: array container
+
+=head3 OUTPUT
+
+ true: if the array contains the item
+
+=head3 DESCRIPTION
+
+This method returns if an item is into the array container
+
+=cut
+
+#=============================================================
+sub inArray {
+ my ($self, $item, $arr) = @_;
+
+ return grep( /^$item$/, @{$arr} );
+}
#=============================================================