Ejemplo n.º 1
0
/**
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @version $Id$
 */
function blog_update(&$content, $currentVersion)
{
    $home_directory = PHPWS_Boost::getHomeDir();
    switch ($currentVersion) {
        case version_compare($currentVersion, '1.2.2', '<'):
            $content[] = 'This package will not update versions prior to 1.2.2.';
            return false;
        case version_compare($currentVersion, '1.2.3', '<'):
            $content[] = '<pre>
1.2.3 Changes
-------------
+ Make call to resetKeywords in search to prevent old search word retention.
</pre>';
        case version_compare($currentVersion, '1.4.1', '<'):
            $content[] = '<pre>';
            $db = new PHPWS_DB('blog_entries');
            $result = $db->addTableColumn('image_id', 'int NOT NULL default 0');
            if (PHPWS_Error::isError($result)) {
                PHPWS_Error::log($result);
                $content[] = 'Unable to add image_id colume to blog_entries table.</pre>';
                return false;
            }
            $files = array('templates/edit.tpl', 'templates/settings.tpl', 'templates/view.tpl', 'templates/submit.tpl', 'templates/user_main.tpl', 'templates/list_view.tpl');
            blogUpdateFiles($files, $content);
            $content[] = '
1.4.1 Changes
-------------
+ Added missing category tags to entry listing.
+ Added ability for anonymous and users without blog permission to
  submit entries for later approval.
+ Added setting to allow anonymous submission.
+ Added ability to place images on Blog entries without editor.
+ Added pagination to Blog view.
+ Added link to reset the view cache.
+ Added ability to add images to entry without editor.
+ Added missing translate calls.
+ Changed edit form layout.
</pre>';
        case version_compare($currentVersion, '1.4.2', '<'):
            $content[] = '<pre>';
            $files = array('templates/list.tpl');
            blogUpdateFiles($files, $content);
            $content[] = '1.4.2 Changes
-------------
+ Fixed bug causing error message when Blog listing moved off front page.
+ Changes "Entry" column to "Summary" on admin list. Was not updated since summary was added.
</pre>';
        case version_compare($currentVersion, '1.4.3', '<'):
            $content[] = '<pre>1.4.3 Changes
-------------';
            $db = new PHPWS_DB('blog_entries');
            $result = $db->addTableColumn('expire_date', 'int not null default 0', 'publish_date');
            if (PHPWS_Error::isError($result)) {
                PHPWS_Error::log($result);
                $content[] = 'Unable to create table column "expire_date" on blog_entries table.</pre>';
                return false;
            } else {
                $content[] = '+ Created "expire_date" column on blog_entries table.';
            }
            $result = $db->addTableColumn('sticky', 'smallint not null default 0');
            if (PHPWS_Error::isError($result)) {
                PHPWS_Error::log($result);
                $content[] = 'Unable to create table column "sticky" on blog_entries table.</pre>';
                return false;
            } else {
                $content[] = '+ Created "sticky" column on blog_entries table.';
            }
            $files = array('img/blog.png', 'templates/edit.tpl', 'templates/list.tpl');
            blogUpdateFiles($files, $content);
            $content[] = '+ Priviledged blog entries now forward to login page.
+ Added sticky option.
+ Added expiration options.
+ Removed fake French translation.
+ Changed Control Panel icon.
</pre>';
        case version_compare($currentVersion, '1.5.0', '<'):
            $content[] = '<pre>';
            $files = array('templates/settings.tpl', 'templates/edit.tpl', 'conf/config.php', 'templates/list_view.tpl');
            blogUpdateFiles($files);
            $content[] = '
1.5.0 Changes
-------------
+ Increased default blog entry title size to 100.
+ Added setting to control whether to allow anonymous comments by
  default on new blog entries
+ Added Captcha option to submissions.
+ Fixed cache reset
+ Added define to determine the highest amount of blog pages to cache
+ Added extra checks for anonymous submission
+ Changed coding of image manager call.
+ Changed to new language functionality.
+ Fixed: logErrors called on blog object instead of image object
  on empty image id.
+ Fixed pagination on list view.
+ Now uses new File Cabinet module.
</pre>';
        case version_compare($currentVersion, '1.5.1', '<'):
            $content[] = '<pre>
1.5.1 Changes
-------------
+ Comments link points to comments anchor.</pre>';
        case version_compare($currentVersion, '1.5.2', '<'):
            $content[] = '<pre>
1.5.2 Changes
-------------
+ Fixed previous blog listing.</pre>';
        case version_compare($currentVersion, '1.6.0', '<'):
            $content[] = '<pre>';
            $columns = array();
            $columns['update_date'] = 'int not null default 0';
            $columns['updater'] = 'varchar(50) NOT NULL';
            $columns['updater_id'] = 'int not null default 0';
            $db = new PHPWS_DB('blog_entries');
            foreach ($columns as $column_name => $col_info) {
                $result = $db->addTableColumn($column_name, $col_info, 'create_date');
                if (PHPWS_Error::logIfError($result)) {
                    $content[] = "--- Unable to create table column '{$column_name}' on blog_entries table.</pre>";
                    return false;
                } else {
                    $content[] = "--- Created '{$column_name}' column on blog_entries table.";
                }
            }
            $image_dir = $home_directory . 'images/blog/';
            if (!is_dir($image_dir)) {
                if (mkdir($image_dir)) {
                    $content[] = '--- Created Blog image directory for xmlrpc.';
                } else {
                    $content[] = '--- Unable to created Blog image directory for xmlrpc.';
                }
            } elseif (!is_writable($image_dir)) {
                $content[] = '--- images/blog directory is not writable. XMLRPC upload will not function.';
            }
            $files = array('templates/settings.tpl', 'templates/view.tpl');
            blogUpdateFiles($files, $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_6_0.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.6.1', '<'):
            $content[] = '<pre>';
            blogUpdateFiles(array('templates/settings.tpl'), $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_6_1.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.6.2', '<'):
            $content[] = '<pre>';
            blogUpdateFiles(array('templates/view.tpl', 'templates/settings.tpl', 'templates/style.css'), $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_6_2.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.6.3', '<'):
            $content[] = '<pre>
1.6.3 changes
----------------
+ Small fix to allow linkable images on cached pages.
</pre>';
        case version_compare($currentVersion, '1.7.0', '<'):
            $content[] = '<pre>';
            $db = new PHPWS_DB('blog_entries');
            if (PHPWS_Error::logIfError($db->addTableColumn('image_link', "varchar(255) NOT NULL default 'default'"))) {
                $content[] = '--- Unable to create image_link column on blog_entries table.</pre>';
                return false;
            } else {
                $content[] = '--- Created image_link column on blog_entries table';
            }
            PHPWS_Core::initModClass('filecabinet', 'Cabinet.php');
            if (Cabinet::convertImagesToFileAssoc('blog_entries', 'image_id')) {
                $content[] = '--- Converted images to new File Cabinet format.';
            } else {
                $content[] = '--- Could not convert images to new File Cabinet format.</pre>';
                return false;
            }
            blogUpdateFiles(array('templates/edit.tpl'), $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_7_0.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.7.1', '<'):
            if (!PHPWS_Boost::inBranch()) {
                $content[] = '<pre>' . file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_7_1.txt') . '</pre>';
            }
        case version_compare($currentVersion, '1.7.2', '<'):
            $db = new PHPWS_DB('blog_entries');
            if (PHPWS_Error::logIfError($db->addTableColumn('thumbnail', 'smallint not null default 0'))) {
                $content[] = 'Unable to create thumbnail column on blog_entries table.';
            }
            $content[] = '<pre>';
            blogUpdatefiles(array('templates/edit.tpl', 'templates/style.css', 'templates/view.tpl', 'templates/list.tpl', 'templates/settings.tpl'), $content);
            $content[] = '1.7.2 changes
-------------
+ Can use media or image thumbnails on blog listing page.
+ Blog uses new key datetime terminators.
+ File Cabinet style sheet called regardless of cache.
+ Indicators added for published status.
+ Fixed notice warning.
+ Re-added ability to limit folder view by module.
+ Blog uses new dbpager sorting headers.
+ Lets you use new comments approval.
+ Fixed bug with setting allow anonymous submissions.
+ Fixed forward message when entry creation encounters an error
+ js_calendar added to edit form.
</pre>';
        case version_compare($currentVersion, '1.8.0', '<'):
            $content[] = '<pre>';
            $files = array('templates/list.tpl', 'templates/purge_confirm.tpl', 'conf/config.php', 'img/');
            blogUpdateFiles($files, $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_8_0.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.8.1', '<'):
            $content[] = '<pre>';
            $files = array('templates/settings.tpl');
            blogUpdateFiles($files, $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = '1.8.1 changes
---------------------
+ Added ability to limit blog view to logged users only.
+ Added ability to lock view of all blog entries down to specific groups.
+ Blog uses break post.
+ /blog works again.';
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.8.2', '<'):
            $content[] = '<pre>';
            $files = array('templates/view_full.tpl', 'templates/view_list.tpl');
            blogUpdateFiles($files, $content);
            $content[] = '1.8.2 changes
---------------------
+ Blog templates now have have single view and multiple view
  templates.';
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.8.3', '<'):
            $content[] = '<pre>1.8.3 changes
---------------------
+ Hub/Branch changes.
+ Updated code to conform to php 5 strict standards.</pre>';
        case version_compare($currentVersion, '1.8.4', '<'):
            $content[] = '<pre>1.8.4 changes
---------------------
+ Removed caching to correct previous blog entries problems
</pre>';
        case version_compare($currentVersion, '1.9.0', '<'):
            $content[] = '<pre>1.9.0 changes
---------------------
+ Blog entry takes place in just one text field now.</pre>';
        case version_compare($currentVersion, '1.10.0', '<'):
            $content[] = '<pre>1.10.0 changes
---------------------
+ Rewrote image url hiding script
</pre>';
        case version_compare($currentVersion, '1.10.1', '<'):
            $content[] = '<pre>1.10.1 changes
---------------------
+ Blog guesses an entry point for an hr tag.
</pre>';
        case version_compare($currentVersion, '1.10.2', '<'):
            $content[] = '<pre>1.10.2 changes
---------------------
+ Updated icons to Font Awesome
+ Removed Categories from Blog
+ Create Blog link in miniadmin now works as intended.
+ Static methods set to avoid error notices.
</pre>';
        case version_compare($currentVersion, '1.10.3', '<'):
            $content[] = '<pre>1.10.3 changes
---------------------
+ Horizontal rules are acknowledged on save.
</pre>';
        case version_compare($currentVersion, '1.10.4', '<'):
            $content[] = '<pre>1.10.4 changes
---------------------
+ Removed Version code
</pre>';
        case version_compare($currentVersion, '1.10.5', '<'):
            $content[] = <<<EOF
<pre>1.10.5
------------
+ Added new datetimepicker for date fields.
</pre>
EOF;
    }
    // end of switch
    return true;
}
Ejemplo n.º 2
0
/**
 * @version $Id$
 * @author Matthew McNaney <mcnaney at gmail dot com>
 */
function pagesmith_update(&$content, $currentVersion)
{
    $home_dir = PHPWS_Boost::getHomeDir();
    switch ($currentVersion) {
        case version_compare($currentVersion, '1.0.1', '<'):
            $content[] = '<pre>';
            $db = new PHPWS_DB('ps_page');
            $result = $db->addTableColumn('front_page', 'smallint NOT NULL default 0');
            if (PHPWS_Error::logIfError($result)) {
                $content[] = "--- Unable to create table column 'front_page' on ps_page table.</pre>";
                return false;
            } else {
                $content[] = "--- Created 'front_page' column on ps_page table.";
            }
            $files = array('templates/page_list.tpl', 'javascript/update/head.js', 'conf/error.php', 'templates/page_templates/simple/page.tpl', 'templates/page_templates/twocolumns/page.tpl');
            pagesmithUpdateFiles($files, $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/pagesmith/boost/changes/1_0_1.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.0.2', '<'):
            $content[] = '<pre>';
            $dest_dir = $home_dir . 'javascript/modules/pagesmith/passinfo/';
            if (!is_dir($dest_dir)) {
                if (is_writable($home_dir . 'javascript/modules/pagesmith/') && @mkdir($dest_dir)) {
                    $content[] = '--- SUCCEEDED creating "javascript/modules/passinfo/" directory.';
                } else {
                    $content[] = 'PageSmith 1.0.2 requires the javascript/modules/pagesmith/ directory be writable.</pre>';
                    return false;
                }
            } elseif (!is_writable($dest_dir)) {
                $content[] = 'PageSmith 1.0.2 requires the javascript/modules/pagesmith/passinfo/ directory be writable.</pre>';
                return false;
            }
            $source_dir = PHPWS_SOURCE_DIR . 'mod/pagesmith/javascript/passinfo/';
            if (!PHPWS_File::copy_directory($source_dir, $dest_dir)) {
                $content[] = "--- FAILED copying to {$dest_dir}.</pre>";
                return false;
            } else {
                $content[] = "--- SUCCEEDED copying to {$dest_dir} directory.";
            }
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/pagesmith/boost/changes/1_0_2.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.0.3', '<'):
            $content[] = '<pre>';
            $source_dir = PHPWS_SOURCE_DIR . 'mod/pagesmith/templates/page_templates/text_only/';
            $dest_dir = $home_dir . 'templates/pagesmith/page_templates/text_only/';
            if (PHPWS_File::copy_directory($source_dir, $dest_dir)) {
                $content[] = "--- Successfully copied {$source_dir}\n    to {$dest_dir}\n";
            } else {
                $content[] = "--- Failed to copy {$source_dir} to {$dest_dir}</pre>";
                return false;
            }
            $files = array('conf/config.php');
            pagesmithUpdateFiles($files, $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/pagesmith/boost/changes/1_0_3.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.0.4', '<'):
            $content[] = '<pre>';
            $db = new PHPWS_DB('phpws_key');
            $db->addWhere('module', 'pagesmith');
            $db->addValue('edit_permission', 'edit_page');
            if (PHPWS_Error::logIfError($db->update())) {
                $content[] = 'Unable to update phpws_key table.</pre>';
                return false;
            } else {
                $content[] = 'Updated phpws_key table.';
            }
            $content[] = '1.0.4 changes
------------------
+ Fixed pagesmith edit permission.
+ PageSmith home pages were missing edit link.</pre>';
        case version_compare($currentVersion, '1.0.5', '<'):
            $content[] = '<pre>';
            pagesmithUpdateFiles(array('templates/page_templates/text_only/page.tpl'), $content);
            $content[] = '1.0.5 changes
----------------
+ Changed wording on move to front functionality
+ Added move to front to miniadmin
+ Fixed text_only template. Missing closing div tag.
</pre>';
        case version_compare($currentVersion, '1.0.6', '<'):
            $content[] = '<pre>
1.0.6 changes
-------------
+ Small fix to allow linkable images on cached pages.
</pre>';
        case version_compare($currentVersion, '1.0.7', '<'):
            $content[] = '<pre>';
            pagesmithUpdateFiles(array('templates/settings.tpl'), $content);
            $content[] = '1.0.7 changes
-------------
+ PageSmith can be set to automatically create a link when a new page
  is created.
+ Changing a page title now updates the menu link.
</pre>';
        case version_compare($currentVersion, '1.1.0', '<'):
            PHPWS_Core::initModClass('filecabinet', 'Cabinet.php');
            $content[] = '<pre>';
            Cabinet::convertImagesToFileAssoc('ps_block', 'type_id');
            $content[] = '--- Images converted for File Cabinet 2.0.0.';
            pagesmithUpdateFiles(array('javascript/passinfo/head.js', 'templates/page_templates/threesec/page.css', 'templates/page_templates/threesec/page.tpl', 'templates/page_templates/threesec/structure.xml', 'templates/page_templates/threesec/threesec.png'), $content);
            $content[] = '1.1.0 changes (unreleased)
-------------
+ PageSmith conforms to new File Cabinet update.
+ Added url parser to passinfo script to allow images to work with fck better.
</pre>';
        case version_compare($currentVersion, '1.2.1', '<'):
            $content[] = '<pre>';
            $source_tpl = PHPWS_SOURCE_DIR . 'mod/pagesmith/templates/page_templates/';
            $local_tpl = $home_dir . 'templates/pagesmith/page_templates/';
            $backup = $home_dir . 'templates/pagesmith/_page_templates/';
            $source_img = PHPWS_SOURCE_DIR . 'mod/pagesmith/img/folder_icons/';
            $local_img = $home_dir . 'images/mod/pagesmith/folder_icons/';
            if (is_dir($backup) || @PHPWS_File::copy_directory($local_tpl, $backup)) {
                $content[] = '--- Local page templates backed up to: ' . $backup;
            } else {
                $content[] = sprintf('--- Could not backup directory "%s" to "%s"</pre>', $local_tpl, $backup);
                return false;
            }
            if (PHPWS_File::copy_directory($source_tpl, $local_tpl)) {
                $content[] = '--- Local page templates updated.';
            } else {
                $content[] = sprintf('--- Could not copy directory "%s" to "%s"</pre>', $source_tpl, $local_tpl);
                return false;
            }
            if (PHPWS_File::copy_directory($source_img, $local_img)) {
                $content[] = '--- New page template icons copied locally.';
            } else {
                $content[] = sprintf('--- Could not copy directory "%s" to "%s"</pre>', $source_img, $local_img);
                return false;
            }
            if (!pagesmithSearchIndex()) {
                $content[] = '--- Unable to index pages in search. Check your error log.</pre>';
                return false;
            } else {
                $content[] = '--- Pages added to search';
            }
            $files = array('templates/pick_folder.tpl', 'templates/pick_template.tpl', 'templates/style.css', 'conf/folder_icons.php');
            pagesmithUpdateFiles($files, $content);
            $content[] = '1.2.1 changes
----------------
+ PageSmith now allows the sorting of templates
+ Page titles now added to search.
+ Wrong page ids don\'t 404. Send to message page.
+ Search indexing added to update and version raised.
+ Added search to pagesmith.
+ Changed to new url rewriting method.</pre>';
        case version_compare($currentVersion, '1.2.2', '<'):
            $content[] = '<pre>';
            $files = array('templates/page_list.tpl');
            pagesmithUpdateFiles($files, $content);
            $content[] = '
1.2.2 changes
---------------
+ Updated pagers to addSortHeaders.
+ Fixed direct access to page allowing view.
+ Front page does not alter page title.
+ Fixed some notices and a caching bug.
+ Changed wording on edit text windows.</pre>';
        case version_compare($currentVersion, '1.3.0', '<'):
            $db = new PHPWS_DB('ps_block');
            $db->dropTableColumn('btype');
            $db = new PHPWS_DB('ps_page');
            if (PHPWS_Error::logIfError($db->addTableColumn('parent_page', 'int NOT NULL default 0'))) {
                $content[] = 'Could not create ps_page.parent_page column.';
                return false;
            }
            if (PHPWS_Error::logIfError($db->addTableColumn('page_order', 'smallint NOT NULL default 0'))) {
                $content[] = 'Could not create ps_page.page_order column.';
                return false;
            }
            $db = new PHPWS_DB('ps_text');
            if (PHPWS_DB::getDBType() == 'mysql' || PHPWS_DB::getDBType() == 'mysqli') {
                if (PHPWS_Error::logIfError($db->alterColumnType('content', 'longtext NOT NULL'))) {
                    $content[] = 'Could not alter ps_text.content column.';
                }
            }
            $content[] = '<pre>';
            $files = array('javascript/passinfo/head.js', 'templates/page_form.tpl', 'javascript/delete_orphan/', 'javascript/confirm_delete/', 'javascript/update/head.js', 'templates/page_templates/threesec-tbl/', 'templates/orphans.tpl', 'templates/page_form.tpl', 'templates/page_frame.tpl', 'templates/page_list.tpl', 'templates/style.css', 'templates/sublist.tpl', 'templates/upload_template.tpl', 'img/add.png', 'img/delete.png', 'img/back.png', 'img/front.png');
            pagesmithUpdateFiles($files, $content);
            if (!PHPWS_Boost::inBranch()) {
                $content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/pagesmith/boost/changes/1_3_0.txt');
            }
            $content[] = '</pre>';
        case version_compare($currentVersion, '1.3.1', '<'):
            $content[] = '<pre>';
            $files = array('templates/page_templates/threesec/page.tpl', 'templates/page_templates/threesec-tbl/page.tpl', 'templates/settings.tpl');
            pagesmithUpdateFiles($files, $content);
            $content[] = '1.3.1 changes
---------------
+ Page cache refreshed on page save.
+ Updated threesec templates to conform with norm box-title,
  box-content layout
+ Added ability to lengthen or shorten pagesmith links.
+ Added fix so edit mode does not parse smarttags.</pre>';
        case version_compare($currentVersion, '1.3.2', '<'):
            $content[] = '<pre>';
            Users_Permission::registerPermissions('pagesmith', $content);
            pagesmithUpdateFiles(array('templates/page_templates/'), $content);
            $content[] = '1.3.2 changes
----------------
+ Update was missing a permission update
+ Wrong permission getting called on settings
+ All page templates now have a class called pagesmith-page
+ Removed padding from page templates</pre>';
        case version_compare($currentVersion, '1.3.3', '<'):
            $db = new PHPWS_DB('ps_text');
            if (PHPWS_Error::logIfError($db->alterColumnType('content', 'longtext'))) {
                $content[] = 'Could not alter ps_text.content column.';
                return false;
            } else {
                $content[] = 'Updated ps_text.content column';
            }
            $content[] = '<pre>';
            pagesmithUpdateFiles(array('javascript/disable_links/', 'javascript/update/head.js'), $content);
            $content[] = 'Version 1.3.3
--------------------------------------------------------------------
+ Made ps_text.content null instead of not null
+ Made a change in page editing. Text spaces receive text without
  formatting. Prior to this change the parseOutput was run before
  sending the data to the editor. This stripped data that may need
  editing.
  Now the text is sent to the editor without processing. After post
  the text IS processed. This fixed the filters. Anchors will be
  busted AFTER the edit post but I don\'t think they really need to
  work in edit mode.
+ Added javascript to prevent accidental link clicks in edit mode.
+ change_link was an id, changed to a class since there were several
  on a page.</pre>';
        case version_compare($currentVersion, '1.3.4', '<'):
            $content[] = '<pre>1.3.4 changes
-------------
+ Fixed link shortening
+ Restored missing placeholder width and height
+ Fixed lost text bug.
</pre>';
        case version_compare($currentVersion, '1.4.0', '<'):
            $content[] = '<pre>1.4.0 changes
-------------
+ Icon class implemented.
+ Fixed on disableLinks script.
+ Added black page check on saving. Prohibits empty content from being saved to the database.
+ Added option to turn off "Back to top" links.
+ Added default installation page.
+ PHP 5 strict fixes.</pre>';
        case version_compare($currentVersion, '1.4.1', '<'):
            $content[] = '<pre>1.4.1 changes
-------------
Fixed bug causing blank editors on edit.</pre>';
        case version_compare($currentVersion, '1.4.2', '<'):
            $content[] = '<pre>1.4.2 changes
-------------
+ Added conditionals to try and prevent blank page posting.
+ Updated javascript to jquery code.
+ Added some new templates.
.</pre>';
        case version_compare($currentVersion, '1.5.0', '<'):
            $content[] = '<pre>1.5.0 changes
---------------
+ New method of editing text. Click on text instead of edit image.
+ Javascript window replaced with Jquery dialog.
</pre>';
        case version_compare($currentVersion, '1.5.1', '<'):
            $content[] = '<pre>1.5.1 changes
---------------
+ Mouseover edit behavior changed.
+ Publish on date added.
</pre>';
        case version_compare($currentVersion, '1.5.2', '<'):
            $content[] = '<pre>1.5.2 changes
---------------
- Fixed error message
- Empty orphans are removed automatically.
- Dialog editor made modal.
</pre>';
        case version_compare($currentVersion, '1.5.3', '<'):
            $content[] = '<pre>1.5.3 changes
---------------
+ Edit hinting changed to Boostrap standard
+ Removed upload template tab and code
+ Font Awesome used in icons
+ Tweaked page listing.
+ Removed default background color from page template.
+ Fixed bug with pages saving untitled.
</pre>';
        case version_compare($currentVersion, '1.5.4', '<'):
            $content[] = '<pre>1.5.4 changes
---------------
+ Added titles to admin icons
+ Removed @ to prevent PHP warning message
+ Style changes to pager listing
+ Pop up width is relative to browser
</pre>';
        case version_compare($currentVersion, '1.6.0', '<'):
            $db = \Database::newDB();
            $table = $db->addTable('ps_page');
            $table->addFieldConditional('template', 'art');
            $table->addValue('template', 'banner');
            $db->update();
            $db->clearConditional();
            $table->reset();
            $c1 = $table->getFieldConditional('template', 'vtour');
            $c2 = $table->getFieldConditional('template', 'VTOUR');
            $db->addConditional($db->createConditional($c1, $c2, 'OR'));
            $table->addValue('template', 'threesec');
            $db->update();
            $content[] = '<pre>1.6.0 changes
---------------
+ Rewrote page templates to be Bootstrap compatible.
+ Removed art and vtour template.
</pre>';
        case version_compare($currentVersion, '1.6.1', '<'):
            $content[] = '<pre>1.6.1 changes
---------------
+ changed content editor pop up to use bootstrap modal instead of jquery dialog
+ Bootstrap styling to some UI elements
+ Back to top link pulled right with new icon
</pre>';
        case version_compare($currentVersion, '1.7.0', '<'):
            $content[] = <<<EOF
<pre>1.7.0 changes
------------------
+ Removed hardcoded h2 styles on some templates
+ Back to top default setting added
+ Clicking off edit window saves content
</pre>
EOF;
        case version_compare($currentVersion, '1.8.0', '<'):
            $db = \Database::newDB();
            $lb = $db->addTable('layout_box');
            $lb->addFieldConditional('module', 'pagesmith');
            $db->delete();
            $content[] = <<<EOF
<pre>1.8.0 changes
------------------
+ Removed all PageSmith pages from layout_box table. Was kept only for multiple front pages which no one used.
</pre>
EOF;
        case version_compare($currentVersion, '1.9.0', '<'):
            $db = \Database::newDB();
            $pp = $db->addTable('ps_page');
            $st = $pp->addDataType('show_title', 'smallint');
            $st->add();
            $content[] = <<<EOF
<pre>1.9.0 changes
------------------
+ Added: Ability to hide title
+ Changed: Pagesmith editing works within Bootstrap modals.
+ Changed: Adapted to work with CKEditor 4.
+ Changed: Front page is now Highlander style.
</pre>
EOF;
        case version_compare($currentVersion, '1.9.1', '<'):
            $db = \Database::newDB();
            $pp = $db->addTable('ps_page');
            if (!$pp->columnExists('hide_title') && $pp->columnExists('show_title')) {
                $dt = $pp->getDatatype('show_title');
                $dt->change('hide_title');
            }
            $content[] = <<<EOF
<pre>1.9.1 changes
------------------
+ Fixed: Code uses hide_title. Column name was show_title.
</pre>
EOF;
        case version_compare($currentVersion, '1.9.2', '<'):
            $content[] = <<<EOF
<pre>1.9.2 changes
------------------
+ Fixed: hide_title was not properly formated in install.sql
+ Fixed: Reduced edit popup window height.
+ Feature: Added save button to CKEditor that works in maximize.
+ Feature: Added page update check to page submission.
+ Change: Save button is styled and larger.
+ Change: New page defaults to Text Only template.
</pre>
EOF;
        case version_compare($currentVersion, '1.10.0', '<'):
            $db = \Database::newDB();
            $t1 = $db->addTable('ps_page');
            $dt = $t1->addDatatype('deleted', 'smallint');
            $dt->setDefault(0);
            $dt->add();
            $content[] = <<<EOF
<pre>
1.10.0 Changes
---------------
+ Deleted pages are kept in database
</pre>
EOF;
    }
    // end switch
    return true;
}