diff --git a/lib/classes/output/class.linker.php b/lib/classes/output/class.linker.php index 8f2cb165..697ab5b5 100644 --- a/lib/classes/output/class.linker.php +++ b/lib/classes/output/class.linker.php @@ -1,4 +1,5 @@ protocol = $protocol; $this->username = $username; $this->password = $password; $this->hostname = $hostname; $this->port = $port; $this->filename = $file; - # @TODO: Remove this + // @TODO: Remove this $this->args['s'] = $sessionid; } - public function __set($key, $value) - { - switch(strtolower($key)) - { + public function __set($key, $value) { + + switch (strtolower($key)) { case 'protocol': $this->protocol = $value; break; case 'username': $this->username = $value; break; case 'password': $this->password = $value; break; @@ -54,111 +53,94 @@ class linker return true; } - public function add($key, $value) - { - # Add a new value to our parameters (overwrite = enabled) + public function add($key, $value) { + // Add a new value to our parameters (overwrite = enabled) $this->args[$key] = $value; } - public function del($key) - { - # If the key exists in our array -> delete it - if (isset($this->args[$key])) - { + public function del($key) { + // If the key exists in our array -> delete it + if (isset($this->args[$key])) { unset($this->args[$key]); } } - public function delAll() - { - # Just resetting the array - # Until the sessionid can be removed: save it - # @TODO: Remove this + public function delAll() { + // Just resetting the array + // Until the sessionid can be removed: save it + // @TODO: Remove this $this->args = array('s' => $this->args['s']); } - public function getLink() - { + public function getLink() { $link = ''; - # Build the basic URL - if (strlen($this->protocol) > 0 && strlen($this->hostname) > 0) - { + // Build the basic URL + if (strlen($this->protocol) > 0 && strlen($this->hostname) > 0) { $link = $this->protocol . '://'; } - # Let's see if we shall use a username in the URL - # This is only available if a hostname is used as well - if (strlen($this->username) > 0 && strlen($this->hostname) > 0) - { + // Let's see if we shall use a username in the URL + // This is only available if a hostname is used as well + if (strlen($this->username) > 0 && strlen($this->hostname) > 0) { $link .= urlencode($this->username); - # Maybe we even have to append a password? - if ($this->password != '') - { + // Maybe we even have to append a password? + if ($this->password != '') { $link .= ':' . urlencode($this->password); } - # At least a username was given, add the @ to allow appending the hostname + // At least a username was given, add the @ to allow appending the hostname $link .= '@'; } - # Add hostname, port and filename to the URL - if (strlen($this->hostname) > 0) - { + // Add hostname, port and filename to the URL + if (strlen($this->hostname) > 0) { $link .= $this->hostname; - # A port may only be used if hostname is used as well - if (strlen($this->port) > 0) - { + // A port may only be used if hostname is used as well + if (strlen($this->port) > 0) { $link .= ':' . $this->port; } - $link .= '/'; } - # Overwrite $this->args with parameters of this function (if necessary) - if(func_num_args() == 1 && is_array(func_get_arg(0))) - { + // Overwrite $this->args with parameters of this function (if necessary) + if (func_num_args() == 1 && is_array(func_get_arg(0))) { $arguments = func_get_arg(0); $this->args = array_merge($this->args, $arguments); } - # temporary until frontcontroller exists - # We got a section in the URL -> morph AREA and section into filename - # @TODO: Remove this - if (isset($this->args['section']) && strlen($this->args['section']) > 0) - { + // temporary until frontcontroller exists + // We got a section in the URL -> morph AREA and section into filename + // @TODO: Remove this + if (isset($this->args['section']) && strlen($this->args['section']) > 0) { $link .= AREA . '_' . $this->args['section'] . '.php'; unset($this->args['section']); - } - else - { + } else { + // filename has a prefixed slash $link .= $this->filename; } - # Let's see if we are done (no arguments in query) - if (count($this->args) == 0) - { + // Let's see if we are done (no arguments in query) + if (count($this->args) == 0) { return $link; } - # We have parameters, add them with a "?" + // We have parameters, add them with a "?" $link .= "?"; - # Loop through arguments and add them to the link - foreach ($this->args as $key => $value) - { - # For all but the first argument, prepend "&" - if (substr($link, -1) != "?") - { + // Loop through arguments and add them to the link + foreach ($this->args as $key => $value) { + // For all but the first argument, prepend "&" + if (substr($link, -1) != "?") { $link .= "&"; } - # Encode parameters and add them to the link + // Encode parameters and add them to the link $link .= urlencode($key) . '=' . urlencode($value); } - # Reset our class for further use + // Reset our class for further use $this->delAll(); return $link; } diff --git a/templates/misc/configfiles/debian_squeeze/cron/etc_cron.d_froxlor b/templates/misc/configfiles/debian_squeeze/cron/etc_cron.d_froxlor index b480207d..ef6033d4 100644 --- a/templates/misc/configfiles/debian_squeeze/cron/etc_cron.d_froxlor +++ b/templates/misc/configfiles/debian_squeeze/cron/etc_cron.d_froxlor @@ -5,4 +5,6 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # # Regular cron jobs for the froxlor package # +# Please check that all following paths are correct +# */5 * * * * root /usr/bin/nice -n 5 /usr/bin/php5 -q scripts/froxlor_master_cronjob.php diff --git a/templates/misc/configfiles/debian_wheezy/cron/etc_cron.d_froxlor b/templates/misc/configfiles/debian_wheezy/cron/etc_cron.d_froxlor index b480207d..ef6033d4 100644 --- a/templates/misc/configfiles/debian_wheezy/cron/etc_cron.d_froxlor +++ b/templates/misc/configfiles/debian_wheezy/cron/etc_cron.d_froxlor @@ -5,4 +5,6 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # # Regular cron jobs for the froxlor package # +# Please check that all following paths are correct +# */5 * * * * root /usr/bin/nice -n 5 /usr/bin/php5 -q scripts/froxlor_master_cronjob.php diff --git a/templates/misc/configfiles/opensuse_11_x/cron/etc_cron.d_froxlor b/templates/misc/configfiles/opensuse_11_x/cron/etc_cron.d_froxlor index 79711361..4566f74b 100644 --- a/templates/misc/configfiles/opensuse_11_x/cron/etc_cron.d_froxlor +++ b/templates/misc/configfiles/opensuse_11_x/cron/etc_cron.d_froxlor @@ -5,4 +5,6 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin # # Regular cron jobs for the froxlor package # +# Please check that all following paths are correct +# */5 * * * * root /usr/bin/nice -n 5 /usr/bin/php5 -q /srv/www/froxlor/scripts/froxlor_master_cronjob.php diff --git a/templates/misc/configfiles/sle_10/cron/etc_cron.d_froxlor b/templates/misc/configfiles/sle_10/cron/etc_cron.d_froxlor index b480207d..ef6033d4 100644 --- a/templates/misc/configfiles/sle_10/cron/etc_cron.d_froxlor +++ b/templates/misc/configfiles/sle_10/cron/etc_cron.d_froxlor @@ -5,4 +5,6 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # # Regular cron jobs for the froxlor package # +# Please check that all following paths are correct +# */5 * * * * root /usr/bin/nice -n 5 /usr/bin/php5 -q scripts/froxlor_master_cronjob.php diff --git a/templates/misc/configfiles/ubuntu_lucid/cron/etc_cron.d_froxlor b/templates/misc/configfiles/ubuntu_lucid/cron/etc_cron.d_froxlor index b480207d..ef6033d4 100644 --- a/templates/misc/configfiles/ubuntu_lucid/cron/etc_cron.d_froxlor +++ b/templates/misc/configfiles/ubuntu_lucid/cron/etc_cron.d_froxlor @@ -5,4 +5,6 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # # Regular cron jobs for the froxlor package # +# Please check that all following paths are correct +# */5 * * * * root /usr/bin/nice -n 5 /usr/bin/php5 -q scripts/froxlor_master_cronjob.php diff --git a/templates/misc/configfiles/ubuntu_precise/cron/etc_cron.d_froxlor b/templates/misc/configfiles/ubuntu_precise/cron/etc_cron.d_froxlor index b480207d..ef6033d4 100644 --- a/templates/misc/configfiles/ubuntu_precise/cron/etc_cron.d_froxlor +++ b/templates/misc/configfiles/ubuntu_precise/cron/etc_cron.d_froxlor @@ -5,4 +5,6 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # # Regular cron jobs for the froxlor package # +# Please check that all following paths are correct +# */5 * * * * root /usr/bin/nice -n 5 /usr/bin/php5 -q scripts/froxlor_master_cronjob.php