Commit bfe5a992 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) whitespace rc.update_alias_url_data

parent a00e5194
#!/usr/local/bin/php
<?php
/*
Copyright (C) 2010 Scott Ullrich <sullrich@gmail.com>
All rights reserved.
......@@ -36,13 +35,13 @@ function update_alias_url_data()
global $config;
$updated = false;
/* item is a url type */
$lockkey = lock('aliasurl');
if (isset($config['aliases']['alias']) && is_array($config['aliases']['alias'])) {
foreach ($config['aliases']['alias'] as $x => $alias) {
if (empty($alias['aliasurl']))
if (empty($alias['aliasurl'])) {
continue;
}
$address = "";
$isfirst = 0;
......@@ -56,12 +55,14 @@ function update_alias_url_data()
/* if the item is tar gzipped then extract */
if (stripos($alias_url, '.tgz')) {
if (!process_alias_tgz($temp_filename))
if (!process_alias_tgz($temp_filename)) {
continue;
} else if (stripos($alias_url, '.zip')) {
if (!process_alias_unzip($temp_filename))
}
} elseif (stripos($alias_url, '.zip')) {
if (!process_alias_unzip($temp_filename)) {
continue;
}
}
if (file_exists("{$temp_filename}/aliases")) {
$fd = @fopen("{$temp_filename}/aliases", 'r');
if (!$fd) {
......@@ -71,13 +72,16 @@ function update_alias_url_data()
/* NOTE: fgetss() is not a typo RTFM before being smart */
while (($fc = fgetss($fd)) !== FALSE) {
$tmp = trim($fc, " \t\n\r");
if (empty($tmp))
if (empty($tmp)) {
continue;
}
$tmp_str = strstr($tmp, '#', true);
if (!empty($tmp_str))
if (!empty($tmp_str)) {
$tmp = $tmp_str;
if ($isfirst == 1)
}
if ($isfirst == 1) {
$address .= ' ';
}
$address .= $tmp;
$isfirst = 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment