Skip to content

Commit

Permalink
Compatibility to mysql 5.5, be more verbose on error template
Browse files Browse the repository at this point in the history
  • Loading branch information
olafgleba committed Feb 3, 2014
1 parent 15e197e commit 207768c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
3 changes: 3 additions & 0 deletions welcompose/admin/smarty/templates/error_mediamanager.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
<h1>{i18n 'An error occured'}!</h1>
<p>The Mediamanager could not be loaded.</p>
<h2>{i18n 'Welcompose says'}:<p>{$message}</p></h2>
<p>File: {$file}</p>
<p>Line: {$line}</p>
<p>Trace: {$trace_string}</p>
46 changes: 23 additions & 23 deletions welcompose/update/tasks/0001-013.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* This file is licensed under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE v3
* http://www.opensource.org/licenses/agpl-v3.html
*
*
* @author Olaf Gleba
* @package Welcompose
* @link http://welcompose.de
Expand Down Expand Up @@ -42,27 +42,27 @@
try {
// start output buffering
@ob_start();

// load smarty
$smarty_update_conf = dirname(__FILE__).'/../smarty.inc.php';
$BASE->utility->loadSmarty(Base_Compat::fixDirectorySeparator($smarty_update_conf), true);

// load gettext
$gettext_path = dirname(__FILE__).'/../../core/includes/gettext.inc.php';
include(Base_Compat::fixDirectorySeparator($gettext_path));
gettextInitSoftware($BASE->_conf['locales']['all']);

// start Base_Session
/* @var $SESSION session */
$SESSION = load('base:session');

// connect to database
$BASE->loadClass('database');

// define major/minor task number
define('TASK_MAJOR', '0001');
define('TASK_MINOR', '013');

// get schema version from database
$sql = "
SELECT
Expand All @@ -74,14 +74,14 @@
";
$version = $BASE->db->select($sql, 'field');
list($major, $minor) = explode('-', $version);

/*
* References
* ----------
*
* Changeset: 6e782baabffa83c7ee97a1e60d946e4b64ea86bf
* Ticket: 21
*
*
* Changes to be applied
* ---------------------
*
Expand Down Expand Up @@ -120,7 +120,7 @@
`draft` enum('0','1') DEFAULT '0',
`tag_count` int(11) UNSIGNED DEFAULT '0',
`tag_array` text,
`date_modified` timestamp(14),
`date_modified` timestamp,
`date_added` datetime,
`day_added` char(2),
`month_added` char(2),
Expand Down Expand Up @@ -150,12 +150,12 @@
REFERENCES `application_text_converters`(`id`)
ON DELETE SET NULL
ON UPDATE CASCADE
)
)
ENGINE=INNODB CHARACTER SET utf8 COLLATE utf8_unicode_ci;
";

$BASE->db->execute($sql);

// create content_event_tags
$BASE->db->execute('DROP TABLE IF EXISTS '.WCOM_DB_CONTENT_EVENT_TAGS);

Expand All @@ -174,12 +174,12 @@
REFERENCES `content_pages`(`id`)
ON DELETE CASCADE
ON UPDATE CASCADE
)
)
ENGINE=INNODB CHARACTER SET utf8 COLLATE utf8_unicode_ci;
";

$BASE->db->execute($sql);

// create content_event_tags
$BASE->db->execute('DROP TABLE IF EXISTS '.WCOM_DB_CONTENT_EVENT_TAGS2CONTENT_EVENT_POSTINGS);

Expand All @@ -199,7 +199,7 @@
REFERENCES `content_event_tags`(`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
)
ENGINE=INNODB CHARACTER SET utf8 COLLATE utf8_unicode_ci;
";

Expand Down Expand Up @@ -360,7 +360,7 @@
}
}
}

// add new template type event_index to every project
foreach ($projects as $_project) {
// get existing template types
Expand All @@ -383,7 +383,7 @@
'description' => '',
'editable' => '0'
);

// if the template type already exists, force update
$insert = true;
foreach ($template_types as $_template_type) {
Expand All @@ -409,7 +409,7 @@
$BASE->db->insert(WCOM_DB_TEMPLATING_TEMPLATE_TYPES, $sqlData);
}
}


// add new template type event_rss20 to every project
foreach ($projects as $_project) {
Expand All @@ -433,7 +433,7 @@
'description' => '',
'editable' => '0'
);

// if the template type already exists, force update
$insert = true;
foreach ($template_types as $_template_type) {
Expand All @@ -459,7 +459,7 @@
$BASE->db->insert(WCOM_DB_TEMPLATING_TEMPLATE_TYPES, $sqlData);
}
}

// add new template type event_atom10 to every project
foreach ($projects as $_project) {
// get existing template types
Expand All @@ -482,7 +482,7 @@
'description' => '',
'editable' => '0'
);

// if the template type already exists, force update
$insert = true;
foreach ($template_types as $_template_type) {
Expand All @@ -508,7 +508,7 @@
$BASE->db->insert(WCOM_DB_TEMPLATING_TEMPLATE_TYPES, $sqlData);
}
}

// add new page type WCOM_EVENT to every project
foreach ($projects as $_project) {
// get existing template types
Expand All @@ -531,7 +531,7 @@
'internal_name' => 'Event',
'editable' => '0'
);

// if the template type already exists, force update
$insert = true;
foreach ($page_types as $_page_type) {
Expand Down

0 comments on commit 207768c

Please sign in to comment.