Permalink
Browse files

Merge branch 'master' into namespaceCleanup

  • Loading branch information...
Stardog committed Feb 7, 2017
1 parent 5e761a1 commit 325148d0e7550adb1815bd2b9358d936a0b2a67a
View
@@ -26,6 +26,9 @@ before_script:
# - sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
# - sudo service apache2 restart
install:
- composer install
script:
- echo $SUPERSECRET
- ".travis-build/phplint ."
@@ -31,6 +31,6 @@
'composer' => '',
'canopy' => 'CanopyLoader',
'legacy' => 'LegacyLoader',
'LegacySrcLoader' => 'LegacySrcLoader',
'Phpws2Loader' => 'Phpws2Loader'
'Phpws2Loader' => 'Phpws2Loader',
'LegacySrcLoader' => 'LegacySrcLoader'
);
@@ -2,4 +2,4 @@
namespace Variable;
class String extends \phpws2\Variable\String{}
class CanopyString extends \phpws2\Variable\CanopyString{}
View
@@ -39,6 +39,16 @@ directory is language.php.
phpWebSite uses UTF-8 character encoding. Some older database versions
of MySQL (pre 4.1) do not support it.
Docker
======
phpWebSite can now be run in a Docker Container!
1. Install Docker Engine as per instructions. * [Docker Install](https://docs.docker.com/engine/installation/)
2. Install Docker Compose as per instructions. *[Docker Compose Install](https://docs.docker.com/compose/gettingstarted/)
3. Run docker-compose up -d. ( the d option runs it in the background )
(Depending on your system you may need to add your user to the docker group in order to have the privileges to run the docker-compose command)
Vagrant
=======
phpWebSite can now be run in a Vagrant Box!
View
@@ -7,8 +7,8 @@
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos65"
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-puppet.box"
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox'
config.vm.box = "puppetlabs/centos-7.2-64-puppet-enterprise"
config.vm.provision :shell, :path => "bootstrap.sh"
config.vm.network :forwarded_port, host: 7970, guest: 80
config.vm.network :forwarded_port, host: 7971, guest: 3306
View
@@ -27,11 +27,8 @@ echo "================"
echo "==================="
echo "Installing Packages"
echo "==================="
yum -y install http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install httpd php-cli php-pgsql php-pecl-xdebug php-pdo php \
php-mbstring php-common php-mysql php-soap php-gd php-xml php-pecl-apc \
mysql-server mysql postgresql-server postgresql phpmyadmin phpPgAdmin \
roundcubemail dovecot openoffice.org-headless
yum -y install http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
yum -y install httpd php php-cli php-pgsql php-pecl-xdebug php-pdo php-mbstring php-common php-mysql php-soap php-gd php-xml php-pecl-apc mariadb-server mariadb postgresql-server postgresql phpmyadmin phpPgAdmin roundcubemail dovecot openoffice.org-headless
echo "================"
echo "Setting up MySQL"
@@ -45,10 +42,11 @@ symbolic-links=0
bind-address=0.0.0.0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/lib/mysql/mysqld.pid
mySQL
service mysqld start
systemctl enable mariadb
systemctl start mariadb
mysql -u root <<MySQL
CREATE DATABASE $DBNAME;
GRANT ALL ON $DBNAME.* TO $DBUSER@localhost IDENTIFIED BY '$DBPASS';
@@ -66,9 +64,13 @@ cat << pgSQL > /var/lib/pgsql/data/pg_hba.conf
local phpwebsite phpwebsite trust
host all postgres 0.0.0.0/0 trust
local all postgres trust
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
pgSQL
echo "listen_addresses = '*'" >> /var/lib/pgsql/data/postgresql.conf
service postgresql start
systemctl start postgresql
echo -e 'phpwebsite\nphpwebsite' | su - postgres -c 'createuser -SDREP phpwebsite'
su - postgres -c 'createdb -E utf8 -O phpwebsite phpwebsite'
@@ -86,7 +88,7 @@ localhost :
* :discard
TRANSPORT
postmap /etc/postfix/transport
service postfix restart
systemctl restart postfix
echo "=================="
echo "Setting up Dovecot"
@@ -103,7 +105,7 @@ passdb {
driver = passwd
}
DOVECOT
service dovecot start
systemctl start dovecot
echo "===================="
echo "Setting up RoundCube"
@@ -637,18 +639,13 @@ Listen 80
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
@@ -677,16 +674,13 @@ LoadModule substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
Include conf.d/*.conf
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
@@ -852,7 +846,7 @@ BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
HTTPD
service httpd start > /dev/null 2>&1
systemctl start httpd > /dev/null 2>&1
echo "===================="
echo "Configuring Firewall"
View
@@ -5,7 +5,7 @@
* @version $Id$
*/
$proper_name = 'phpWebSite Core';
$version = '2.10.0';
$version = '2.10.1';
$version_http = 'http://phpwebsite.appstate.edu/downloads/modules/base/check.xml';
$dependency = false;
$about = true;
View
@@ -28,7 +28,8 @@ function core_update(&$content, $version)
return false;
}
$source_http = sprintf("<?php\ndefine('PHPWS_SOURCE_HTTP', '%s');\n?>", \phpws\PHPWS_Core::getHomeHttp());
$source_http = sprintf("<?php\ndefine('PHPWS_SOURCE_HTTP', '%s');\n?>",
\phpws\PHPWS_Core::getHomeHttp());
if (!file_put_contents($config_dir . 'source.php', $source_http)) {
$content[] = '<p>Could not create config/core/source.php file.</p>';
return false;
@@ -68,9 +69,12 @@ function core_update(&$content, $version)
EOT;
}
if ($branch = PHPWS_Boost::inBranch(true)) {
if (!PHPWS_File::copy_directory(PHPWS_SOURCE_DIR . 'javascript/editors/fckeditor/', $branch->directory . 'javascript/editors/fckeditor', true)) {
if (!PHPWS_File::copy_directory(PHPWS_SOURCE_DIR . 'javascript/editors/fckeditor/',
$branch->directory . 'javascript/editors/fckeditor',
true)) {
mkdir($branch->directory . 'images/ckeditor/');
$this->content[] = dgettext('branch', 'Failed to copy FCKeditor to branch.');
$this->content[] = dgettext('branch',
'Failed to copy FCKeditor to branch.');
} else {
$content[] = 'FCKeditor not copied to branch. Check directory permissions.';
}
@@ -212,11 +216,13 @@ function core_update(&$content, $version)
case version_compare($version, '2.3.1', '<'):
$db = \Database::newDB();
$db->setConditional($db->addTable('modules')->getFieldConditional('title', 'comments'));
$db->setConditional($db->addTable('modules')->getFieldConditional('title',
'comments'));
$db->delete();
$db = \Database::newDB();
$db->setConditional($db->addTable('controlpanel_link')->getFieldConditional('itemname', 'comments'));
$db->setConditional($db->addTable('controlpanel_link')->getFieldConditional('itemname',
'comments'));
$db->delete();
$db = \Database::newDB();
@@ -272,11 +278,13 @@ function core_update(&$content, $version)
}
$db = \Database::newDB();
$db->setConditional($db->addTable('modules')->getFieldConditional('title', 'categories'));
$db->setConditional($db->addTable('modules')->getFieldConditional('title',
'categories'));
$db->delete();
$db = \Database::newDB();
$db->setConditional($db->addTable('controlpanel_link')->getFieldConditional('itemname', 'categories'));
$db->setConditional($db->addTable('controlpanel_link')->getFieldConditional('itemname',
'categories'));
$db->delete();
$content[] = '<pre>Core 2.3.1 Changes
@@ -521,7 +529,8 @@ function core_update(&$content, $version)
$db = \Database::newDB();
$t = $db->addTable('settings');
$dt_old = $t->getDataType('setting');
$dt_new = \Database\Datatype::factory($t, 'settings', 'mediumtext');
$dt_new = \Database\Datatype::factory($t, 'settings',
'mediumtext');
$dt_new->setIsNull(true);
$t->alter($dt_old, $dt_new);
}
@@ -589,14 +598,14 @@ function core_update(&$content, $version)
$c3 = $db->createConditional($c1, $c2, 'or');
$db->addConditional($c3);
$db->delete();
$content[] = <<<EOF
<pre>2.9.2 changes
--------------------
+ Removed deprecated unregisters
</pre>
EOF;
case version_compare($version, '2.10.0', '<'):
$content[] = <<<EOF
<pre>2.10.0 changes
@@ -605,6 +614,36 @@ function core_update(&$content, $version)
+ Fixed makeResourcestringArray in ResourceFactory
+ Changed all "new \Variable calls" to "new \phpws2\Variable"
</pre>
EOF;
case version_compare($version, '2.10.1', '<'):
$db = \phpws2\Database::getDB();
$tbl = $db->addTable('modules');
$newdt = new \phpws2\Database\Datatype\Varchar($tbl, 'title', 40);
$tbl->alter($tbl->getDataType('title'), $newdt);
$newdt2 = new \phpws2\Database\Datatype\Varchar($tbl, 'proper_name',
40);
$tbl->alter($tbl->getDataType('proper_name'), $newdt2);
$newdt3 = new \phpws2\Database\Datatype\Varchar($tbl, 'version', 20);
$tbl->alter($tbl->getDataType('version'), $newdt3);
$db->clearTables();
$tbl = $db->addTable('registered');
$newdt = new \phpws2\Database\Datatype\Varchar($tbl, 'module', 40);
$tbl->alter($tbl->getDataType('module'), $newdt);
$newdt2 = new \phpws2\Database\Datatype\Varchar($tbl,
'registered_to', 40);
$tbl->alter($tbl->getDataType('registered_to'), $newdt2);
$content[] = <<<EOF
<pre>2.10.1
-------------------
+ Update the CHAR columns in modules table to VARCHAR.
+ Update the CHAR columns in registered table to VARCHAR
</pre>
EOF;
}
return true;
@@ -1,4 +1,5 @@
<?php
/**
* Implementation of Integrated Templates API with template 'compilation' added.
*
@@ -384,10 +385,11 @@ class HTML_Template_Sigma extends PEAR
*
* @see setRoot(), setCacheRoot()
*/
function HTML_Template_Sigma($root = '', $cacheRoot = '')
public function __construct($root = '', $cacheRoot = '')
{
// the class is inherited from PEAR to be able to use $this->setErrorHandling()
$this->PEAR();
//$this->PEAR();
parent::__construct();
$this->variablesRegExp = '@' . $this->openingDelimiter . '(' . $this->variablenameRegExp . ')' .
'(:(' . $this->functionnameRegExp . '))?' . $this->closingDelimiter . '@sm';
$this->removeVariablesRegExp = '@' . $this->openingDelimiter . '\s*(' . $this->variablenameRegExp . ')\s*'
@@ -711,7 +713,7 @@ function parse($block = '__global__', $flagRecursion = false, $fakeParse = false
* The function can be used either like setVariable("varname", "value")
* or with one array $variables["varname"] = "value" given setVariable($variables)
*
* If $value is an array ('key' => 'value', ...) then values from that array
* If $value is an array ('key' => 'value', ...) then values from that array
* will be assigned to template placeholders of the form {variable.key}, ...
*
* @param string|array $variable variable name or array ('varname' => 'value')
View
@@ -152,7 +152,7 @@ class PEAR
* @access public
* @return void
*/
function PEAR($error_class = null)
function __construct($error_class = null)
{
$classname = strtolower(get_class($this));
if ($this->_debug) {
@@ -863,7 +863,7 @@ class PEAR_Error
* @access public
*
*/
function PEAR_Error($message = 'unknown error', $code = null,
function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
if ($mode === null) {
@@ -14,7 +14,7 @@ class Access_Shortcut
public $active = 1;
public $_error = null;
public function Access_Shortcut($id = 0)
public function __construct($id = 0)
{
if ($id == 0) {
return;
Oops, something went wrong.

0 comments on commit 325148d

Please sign in to comment.