Changeset 3896:5f6bd0c3acef for inc/dbschema
- Timestamp:
- 09/26/18 11:37:28 (7 years ago)
- Branch:
- default
- Parents:
- 3892:b74e6ca1a0ed (diff), 3895:3e99d5a81e2c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
inc/dbschema/upgrade.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
inc/dbschema/upgrade.php
r3867 r3896 118 118 if (version_compare($version, '2.1.6', '<=')) { 119 119 # ie7js has been upgraded 120 $ie7files = array(120 $ie7files = [ 121 121 'ie7-base64.php ', 122 122 'ie7-content.htc', … … 139 139 'ie7-standard-p.js', 140 140 'ie7-xml-extras.js' 141 );141 ]; 142 142 foreach ($ie7files as $f) { 143 143 @unlink(DC_ROOT . '/admin/js/ie7/' . $f); … … 173 173 if (version_compare($version, '2.3', '<')) { 174 174 # Add global favorites 175 $init_fav = array();176 177 $init_fav['new_post'] = array('new_post', 'New entry', 'post.php',175 $init_fav = []; 176 177 $init_fav['new_post'] = ['new_post', 'New entry', 'post.php', 178 178 'images/menu/edit.png', 'images/menu/edit-b.png', 179 'usage,contentadmin', null, null );180 $init_fav['newpage'] = array('newpage', 'New page', 'plugin.php?p=pages&act=page',179 'usage,contentadmin', null, null]; 180 $init_fav['newpage'] = ['newpage', 'New page', 'plugin.php?p=pages&act=page', 181 181 'index.php?pf=pages/icon-np.png', 'index.php?pf=pages/icon-np-big.png', 182 'contentadmin,pages', null, null );183 $init_fav['media'] = array('media', 'Media manager', 'media.php',182 'contentadmin,pages', null, null]; 183 $init_fav['media'] = ['media', 'Media manager', 'media.php', 184 184 'images/menu/media.png', 'images/menu/media-b.png', 185 'media,media_admin', null, null );186 $init_fav['widgets'] = array('widgets', 'Presentation widgets', 'plugin.php?p=widgets',185 'media,media_admin', null, null]; 186 $init_fav['widgets'] = ['widgets', 'Presentation widgets', 'plugin.php?p=widgets', 187 187 'index.php?pf=widgets/icon.png', 'index.php?pf=widgets/icon-big.png', 188 'admin', null, null );189 $init_fav['blog_theme'] = array('blog_theme', 'Blog appearance', 'blog_theme.php',188 'admin', null, null]; 189 $init_fav['blog_theme'] = ['blog_theme', 'Blog appearance', 'blog_theme.php', 190 190 'images/menu/themes.png', 'images/menu/blog-theme-b.png', 191 'admin', null, null );191 'admin', null, null]; 192 192 193 193 $count = 0; 194 194 foreach ($init_fav as $k => $f) { 195 $t = array('name' => $f[0], 'title' => $f[1], 'url' => $f[2], 'small-icon' => $f[3],196 'large-icon' => $f[4], 'permissions' => $f[5], 'id' => $f[6], 'class' => $f[7] );195 $t = ['name' => $f[0], 'title' => $f[1], 'url' => $f[2], 'small-icon' => $f[3], 196 'large-icon' => $f[4], 'permissions' => $f[5], 'id' => $f[6], 'class' => $f[7]]; 197 197 $sqlstr = 'INSERT INTO ' . $core->prefix . 'pref (pref_id, user_id, pref_ws, pref_value, pref_type, pref_label) VALUES (' . 198 198 '\'' . sprintf("g%03s", $count) . '\',NULL,\'favorites\',\'' . serialize($t) . '\',\'string\',NULL);'; … … 202 202 203 203 # A bit of housecleaning for no longer needed files 204 $remfiles = array(204 $remfiles = [ 205 205 'admin/style/cat-bg.png', 206 206 'admin/style/footer-bg.png', … … 272 272 'themes/default/tpl/_mp3_player.html', 273 273 'themes/default/tpl/_top.html' 274 );275 $remfolders = array(274 ]; 275 $remfolders = [ 276 276 'inc/clearbricks/common', 277 277 'inc/clearbricks/dblayer', … … 296 296 'inc/clearbricks', 297 297 'themes/default/tpl' 298 );298 ]; 299 299 300 300 foreach ($remfiles as $f) { … … 380 380 381 381 # Add date and time formats 382 $date_formats = array('%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%Y/%m/%d', '%d.%m.%Y', '%b %e %Y', '%e %b %Y', '%Y %b %e',382 $date_formats = ['%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%Y/%m/%d', '%d.%m.%Y', '%b %e %Y', '%e %b %Y', '%Y %b %e', 383 383 '%a, %Y-%m-%d', '%a, %m/%d/%Y', '%a, %d/%m/%Y', '%a, %Y/%m/%d', '%B %e, %Y', '%e %B, %Y', '%Y, %B %e', '%e. %B %Y', 384 '%A, %B %e, %Y', '%A, %e %B, %Y', '%A, %Y, %B %e', '%A, %Y, %B %e', '%A, %e. %B %Y' );385 $time_formats = array('%H:%M', '%I:%M', '%l:%M', '%Hh%M', '%Ih%M', '%lh%M');384 '%A, %B %e, %Y', '%A, %e %B, %Y', '%A, %Y, %B %e', '%A, %Y, %B %e', '%A, %e. %B %Y']; 385 $time_formats = ['%H:%M', '%I:%M', '%l:%M', '%Hh%M', '%Ih%M', '%lh%M']; 386 386 if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { 387 387 $date_formats = array_map(function ($f) {return str_replace('%e', '%#d', $f);}, $date_formats); … … 573 573 574 574 # A bit of housecleaning for no longer needed files 575 $remfiles = array(575 $remfiles = [ 576 576 'admin/js/jquery/jquery.modal.js', 577 577 'admin/style/modal/close.png', … … 596 596 'plugins/tags/js/jquery.autocomplete.js', 597 597 'theme/ductile/ie.css' 598 );599 $remfolders = array(598 ]; 599 $remfolders = [ 600 600 'admin/style/modal', 601 601 'admin/js/tool-man', 602 602 'admin/js/ie7' 603 );603 ]; 604 604 605 605 foreach ($remfiles as $f) { … … 652 652 " OR setting_value = '/\\.(phps?|pht(ml)?|phl|s?html?|js|htaccess)[0-9]*$/i'"; 653 653 $core->con->execute($strReq); 654 } 655 656 if (version_compare($version, '2.15', '<')) { 657 # switch from jQuery 1.11.3 to 1.12.4 658 $strReq = 'UPDATE ' . $core->prefix . 'setting ' . 659 " SET setting_value = '1.12.4' " . 660 " WHERE setting_id = 'jquery_version' " . 661 " AND setting_ns = 'system' " . 662 " AND setting_value = '1.11.3' "; 663 $core->con->execute($strReq); 664 665 # A bit of housecleaning for no longer needed files 666 $remfiles = [ 667 'plugins/dcLegacyEditor/tpl/index.tpl', 668 'plugins/dcCKEditor/tpl/index.tpl' 669 ]; 670 foreach ($remfiles as $f) { 671 @unlink(DC_ROOT . '/' . $f); 672 } 654 673 } 655 674 … … 678 697 $value = @unserialize($rs->setting_value); 679 698 if (!$value) { 680 $value = array();699 $value = []; 681 700 } 682 701 settype($value, 'array'); … … 713 732 $value = @unserialize($rs->pref_value); 714 733 if (!$value) { 715 $value = array();734 $value = []; 716 735 } 717 736 settype($value, 'array');
Note: See TracChangeset
for help on using the changeset viewer.
