Skip to content

Commit 30fc1b7

Browse files
author
latham
committed
Silly Microsoft line endings removed to not error on Linux Subversion servers...
1 parent 526b997 commit 30fc1b7

File tree

68 files changed

+5603
-5603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5603
-5603
lines changed

install/tpl/server.ini.master

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ dnsserver=mydns
55

66

77
[server]
8-
auto_network_configuration=n
9-
ip_address=0.0.0.0
10-
netmask=255.255.255.0
11-
v6_prefix=
12-
gateway=0.0.0.0
13-
hostname=server1.domain.tld
14-
nameservers=8.8.8.8,8.8.4.4
8+
auto_network_configuration=n
9+
ip_address=0.0.0.0
10+
netmask=255.255.255.0
11+
v6_prefix=
12+
gateway=0.0.0.0
13+
hostname=server1.domain.tld
14+
nameservers=8.8.8.8,8.8.4.4
1515
firewall=bastille
1616
loglevel=2
1717
backup_dir=/var/backup
@@ -42,12 +42,12 @@ getmail_config_dir=/etc/getmail
4242
[web]
4343
server_type=apache
4444
website_basedir=/var/www
45-
website_path=/var/www/clients/client[client_id]/web[website_id]
46-
website_symlinks=/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/
47-
website_symlinks_rel=n
48-
vhost_conf_dir=/etc/apache2/sites-available
49-
vhost_conf_enabled_dir=/etc/apache2/sites-enabled
50-
nginx_vhost_conf_dir=/etc/nginx/sites-available
45+
website_path=/var/www/clients/client[client_id]/web[website_id]
46+
website_symlinks=/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/
47+
website_symlinks_rel=n
48+
vhost_conf_dir=/etc/apache2/sites-available
49+
vhost_conf_enabled_dir=/etc/apache2/sites-enabled
50+
nginx_vhost_conf_dir=/etc/nginx/sites-available
5151
nginx_vhost_conf_enabled_dir=/etc/nginx/sites-enabled
5252
security_level=20
5353
user=www-data
Lines changed: 102 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,103 @@
1-
<?php
2-
/*
3-
Copyright (c) 2012, ISPConfig UG
4-
Contributors: web wack creations, http://www.web-wack.at
5-
All rights reserved.
6-
7-
Redistribution and use in source and binary forms, with or without modification,
8-
are permitted provided that the following conditions are met:
9-
10-
* Redistributions of source code must retain the above copyright notice,
11-
this list of conditions and the following disclaimer.
12-
* Redistributions in binary form must reproduce the above copyright notice,
13-
this list of conditions and the following disclaimer in the documentation
14-
and/or other materials provided with the distribution.
15-
* Neither the name of ISPConfig nor the names of its contributors
16-
may be used to endorse or promote products derived from this software without
17-
specific prior written permission.
18-
19-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22-
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23-
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26-
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28-
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29-
*/
30-
31-
// Constants describing instances
32-
define('INSTANCE_PENDING', 0);
33-
define('INSTANCE_INSTALL', 1);
34-
define('INSTANCE_ERROR', 2);
35-
define('INSTANCE_SUCCESS', 3);
36-
define('INSTANCE_REMOVE', 4);
37-
38-
// Constants describing packages
39-
define('PACKAGE_LOCKED', 1);
40-
define('PACKAGE_ENABLED', 2);
41-
define('PACKAGE_OUTDATED', 3);
42-
define('PACKAGE_ERROR_NOMETA', 4);
43-
44-
class ApsBase
45-
{
46-
protected $log_prefix = '';
47-
protected $fetch_url = '';
48-
protected $aps_version = '';
49-
protected $packages_dir = '';
50-
protected $temp_pkg_dir = '';
51-
protected $interface_pkg_dir = '';
52-
protected $interface_mode = false; // server mode by default
53-
54-
/**
55-
* Constructor
56-
*
57-
* @param $app the application instance (db handle + log method)
58-
* @param $interface_mode act in interface (true) or server mode (false)
59-
* @param $log_prefix a prefix to set before all log entries
60-
*/
61-
public function __construct($app, $log_prefix = 'APS: ', $interface_mode = false)
62-
{
63-
$this->log_prefix = $log_prefix;
64-
$this->interface_mode = $interface_mode;
65-
$this->fetch_url = 'apscatalog.com';
66-
$this->aps_version = '1';
67-
$this->packages_dir = ISPC_ROOT_PATH.'/aps_packages';
68-
$this->interface_pkg_dir = ISPC_ROOT_PATH.'/web/sites/aps_meta_packages';
69-
}
70-
71-
/**
72-
* Converts a given value to it's native representation in 1024 units
73-
*
74-
* @param $value the size to convert
75-
* @return integer and string
76-
*/
77-
public function convertSize($value)
78-
{
79-
$unit = array('Bytes', 'KB', 'MB', 'GB', 'TB');
80-
return @round($value/pow(1024, ($i = floor(log($value, 1024)))), 2).' '.$unit[$i];
81-
}
82-
83-
/**
84-
* Determine a specific xpath from a given SimpleXMLElement handle. If the
85-
* element is found, it's string representation is returned. If not,
86-
* the return value will stay empty
87-
*
88-
* @param $xml_handle the SimpleXMLElement handle
89-
* @param $query the XPath query
90-
* @param $array define whether to return an array or a string
91-
* @return $ret the return string
92-
*/
93-
protected function getXPathValue($xml_handle, $query, $array = false)
94-
{
95-
$ret = '';
96-
97-
$xp_result = @($xml_handle->xpath($query)) ? $xml_handle->xpath($query) : false;
98-
if($xp_result !== false) $ret = (($array === false) ? (string)$xp_result[0] : $xp_result);
99-
100-
return $ret;
101-
}
102-
}
1+
<?php
2+
/*
3+
Copyright (c) 2012, ISPConfig UG
4+
Contributors: web wack creations, http://www.web-wack.at
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
// Constants describing instances
32+
define('INSTANCE_PENDING', 0);
33+
define('INSTANCE_INSTALL', 1);
34+
define('INSTANCE_ERROR', 2);
35+
define('INSTANCE_SUCCESS', 3);
36+
define('INSTANCE_REMOVE', 4);
37+
38+
// Constants describing packages
39+
define('PACKAGE_LOCKED', 1);
40+
define('PACKAGE_ENABLED', 2);
41+
define('PACKAGE_OUTDATED', 3);
42+
define('PACKAGE_ERROR_NOMETA', 4);
43+
44+
class ApsBase
45+
{
46+
protected $log_prefix = '';
47+
protected $fetch_url = '';
48+
protected $aps_version = '';
49+
protected $packages_dir = '';
50+
protected $temp_pkg_dir = '';
51+
protected $interface_pkg_dir = '';
52+
protected $interface_mode = false; // server mode by default
53+
54+
/**
55+
* Constructor
56+
*
57+
* @param $app the application instance (db handle + log method)
58+
* @param $interface_mode act in interface (true) or server mode (false)
59+
* @param $log_prefix a prefix to set before all log entries
60+
*/
61+
public function __construct($app, $log_prefix = 'APS: ', $interface_mode = false)
62+
{
63+
$this->log_prefix = $log_prefix;
64+
$this->interface_mode = $interface_mode;
65+
$this->fetch_url = 'apscatalog.com';
66+
$this->aps_version = '1';
67+
$this->packages_dir = ISPC_ROOT_PATH.'/aps_packages';
68+
$this->interface_pkg_dir = ISPC_ROOT_PATH.'/web/sites/aps_meta_packages';
69+
}
70+
71+
/**
72+
* Converts a given value to it's native representation in 1024 units
73+
*
74+
* @param $value the size to convert
75+
* @return integer and string
76+
*/
77+
public function convertSize($value)
78+
{
79+
$unit = array('Bytes', 'KB', 'MB', 'GB', 'TB');
80+
return @round($value/pow(1024, ($i = floor(log($value, 1024)))), 2).' '.$unit[$i];
81+
}
82+
83+
/**
84+
* Determine a specific xpath from a given SimpleXMLElement handle. If the
85+
* element is found, it's string representation is returned. If not,
86+
* the return value will stay empty
87+
*
88+
* @param $xml_handle the SimpleXMLElement handle
89+
* @param $query the XPath query
90+
* @param $array define whether to return an array or a string
91+
* @return $ret the return string
92+
*/
93+
protected function getXPathValue($xml_handle, $query, $array = false)
94+
{
95+
$ret = '';
96+
97+
$xp_result = @($xml_handle->xpath($query)) ? $xml_handle->xpath($query) : false;
98+
if($xp_result !== false) $ret = (($array === false) ? (string)$xp_result[0] : $xp_result);
99+
100+
return $ret;
101+
}
102+
}
103103
?>

0 commit comments

Comments
 (0)