Commit f4a64109 authored by Nigel McNie's avatar Nigel McNie
Browse files
parents ebeb952c 83976eee
mahara (0.9.0~alpha3~dev) unstable; urgency=low
* Dev version
-- Nigel McNie <nigel@catalyst.net.nz> Fri, 16 Nov 2007 11:14:45 +1300
* User config files (config.php and apache.conf) are no longer overwritten
by debconf. Also make robots.txt a config file.
* Create a common mahara package which contains everything but the Apache
config files.
* Cleaned-up and shortened package descriptions
* Moved Mahara into /usr/share/mahara instead of /var/www
* Removed unnecessary files (like LICENSE and readme.txt)
* No longer require Postgres 8.1, support MySQL 5.0 and Postgres 8.2
* Add debconf questions for dbtype and dbpass
* Added instructions for creating the DB in README.Debian
* Document all foreign code into debian/copyright
* Added a watch file
* Depend on ttf-freefont for the CAPTCHA plugin
* Removed bashisms in the maintainer scripts
* Set myself as maintainer
* Added homepage and Vcs-* fields to debian/control
* Fixed rotation of empty log files
* Check for the existence of the cron script before running it
* Use po-debconf and provide a French translation
-- Francois Marier <francois@catalyst.net.nz> Fri, 23 Nov 2007 12:24:25 +1300
mahara (0.9.0~alpha2-1) unstable; urgency=low
......
......@@ -10,8 +10,8 @@ Vcs-Browser: http://git.catalyst.net.nz/gw?p=mahara.git
Package: mahara
Architecture: all
Depends: ${misc:Depends}, php5-pgsql, php5-cli, php5-gd, file, cron, perl, ttf-freefont
Recommends: mahara-apache2 | mahara-apache, postgresql-8.1, clamav, clamav-daemon, php5-curl, php5-openssl, php5-xmlrpc, php5-imagick, libfile-slurp-perl, libtext-diff-perl
Depends: ${misc:Depends}, php5-pgsql | php5-mysql, php5-cli, php5-gd, file, cron, perl, ttf-freefont
Recommends: mahara-apache2 | mahara-apache, postgresql | postgresql-8.2 | postgresql-8.1 | mysql-server | mysql-server-5.0, clamav, clamav-daemon, php5-curl, php5-openssl, php5-xmlrpc, php5-imagick, libfile-slurp-perl, libtext-diff-perl
Description: Electronic portfolio, weblog, and resume builder
Mahara is a fully featured electronic portfolio, weblog, resume builder and
social networking system, connecting users and creating online communities.
......
......@@ -79,11 +79,26 @@ This package also includes the following code:
Released under the GNU Lesser General Public License 2.1
htdocs/lib/constants.php, searchlib.php, dml.php, ddl.php,
uploadmanager.php, mahara.php, web.php, xmldb/:
uploadmanager.php, mahara.php, web.php, file.php, xmldb/:
Copyright (C) 2006-2007 Catalyst IT Ltd
Portions from Moodle, Copyright (C) 1999-2007 Martin Dougiamas
Copyright (C) 1999-2007 Martin Dougiamas
Released under the GNU General Public License 2
htdocs/lib/xmldb/:
Copyright (C) 2001-2007 Martin Dougiamas
Copyright (C) 2001-2007 Eloy Lafuente
Released under the GNU General Public License 2
htdocs/lib/pieforms/static/core/pieforms.js:
Copyright (C) 2006 Nigel McNie
Copyright (C) 2006 Drupal
Released under the GNU General Public License 2
htdocs/search/internal/lib.php:
Copyright (C) 2006-2007 Catalyst IT
Copyright (C) 2007 Drupal
Released under the GNU General Public License
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
The complete text of the Modified BSD license can be found in
......
......@@ -110,12 +110,12 @@ catch (Exception $e) {
throw new ConfigSanityException($errormessage);
}
try {
db_ignore_sql_exceptions(true);
load_config();
db_ignore_sql_exceptions(false);
}
catch (SQLException $e) {
if (!defined('INSTALLER')) {
throw $e;
}
db_ignore_sql_exceptions(false);
}
// Make sure wwwroot is set and available, either in the database or int the
......
......@@ -172,14 +172,14 @@ function xmldb_core_upgrade($oldversion=0) {
}
// Add the 'blockinstancecommit' event type
if ($oldversion < 2007082203) {
if ($oldversion < 2007082201) {
$event = (object)array(
'name' => 'blockinstancecommit',
);
ensure_record_exists('event_type', $event, $event);
}
if ($oldversion < 2007082201) {
if ($oldversion < 2007082202) {
// Rename the community tables to group - mysql version.
// This is really quite hacky. You can't rename columns with a foreign
// key on them, so you have to drop the key, rename the column, re-add
......@@ -213,7 +213,7 @@ function xmldb_core_upgrade($oldversion=0) {
}
// VIEW REWORK MIGRATION
if ($oldversion < 2007100200) {
if ($oldversion < 2007100203) {
$table = new XMLDBTable('view_layout');
$table->addFieldInfo('id', XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED,
XMLDB_NOTNULL, XMLDB_SEQUENCE, null, null, null);
......@@ -388,7 +388,7 @@ function xmldb_core_upgrade($oldversion=0) {
// Move files in dataroot into an 'originals' directory, and remove any
// cached images
if ($oldversion < 2007082202) {
if ($oldversion < 2007082204) {
require('file.php');
foreach(array('artefact/file', 'artefact/internal/profileicons') as $dir) {
$datadir = get_config('dataroot') . $dir;
......
......@@ -1519,4 +1519,32 @@ function increment_perf_db_writes() {
global $PERF;
$PERF->dbwrites++;
}
/**
* Gives the caller the ability to disable logging of SQL exceptions in the
* SQLException constructor.
*
* This is only used by the config loading code to prevent spurious errors
* about the config table not existing going to the logs. If you are going to
* use this function, you had better have a very good reason!
*
* @param bool $status Whether to ignore logging exceptions or not. If null,
* you can retrieve the current value of this setting
*/
function db_ignore_sql_exceptions($status=null) {
global $DB_IGNORE_SQL_EXCEPTIONS;
// Initialise it if being called for the first time
if ($DB_IGNORE_SQL_EXCEPTIONS === null) {
$DB_IGNORE_SQL_EXCEPTIONS = false;
}
// Return the value if asked for
if ($status === null) {
return $DB_IGNORE_SQL_EXCEPTIONS;
}
$DB_IGNORE_SQL_EXCEPTIONS = (bool)$status;
}
?>
......@@ -638,12 +638,16 @@ class ConfigSanityException extends ConfigException {
*/
class SQLException extends SystemException {
public function __construct($message=null, $code=0) {
global $DB_IGNORE_SQL_EXCEPTIONS;
if ($GLOBALS['_TRANSACTION_LEVEL'] > 0) {
log_debug('rolling back a transaction');
db_rollback();
}
parent::__construct($message, $code);
log_warn($this->getMessage());
if (empty($DB_IGNORE_SQL_EXCEPTIONS)) {
log_warn($this->getMessage());
}
}
}
......
......@@ -476,15 +476,7 @@ function ini_get_bool($ini_get_arg) {
function load_config() {
global $CFG;
try {
$dbconfig = get_records_array('config', '', '', '', 'field, value');
}
catch (SQLException $e) {
// TODO: better reporting if config could not be obtained? This
// normally happens when the system isn't installed
log_info($e->getMessage());
return false;
}
$dbconfig = get_records_array('config', '', '', '', 'field, value');
foreach ($dbconfig as $cfg) {
if (isset($CFG->{$cfg->field}) && $CFG->{$cfg->field} != $cfg->value) {
......@@ -523,6 +515,7 @@ function get_config($key) {
function set_config($key, $value) {
global $CFG;
db_ignore_sql_exceptions(true);
if (get_record('config', 'field', $key)) {
if (set_field('config', 'value', $value, 'field', $key)) {
$status = true;
......@@ -534,6 +527,7 @@ function set_config($key, $value) {
$config->value = $value;
$status = insert_record('config', $config);
}
db_ignore_sql_exceptions(false);
if (!empty($status)) {
$CFG->{$key} = $value;
......
......@@ -27,7 +27,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2007082205;
$config->version = 2007112300;
$config->release = '0.9.0alpha3dev';
$config->minupgradefrom = 2007080700;
$config->minupgraderelease = '0.8.0 (release tag 0.8.0_RELEASE)';
......
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