summaryrefslogtreecommitdiffstats
path: root/lib/class/access.class.php
diff options
context:
space:
mode:
authorPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-03-14 06:10:27 +0000
committerPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-03-14 06:10:27 +0000
commitd78c207f76c8ae57744300611519f4c85c2c34c4 (patch)
tree7a29bf59f4c3c9fc5f9f654ba86e6cd3f065a74f /lib/class/access.class.php
parent98c5c04643228731b1dcf0eb48fa3dbc77815ad6 (diff)
downloadampache-d78c207f76c8ae57744300611519f4c85c2c34c4.tar.gz
ampache-d78c207f76c8ae57744300611519f4c85c2c34c4.tar.bz2
ampache-d78c207f76c8ae57744300611519f4c85c2c34c4.zip
Cosmetics: use tabs for indentation, tweak some indentation/coding style.
Diffstat (limited to 'lib/class/access.class.php')
-rw-r--r--lib/class/access.class.php52
1 files changed, 26 insertions, 26 deletions
diff --git a/lib/class/access.class.php b/lib/class/access.class.php
index 558b8fc0..3652715d 100644
--- a/lib/class/access.class.php
+++ b/lib/class/access.class.php
@@ -94,24 +94,24 @@ class Access {
*/
public function update($data) {
- /* We need to verify the incomming data a littlebit */
- $start = @inet_pton($data['start']);
- $end = @inet_pton($data['end']);
-
- if (!$start AND $data['start'] != '0.0.0.0' AND $data['start'] != '::') {
- Error::add('start',_('Invalid IPv4 / IPv6 Address Entered'));
- return false;
- }
- if (!$end) {
- Error::add('end',_('Invalid IPv4 / IPv6 Address Entered'));
- return false;
- }
-
- if (strlen(bin2hex($start)) != strlen(bin2hex($end))) {
- Error::add('start',_('IP Address Version Mismatch'));
- Error::add('end',_('IP Address Version Mismatch'));
- return false;
- }
+ /* We need to verify the incomming data a littlebit */
+ $start = @inet_pton($data['start']);
+ $end = @inet_pton($data['end']);
+
+ if (!$start AND $data['start'] != '0.0.0.0' AND $data['start'] != '::') {
+ Error::add('start',_('Invalid IPv4 / IPv6 Address Entered'));
+ return false;
+ }
+ if (!$end) {
+ Error::add('end',_('Invalid IPv4 / IPv6 Address Entered'));
+ return false;
+ }
+
+ if (strlen(bin2hex($start)) != strlen(bin2hex($end))) {
+ Error::add('start',_('IP Address Version Mismatch'));
+ Error::add('end',_('IP Address Version Mismatch'));
+ return false;
+ }
$name = Dba::escape($data['name']);
$type = self::validate_type($data['type']);
@@ -224,14 +224,14 @@ class Access {
return Config::get('download');
break ;
case 'batch_download':
- if (!function_exists('gzcompress')) {
- debug_event('gzcompress','ZLIB Extensions not loaded, batch download disabled','3');
- return false;
- }
- if (Config::get('allow_zip_download') AND $GLOBALS['user']->has_access('25')) {
- return Config::get('download');
- }
- break;
+ if (!function_exists('gzcompress')) {
+ debug_event('gzcompress','ZLIB Extensions not loaded, batch download disabled','3');
+ return false;
+ }
+ if (Config::get('allow_zip_download') AND $GLOBALS['user']->has_access('25')) {
+ return Config::get('download');
+ }
+ break;
default:
return false;
break;