summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Geiger2011-09-07 14:04:39 +0200
committerBjörn Geiger2011-09-07 14:04:39 +0200
commit3213098b5b3be6c3f00d458bfb967416ea4e61e5 (patch)
tree6e0280a716dcc4eb1bdd6130bc56f285413222d7
parentpoolctrl Rechte hinzugefügt (diff)
parentipv4 ipv6 check (diff)
downloadpbs2-3213098b5b3be6c3f00d458bfb967416ea4e61e5.tar.gz
pbs2-3213098b5b3be6c3f00d458bfb967416ea4e61e5.tar.xz
pbs2-3213098b5b3be6c3f00d458bfb967416ea4e61e5.zip
Merge branch 'master' of git.openslx.org:lsfks/projekte/pbs2
-rw-r--r--application/modules/fbgui/controllers/IndexController.php6
l---------library/Zend2
2 files changed, 7 insertions, 1 deletions
diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php
index 3f59873..5934a49 100644
--- a/application/modules/fbgui/controllers/IndexController.php
+++ b/application/modules/fbgui/controllers/IndexController.php
@@ -74,6 +74,12 @@ class Fbgui_IndexController extends Zend_Controller_Action
$client = new Application_Model_Client();
$client->setMacadress($mySession->postdata['mac']);
$client->setHardwarehash($mySession->postdata['hardwarehash']);
+ //check IPv4 / IPv6
+ if(preg_match('/^\d{1,3}(\.\d{1,3}){3,3}$/',$_SERVER['REMOTE_ADDR'])){
+ $client->setIp($_SERVER['REMOTE_ADDR']);
+ }else{
+ $client->setIp6($_SERVER['REMOTE_ADDR']);
+ }
$client->setGroupID($groupID);
$client->setCreated(time());
$client = $n->createClient($client);
diff --git a/library/Zend b/library/Zend
index c56249b..a826578 120000
--- a/library/Zend
+++ b/library/Zend
@@ -1 +1 @@
-/usr/share/php/libzend-framework-php/Zend/ \ No newline at end of file
+/usr/share/php/libzend-framework-php/Zend \ No newline at end of file