Version 3.4.5
This commit is contained in:
1 parent
fb6b5baabc
commit
e4478369d8
1360 files changed
+228921
-179445
No files matched your search
@@ -3,16 +3,16 @@
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board - requirements checker
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2012-05-21 09:09:36 -0400 (Mon, 21 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $ (Orginal: Mark)
|
||||
* @author $Author: ips_terabyte $ (Orginal: Mark)
|
||||
* @copyright (c) 2010 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 8th September 2010
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 10771 $
|
||||
*/
|
||||
|
||||
class core_upgradeCheck
|
||||
@@ -61,7 +61,7 @@ class core_upgradeCheck
|
||||
$appName = ipsRegistry::$applications[ $k ]['app_title'];
|
||||
$allVersions = IPSSetUp::fetchXmlAppVersions( $k );
|
||||
|
||||
return "The version of {$appName} you have installed will not work with this version of IP.Board. You must upgrade {$appName} to {$allVersions[ $v ]} or higher, or disable it in the Admin CP in order continue.";
|
||||
return "Установленная версия {$appName} не будет работать с этой версией IP.Board. Вы должны обновить {$appName} версии {$allVersions[ $v ]} или выше, или отключить приложение в админцентре для продолжения.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,24 +48,24 @@ $INSERT[] = "INSERT INTO emoticons (id, typed, image, clickable, emo_set, emo_po
|
||||
$INSERT[] = "INSERT INTO pfields_data (pf_id, pf_title, pf_desc, pf_content, pf_type, pf_not_null, pf_member_hide, pf_max_input, pf_member_edit, pf_position, pf_show_on_reg, pf_input_format, pf_admin_only, pf_topic_format, pf_group_id, pf_icon, pf_key) VALUES
|
||||
(1, 'AIM', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_aim.gif', 'aim'),
|
||||
(2, 'MSN', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_msn.gif', 'msn'),
|
||||
(3, 'Website URL', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_website.gif', 'website'),
|
||||
(3, 'Сайт', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_website.gif', 'website'),
|
||||
(4, 'ICQ', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_icq.gif', 'icq'),
|
||||
(5, 'Gender', '', 'u=Not Telling|m=Male|f=Female', 'drop', 0, 0, 0, 1, 0, 0, '', 0, '', 2, '', 'gender'),
|
||||
(6, 'Location', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '<span class=\'ft\'>{title}</span><span class=\'fc\'>{content}</span>', 2, '', 'location'),
|
||||
(7, 'Interests', '', '', 'textarea', 0, 0, 0, 1, 0, 0, '', 0, '', 2, '', 'interests'),
|
||||
(5, 'Пол', '', 'u=Не определился|m=Мужчина|f=Женщина', 'drop', 0, 0, 0, 1, 0, 0, '', 0, '', 2, '', 'gender'),
|
||||
(6, 'Город', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '<span class=\'ft\'>{title}</span><span class=\'fc\'>{content}</span>', 2, '', 'location'),
|
||||
(7, 'Интересы', '', '', 'textarea', 0, 0, 0, 1, 0, 0, '', 0, '', 2, '', 'interests'),
|
||||
(8, 'Yahoo', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_yahoo.gif', 'yahoo'),
|
||||
(9, 'Jabber', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_jabber.gif', 'jabber'),
|
||||
(10, 'Skype', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_skype.gif', 'skype')";
|
||||
|
||||
$INSERT[] = "INSERT INTO pfields_groups (pf_group_id, pf_group_name, pf_group_key) VALUES
|
||||
(1, 'Contact Methods', 'contact'),
|
||||
(2, 'Profile Information', 'profile_info')";
|
||||
(1, 'Контакты', 'contact'),
|
||||
(2, 'Информация', 'profile_info')";
|
||||
|
||||
$INSERT[] = "INSERT INTO core_sys_lang VALUES(1, 'en_US', 'English (USA)', 1, 0, 1)";
|
||||
$INSERT[] = "INSERT INTO core_sys_lang VALUES(1, 'ru_RU.UTF-8', 'Русский (RU)', 1, 0, 1)";
|
||||
|
||||
$INSERT[] = "INSERT INTO titles (id, posts, title, pips) VALUES (1, 0, 'Newbie', '1');";
|
||||
$INSERT[] = "INSERT INTO titles (id, posts, title, pips) VALUES (2, 10, 'Member', '2');";
|
||||
$INSERT[] = "INSERT INTO titles (id, posts, title, pips) VALUES (4, 30, 'Advanced Member', '3');";
|
||||
$INSERT[] = "INSERT INTO titles (id, posts, title, pips) VALUES (1, 0, 'Новичок', '1');";
|
||||
$INSERT[] = "INSERT INTO titles (id, posts, title, pips) VALUES (2, 10, 'Пользователь', '2');";
|
||||
$INSERT[] = "INSERT INTO titles (id, posts, title, pips) VALUES (4, 30, 'Продвинутый пользователь', '3');";
|
||||
|
||||
$INSERT[] ="INSERT INTO permission_index VALUES(1, 'members', 'profile_view', 1, '*', '', '', '', '', '', '', 0, 0, NULL)";
|
||||
$INSERT[] ="INSERT INTO permission_index VALUES(2, 'core', 'help', 1, '*', '', '', '', '', '', '', 0, 0, NULL)";
|
||||
@@ -74,25 +74,25 @@ $INSERT[] ="INSERT INTO permission_index VALUES(2, 'core', 'help', 1, '*', '', '
|
||||
|
||||
$INSERT[] = <<<EOF
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd, app)
|
||||
VALUES(1, 'Simple Plugin Example', 'Plugin that does not require any programming, but does need to be configured.', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'default', ',3,4,6,', ',4,6,', 'a:5:{s:14:"required_input";a:1:{s:8:"video_id";s:13:"[^A-Za-z0-9_]";}s:10:"string_url";s:41:"http://www.youtube.com/watch?v={video_id}";s:12:"string_title";s:25:"#PAGE_TITLE# ({video_id})";s:13:"section_title";s:7:"YouTube";s:11:"section_url";s:22:"http://www.youtube.com";}', 1, 'core');
|
||||
VALUES(1, 'Пример плагина', 'Плагин, не требующий написания кода, но требующий настройки.', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'default', ',3,4,6,', ',4,6,', 'a:5:{s:14:"required_input";a:1:{s:8:"video_id";s:13:"[^A-Za-z0-9_]";}s:10:"string_url";s:41:"http://www.youtube.com/watch?v={video_id}";s:12:"string_title";s:25:"#PAGE_TITLE# ({video_id})";s:13:"section_title";s:7:"YouTube";s:11:"section_url";s:22:"http://www.youtube.com";}', 1, 'core');
|
||||
EOF;
|
||||
$INSERT[] = <<<EOF
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd, app)
|
||||
VALUES(1, 'Forum Plugin', 'This is the plugin used for reporting posts on the forum.', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'post', ',1,2,3,4,6,', ',4,6,', 'a:1:{s:15:"report_supermod";i:1;}', 1, 'forums');
|
||||
VALUES(1, 'Плагин форума', 'Плагин жалоб на сообщения и темы в форумах.', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'post', ',1,2,3,4,6,', ',4,6,', 'a:1:{s:15:"report_supermod";i:1;}', 1, 'forums');
|
||||
EOF;
|
||||
$INSERT[] = <<<EOF
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd, app)
|
||||
VALUES(1, 'Private Messages Plugin', 'This plugin allows private messages to be reported', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'messages', ',1,2,3,4,6,', ',4,6,', 'a:1:{s:18:"plugi_messages_add";s:5:"4";}', 1, 'members');
|
||||
VALUES(1, 'Плагин личных сообщений', 'Плагин жалоб на личные сообщения', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'messages', ',1,2,3,4,6,', ',4,6,', 'a:1:{s:18:"plugi_messages_add";s:5:"4";}', 1, 'members');
|
||||
EOF;
|
||||
$INSERT[] = <<<EOF
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd, app)
|
||||
VALUES(1, 'Member Profiles', 'Allows you to report member profiles', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'profiles', ',1,2,3,4,6,', ',4,6,', 'N;', 1, 'members');
|
||||
VALUES(1, 'Плагин пользовательских профилей', 'Плагин жалоб на профили пользователей', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'profiles', ',1,2,3,4,6,', ',4,6,', 'N;', 1, 'members');
|
||||
EOF;
|
||||
|
||||
|
||||
$INSERT[] = "INSERT INTO rc_status VALUES(1, 'New Report', 1, 5, 1, 0, 1, 1);";
|
||||
$INSERT[] = "INSERT INTO rc_status VALUES(2, 'Under Review', 1, 5, 0, 0, 1, 2);";
|
||||
$INSERT[] = "INSERT INTO rc_status VALUES(3, 'Complete', 0, 0, 0, 1, 0, 3);";
|
||||
$INSERT[] = "INSERT INTO rc_status VALUES(1, 'Новая', 1, 5, 1, 0, 1, 1);";
|
||||
$INSERT[] = "INSERT INTO rc_status VALUES(2, 'Рассматривается', 1, 5, 0, 0, 1, 2);";
|
||||
$INSERT[] = "INSERT INTO rc_status VALUES(3, 'Завершена', 0, 0, 0, 1, 0, 3);";
|
||||
|
||||
$INSERT[] = <<<EOF
|
||||
INSERT INTO rc_status_sev (id, status, points, img, is_png, width, height) VALUES
|
||||
@@ -109,29 +109,30 @@ INSERT INTO rc_status_sev (id, status, points, img, is_png, width, height) VALUE
|
||||
(11, 2, 12, 'style_extra/report_icons/flag_red_review.png', 1, 16, 16);
|
||||
EOF;
|
||||
|
||||
$INSERT[] = "INSERT INTO reputation_levels VALUES(1, -20, 'Bad', '');";
|
||||
$INSERT[] = "INSERT INTO reputation_levels VALUES(2, -10, 'Poor', '');";
|
||||
$INSERT[] = "INSERT INTO reputation_levels VALUES(3, 0, 'Neutral', '');";
|
||||
$INSERT[] = "INSERT INTO reputation_levels VALUES(4, 10, 'Good', '');";
|
||||
$INSERT[] = "INSERT INTO reputation_levels VALUES(5, 20, 'Excellent', '');";
|
||||
$INSERT[] = "INSERT INTO reputation_levels VALUES(1, -20, 'Очень плохой', '');";
|
||||
$INSERT[] = "INSERT INTO reputation_levels VALUES(2, -10, 'Плохой', '');";
|
||||
$INSERT[] = "INSERT INTO reputation_levels VALUES(3, 0, 'Обычный', '');";
|
||||
$INSERT[] = "INSERT INTO reputation_levels VALUES(4, 10, 'Хороший', '');";
|
||||
$INSERT[] = "INSERT INTO reputation_levels VALUES(5, 20, 'Очень хороший', '');";
|
||||
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical) VALUES(1, 'Twitter', 'twitter', 1, 1, 1);";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical) VALUES(2, 'Facebook', 'facebook', 1, 2, 1);";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical) VALUES(3, 'Google Plus One', 'googleplusone', 1, 3, 1);";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical) VALUES(4, 'Digg', 'digg', 1, 4, 1);";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical) VALUES(5, 'Del.icio.us', 'delicious', 1, 6, 1);";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical) VALUES(6, 'Reddit', 'reddit', 1, 7, 1);";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical) VALUES(7, 'StumbleUpon', 'stumble', 1, 8, 1);";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical) VALUES(8, 'Email', 'email', 1, 9, 1);";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical) VALUES(10, 'Print', 'print', 1, 10, 0);";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical) VALUES(11, 'Download', 'download', 1, 11, 0);";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(1, 'Twitter', 'twitter', 1, 1, 1, '*');";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(2, 'Facebook', 'facebook', 1, 2, 1, '*');";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(3, 'Digg', 'digg', 1, 3, 1, '*');";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(4, 'Del.icio.us', 'delicious', 1, 4, 1, '*');";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(5, 'Вконтакте', 'vkontakte', 1, 5, 1, '*');";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(6, 'Мемори', 'memori', 1, 6, 1, '*');";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(7, 'БобрДобр', 'bobrdobr', 1, 7, 1, '*');";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(8, 'Email', 'email', 1, 7, 1, '*');";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(9, 'Google+', 'googleplusone', 1, 3, 1, '*');";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(10, 'Печать', 'print', 1, 10, 0, '*');";
|
||||
$INSERT[] = "INSERT INTO core_share_links (share_id, share_title, share_key, share_enabled, share_position, share_canonical, share_groups) VALUES(11, 'Скачать', 'download', 1, 11, 0, '*');";
|
||||
|
||||
$INSERT[] = "INSERT INTO members_warn_reasons (wr_id, wr_name, wr_points, wr_points_override, wr_remove, wr_remove_unit, wr_remove_override, wr_order)
|
||||
VALUES
|
||||
(1, 'Spamming', 1, 0, 0, 'h', 0, 1),
|
||||
(2, 'Inappropriate Language', 1, 0, 0, 'h', 0, 2),
|
||||
(3, 'Signature Violation', 1, 0, 0, 'h', 0, 3),
|
||||
(4, 'Abusive Behaviour', 1, 0, 0, 'h', 0, 4),
|
||||
(5, 'Topic Bumping', 1, 0, 0, 'h', 0, 5);";
|
||||
(1, 'Спам', 1, 0, 0, 'h', 0, 1),
|
||||
(2, 'Нецензурные выражения', 1, 0, 0, 'h', 0, 2),
|
||||
(3, 'Злоупотребление подписью', 1, 0, 0, 'h', 0, 3),
|
||||
(4, 'Асоциальное поведение', 1, 0, 0, 'h', 0, 4),
|
||||
(5, 'Черезмерный подъем тем', 1, 0, 0, 'h', 0, 5);";
|
||||
|
||||
|
||||
@@ -105,6 +105,28 @@ $TABLE[] = "CREATE TABLE attachments_type (
|
||||
KEY atype (atype_post),
|
||||
KEY atype_extension (atype_extension)
|
||||
);";
|
||||
$TABLE[] = "CREATE TABLE backup_vars (
|
||||
backup_var_key VARCHAR(255) NOT NULL DEFAULT '',
|
||||
backup_var_value TEXT,
|
||||
PRIMARY KEY (backup_var_key)
|
||||
);";
|
||||
$TABLE[] = "CREATE TABLE backup_log (
|
||||
log_id BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
log_row_count INT(10) NOT NULL DEFAULT 0,
|
||||
log_result TEXT,
|
||||
PRIMARY KEY (log_id)
|
||||
);";
|
||||
$TABLE[] = "CREATE TABLE backup_queue (
|
||||
queue_id BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
queue_entry_date INT(10) NOT NULL DEFAULT 0,
|
||||
queue_entry_type INT(1) NOT NULL DEFAULT 0,
|
||||
queue_entry_table VARCHAR(255) NOT NULL DEFAULT '',
|
||||
queue_entry_key VARCHAR(255) NOT NULL DEFAULT '',
|
||||
queue_entry_value VARCHAR(255) NOT NULL DEFAULT '',
|
||||
queue_entry_sql MEDIUMTEXT,
|
||||
PRIMARY KEY (queue_id),
|
||||
KEY date (queue_entry_date)
|
||||
);";
|
||||
$TABLE[] = "CREATE TABLE badwords (
|
||||
wid int(3) NOT NULL auto_increment,
|
||||
type varchar(250) NOT NULL default '',
|
||||
@@ -191,7 +213,7 @@ $TABLE[] = "CREATE TABLE core_like (
|
||||
PRIMARY KEY (like_id),
|
||||
KEY find_rel_likes (like_lookup_id,like_visible,like_is_anon,like_added),
|
||||
KEY like_member_id (like_member_id , like_visible , like_added),
|
||||
KEY like_lookup_area (like_lookup_area , like_visible),
|
||||
KEY like_lookup_area (like_lookup_area , like_visible, like_added),
|
||||
KEY notification_task ( like_notify_do, like_app (50), like_area (50), like_visible, like_notify_sent, like_notify_freq (50) )
|
||||
);";
|
||||
|
||||
@@ -276,18 +298,6 @@ $TABLE[] = "CREATE TABLE captcha (
|
||||
KEY captcha_date ( captcha_date )
|
||||
);";
|
||||
|
||||
$TABLE[] = "CREATE TABLE converge_local (
|
||||
converge_api_code varchar(32) NOT NULL default '',
|
||||
converge_product_id int(10) NOT NULL default 0,
|
||||
converge_added int(10) NOT NULL default 0,
|
||||
converge_ip_address varchar(46) NOT NULL default '',
|
||||
converge_url varchar(255) NOT NULL default '',
|
||||
converge_active int(1) NOT NULL default 0,
|
||||
converge_http_user varchar(255) NOT NULL default '',
|
||||
converge_http_pass varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY (converge_api_code),
|
||||
KEY converge_active (converge_active)
|
||||
);";
|
||||
$TABLE[] = "CREATE TABLE core_archive_log (
|
||||
archlog_id INT(10) AUTO_INCREMENT NOT NULL,
|
||||
archlog_app VARCHAR(255) NOT NULL DEFAULT 0,
|
||||
@@ -353,7 +363,7 @@ $TABLE[] = "CREATE TABLE core_hooks (
|
||||
hook_updated int NOT NULL default 0,
|
||||
hook_position mediumint(9) NOT NULL default 0,
|
||||
hook_extra_data text,
|
||||
hook_key varchar(32) default NULL,
|
||||
hook_key varchar(128) default NULL,
|
||||
hook_global_caches VARCHAR(255) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (hook_id),
|
||||
KEY hook_enabled (hook_enabled,hook_position),
|
||||
@@ -438,6 +448,7 @@ $TABLE[] = "CREATE TABLE core_share_links (
|
||||
share_enabled INT(1) NOT NULL DEFAULT 0,
|
||||
share_position INT(3) NOT NULL DEFAULT 0,
|
||||
share_canonical INT(1) NOT NULL DEFAULT 1,
|
||||
share_groups TEXT NULL,
|
||||
PRIMARY KEY share_id (share_id)
|
||||
);";
|
||||
|
||||
@@ -461,14 +472,6 @@ $TABLE[] = "CREATE TABLE core_share_links_log (
|
||||
KEY log_ip_address (log_ip_address)
|
||||
);";
|
||||
|
||||
$TABLE[] = "CREATE TABLE core_share_links_caches (
|
||||
cache_id INT(10) NOT NULL auto_increment,
|
||||
cache_key VARCHAR(255) NOT NULL default '',
|
||||
cache_data MEDIUMTEXT,
|
||||
cache_date INT(10) NOT NULL default 0,
|
||||
PRIMARY KEY cache_id( cache_id )
|
||||
);";
|
||||
|
||||
$TABLE[] = "CREATE TABLE core_soft_delete_log (
|
||||
sdl_id int(10) NOT NULL AUTO_INCREMENT,
|
||||
sdl_obj_id int(10) NOT NULL DEFAULT 0,
|
||||
@@ -481,6 +484,17 @@ $TABLE[] = "CREATE TABLE core_soft_delete_log (
|
||||
KEY look_up (sdl_obj_id,sdl_obj_key)
|
||||
);";
|
||||
|
||||
$TABLE[] = "CREATE TABLE core_sys_bookmarks (
|
||||
bookmark_id INT(10) NOT NULL AUTO_INCREMENT,
|
||||
bookmark_member_id INT(10) NOT NULL DEFAULT 0,
|
||||
bookmark_title VARCHAR(255) NOT NULL DEFAULT '',
|
||||
bookmark_url VARCHAR(255) NOT NULL DEFAULT '',
|
||||
bookmark_home INT(1) NOT NULL DEFAULT 0,
|
||||
bookmark_pos INT(5) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (bookmark_id),
|
||||
KEY bookmark_member_id (bookmark_member_id)
|
||||
);";
|
||||
|
||||
$TABLE[] = "CREATE TABLE core_sys_conf_settings (
|
||||
conf_id int(10) NOT NULL auto_increment,
|
||||
conf_title varchar(255) NOT NULL default '',
|
||||
@@ -547,6 +561,7 @@ $TABLE[] = "CREATE TABLE core_sys_lang_words (
|
||||
$TABLE[] = "CREATE TABLE core_sys_login (
|
||||
sys_login_id int(8) NOT NULL default 0,
|
||||
sys_cookie mediumtext,
|
||||
sys_bookmarks MEDIUMTEXT,
|
||||
PRIMARY KEY (sys_login_id)
|
||||
);";
|
||||
$TABLE[] = "CREATE TABLE core_sys_module (
|
||||
@@ -814,6 +829,7 @@ $TABLE[] = "CREATE TABLE mail_queue (
|
||||
mail_content text,
|
||||
mail_html_on int(1) NOT NULL default 0,
|
||||
mail_cc TEXT NULL DEFAULT NULL,
|
||||
mail_html_content MEDIUMTEXT,
|
||||
PRIMARY KEY (mail_id)
|
||||
);";
|
||||
$TABLE[] = "CREATE TABLE members (
|
||||
@@ -879,6 +895,8 @@ $TABLE[] = "CREATE TABLE members (
|
||||
fb_emailhash varchar(60) NOT NULL default '',
|
||||
fb_lastsync int(10) NOT NULL default 0,
|
||||
members_day_posts VARCHAR(32) NOT NULL default '0,0',
|
||||
vk_uid bigint(20) unsigned NOT NULL default '0',
|
||||
vk_token TEXT NULL,
|
||||
live_id VARCHAR( 32 ) NULL,
|
||||
twitter_id VARCHAR(255) NOT NULL DEFAULT '',
|
||||
twitter_token VARCHAR(255) NOT NULL DEFAULT '',
|
||||
@@ -889,6 +907,8 @@ $TABLE[] = "CREATE TABLE members (
|
||||
fb_token TEXT NULL,
|
||||
ips_mobile_token VARCHAR( 64 ) NULL,
|
||||
unacknowledged_warnings TINYINT(1) DEFAULT NULL,
|
||||
ipsconnect_id INT(10) NOT NULL DEFAULT 0,
|
||||
ipsconnect_revalidate_url TEXT NULL,
|
||||
PRIMARY KEY (member_id),
|
||||
KEY members_l_display_name (members_l_display_name),
|
||||
KEY members_l_username (members_l_username),
|
||||
@@ -960,7 +980,8 @@ $TABLE[] = "CREATE TABLE members_warn_logs (
|
||||
KEY wl_moderator (wl_moderator),
|
||||
KEY wl_date (wl_member,wl_date),
|
||||
KEY content (wl_content_app,wl_content_id1,wl_content_id2),
|
||||
KEY wl_expire_date (wl_expire_date)
|
||||
KEY wl_expire_date (wl_expire_date),
|
||||
KEY wl_expire ( wl_expire, wl_expire_date, wl_date )
|
||||
);";
|
||||
|
||||
$TABLE[] = "CREATE TABLE members_warn_reasons (
|
||||
@@ -1142,6 +1163,8 @@ $TABLE[] = "CREATE TABLE profile_portal (
|
||||
tc_last_sid_import VARCHAR(50) NULL DEFAULT '0',
|
||||
tc_photo text,
|
||||
tc_bwoptions int(10) unsigned NOT NULL default 0,
|
||||
vc_photo text,
|
||||
vk_bwoptions int(10) unsigned NOT NULL default 0,
|
||||
pp_customization mediumtext,
|
||||
pp_profile_update INT(10) UNSIGNED NOT NULL default '0',
|
||||
PRIMARY KEY (pp_member_id)
|
||||
@@ -1182,7 +1205,7 @@ $TABLE[] = "CREATE TABLE rc_classes (
|
||||
lockd tinyint(1) NOT NULL default 0,
|
||||
app VARCHAR( 32 ) NOT NULL,
|
||||
PRIMARY KEY (com_id),
|
||||
KEY onoff (onoff , mod_group_perm ( 255 ))
|
||||
KEY onoff (onoff, mod_group_perm(255))
|
||||
);";
|
||||
$TABLE[] = "CREATE TABLE rc_comments (
|
||||
id int(10) NOT NULL auto_increment,
|
||||
@@ -1345,6 +1368,13 @@ $TABLE[] = "CREATE TABLE rss_imported (
|
||||
KEY rss_imported_impid (rss_imported_impid)
|
||||
);";
|
||||
|
||||
$TABLE[] = "CREATE TABLE search_keywords (
|
||||
`keyword` varchar(250) NOT NULL,
|
||||
`count` int(11) NOT NULL DEFAULT '0',
|
||||
UNIQUE KEY `idx_keyword_unq` (`keyword`),
|
||||
KEY `idx_kw_cnt` (`keyword`,`count`)
|
||||
)";
|
||||
|
||||
$TABLE[] = "CREATE TABLE search_sessions (
|
||||
session_id VARCHAR(32) NOT NULL DEFAULT '',
|
||||
session_created INT(10) NOT NULL DEFAULT 0,
|
||||
@@ -1354,6 +1384,34 @@ $TABLE[] = "CREATE TABLE search_sessions (
|
||||
KEY session_updated (session_updated),
|
||||
PRIMARY KEY (session_id)
|
||||
);";
|
||||
|
||||
$TABLE[] = "CREATE TABLE search_visitors (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`member` int(11),
|
||||
`date` int(11) NOT NULL DEFAULT '0',
|
||||
`engine` varchar(50) NOT NULL,
|
||||
`keywords` varchar(250) NOT NULL,
|
||||
`url` varchar(2048) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_date_engine` (`date`,`engine`)
|
||||
)";
|
||||
|
||||
$TABLE[] = "CREATE TABLE seo_acronyms (
|
||||
a_id int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
a_short varchar(255) DEFAULT NULL,
|
||||
a_long varchar(255) DEFAULT NULL,
|
||||
a_semantic tinyint(1) DEFAULT NULL,
|
||||
a_casesensitive tinyint(1) DEFAULT NULL,
|
||||
PRIMARY KEY (a_id),
|
||||
KEY a_short (a_short)
|
||||
)";
|
||||
|
||||
$TABLE[] = "CREATE TABLE seo_meta (
|
||||
url TEXT NULL,
|
||||
name varchar(50) NOT NULL DEFAULT '',
|
||||
content text NOT NULL
|
||||
)";
|
||||
|
||||
$TABLE[] = "CREATE TABLE sessions (
|
||||
id varchar(60) NOT NULL default '0',
|
||||
member_name varchar(255) default NULL,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
@@ -637,12 +637,12 @@ class version_upgrade
|
||||
KEY new_reg(new_reg)
|
||||
);";
|
||||
|
||||
$SQL[]="create table ".ipsRegistry::dbFunctions()->getPrefix()."cache_store (
|
||||
/*$SQL[]="create table ".ipsRegistry::dbFunctions()->getPrefix()."cache_store (
|
||||
cs_key varchar(255) NOT NULL default '',
|
||||
cs_value text NULL,
|
||||
cs_extra varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY(cs_key)
|
||||
);";
|
||||
);";*/
|
||||
|
||||
$SQL[]="create table ".ipsRegistry::dbFunctions()->getPrefix()."email_logs (
|
||||
email_id int(10) NOT NULL auto_increment,
|
||||
@@ -934,7 +934,7 @@ class version_upgrade
|
||||
|
||||
function step_6()
|
||||
{
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."macro rename ibf_skin_macro;";
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."macro rename ".ipsRegistry::dbFunctions()->getPrefix()."skin_macro;";
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."skin_macro change can_remove macro_can_remove tinyint(1) default '0';";
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."groups add g_bypass_badwords tinyint(1) NOT NULL default '0';";
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."cache_store change cs_value cs_value mediumtext NULL;";
|
||||
@@ -1739,6 +1739,53 @@ class version_upgrade
|
||||
|
||||
function step_17()
|
||||
{
|
||||
if( !ipsRegistry::DB()->checkForTable('pfields_content') )
|
||||
{
|
||||
$SQL[] = "CREATE TABLE ".ipsRegistry::dbFunctions()->getPrefix()."pfields_content ( member_id mediumint(8) NOT NULL default 0, PRIMARY KEY (member_id) );";
|
||||
}
|
||||
|
||||
if( !ipsRegistry::DB()->checkForTable('pfields_data') )
|
||||
{
|
||||
$SQL[] = "CREATE TABLE ".ipsRegistry::dbFunctions()->getPrefix()."pfields_data (
|
||||
pf_id smallint(5) NOT NULL auto_increment,
|
||||
pf_title varchar(250) NOT NULL default '',
|
||||
pf_desc varchar(250) NOT NULL default '',
|
||||
pf_content text,
|
||||
pf_type varchar(250) NOT NULL default '',
|
||||
pf_not_null tinyint(1) NOT NULL default 0,
|
||||
pf_member_hide tinyint(1) NOT NULL default 0,
|
||||
pf_max_input smallint(6) NOT NULL default 0,
|
||||
pf_member_edit tinyint(1) NOT NULL default 0,
|
||||
pf_position smallint(6) NOT NULL default 0,
|
||||
pf_show_on_reg tinyint(1) NOT NULL default 0,
|
||||
pf_input_format text,
|
||||
pf_admin_only tinyint(1) NOT NULL default 0,
|
||||
pf_topic_format text,
|
||||
pf_group_id mediumint(4) unsigned NOT NULL,
|
||||
pf_icon varchar(255) default NULL,
|
||||
pf_key varchar(255) default NULL,
|
||||
pf_search_type varchar(5) NOT NULL default 'loose',
|
||||
pf_filtering TINYINT( 1 ) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (pf_id)
|
||||
);";
|
||||
}
|
||||
|
||||
if( !ipsRegistry::DB()->checkForTable('warn_logs') )
|
||||
{
|
||||
$SQL[] = "CREATE TABLE ".ipsRegistry::dbFunctions()->getPrefix()."warn_logs (
|
||||
wlog_id int(10) NOT NULL auto_increment,
|
||||
wlog_mid mediumint(8) NOT NULL default 0,
|
||||
wlog_notes text,
|
||||
wlog_contact varchar(250) NOT NULL default 'none',
|
||||
wlog_contact_content text,
|
||||
wlog_date int(10) NOT NULL default 0,
|
||||
wlog_type varchar(6) NOT NULL default 'pos',
|
||||
wlog_addedby mediumint(8) NOT NULL default 0,
|
||||
PRIMARY KEY (wlog_id),
|
||||
KEY wlog_mid (wlog_mid, wlog_date)
|
||||
);";
|
||||
}
|
||||
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."groups add g_attach_per_post int(10) NOT NULL default '0';";
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."topic_mmod add topic_approve tinyint(1) NOT NULL default '0';";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
@@ -714,7 +714,7 @@ class version_upgrade
|
||||
|
||||
function step_6()
|
||||
{
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."macro rename ibf_skin_macro;";
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."macro rename ".ipsRegistry::dbFunctions()->getPrefix()."skin_macro;";
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."skin_macro change can_remove macro_can_remove tinyint(1) default '0';";
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."groups add g_bypass_badwords tinyint(1) NOT NULL default '0';";
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."cache_store change cs_value cs_value mediumtext NULL;";
|
||||
@@ -1530,6 +1530,53 @@ class version_upgrade
|
||||
|
||||
function step_17()
|
||||
{
|
||||
if( !ipsRegistry::DB()->checkForTable('pfields_content') )
|
||||
{
|
||||
$SQL[] = "CREATE TABLE ".ipsRegistry::dbFunctions()->getPrefix()."pfields_content ( member_id mediumint(8) NOT NULL default 0, PRIMARY KEY (member_id) );";
|
||||
}
|
||||
|
||||
if( !ipsRegistry::DB()->checkForTable('pfields_data') )
|
||||
{
|
||||
$SQL[] = "CREATE TABLE ".ipsRegistry::dbFunctions()->getPrefix()."pfields_data (
|
||||
pf_id smallint(5) NOT NULL auto_increment,
|
||||
pf_title varchar(250) NOT NULL default '',
|
||||
pf_desc varchar(250) NOT NULL default '',
|
||||
pf_content text,
|
||||
pf_type varchar(250) NOT NULL default '',
|
||||
pf_not_null tinyint(1) NOT NULL default 0,
|
||||
pf_member_hide tinyint(1) NOT NULL default 0,
|
||||
pf_max_input smallint(6) NOT NULL default 0,
|
||||
pf_member_edit tinyint(1) NOT NULL default 0,
|
||||
pf_position smallint(6) NOT NULL default 0,
|
||||
pf_show_on_reg tinyint(1) NOT NULL default 0,
|
||||
pf_input_format text,
|
||||
pf_admin_only tinyint(1) NOT NULL default 0,
|
||||
pf_topic_format text,
|
||||
pf_group_id mediumint(4) unsigned NOT NULL,
|
||||
pf_icon varchar(255) default NULL,
|
||||
pf_key varchar(255) default NULL,
|
||||
pf_search_type varchar(5) NOT NULL default 'loose',
|
||||
pf_filtering TINYINT( 1 ) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (pf_id)
|
||||
);";
|
||||
}
|
||||
|
||||
if( !ipsRegistry::DB()->checkForTable('warn_logs') )
|
||||
{
|
||||
$SQL[] = "CREATE TABLE ".ipsRegistry::dbFunctions()->getPrefix()."warn_logs (
|
||||
wlog_id int(10) NOT NULL auto_increment,
|
||||
wlog_mid mediumint(8) NOT NULL default 0,
|
||||
wlog_notes text,
|
||||
wlog_contact varchar(250) NOT NULL default 'none',
|
||||
wlog_contact_content text,
|
||||
wlog_date int(10) NOT NULL default 0,
|
||||
wlog_type varchar(6) NOT NULL default 'pos',
|
||||
wlog_addedby mediumint(8) NOT NULL default 0,
|
||||
PRIMARY KEY (wlog_id),
|
||||
KEY wlog_mid (wlog_mid, wlog_date)
|
||||
);";
|
||||
}
|
||||
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."groups add g_attach_per_post int(10) NOT NULL default '0';";
|
||||
$SQL[] = "alter table ".ipsRegistry::dbFunctions()->getPrefix()."topic_mmod add topic_approve tinyint(1) NOT NULL default '0';";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,458 +1,465 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > IPB UPGRADE MODULE:: IPB 2.0.2 -> IPB 2.0.3
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: 23rd April 2004
|
||||
| > "So what, pop is dead - it's no great loss.
|
||||
So many facelifts, it's face flew off"
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class version_upgrade
|
||||
{
|
||||
/**
|
||||
* Custom HTML to show
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_output = '';
|
||||
|
||||
/**
|
||||
* fetchs output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
//--------------------------------
|
||||
// What are we doing?
|
||||
//--------------------------------
|
||||
|
||||
switch( $this->request['workact'] )
|
||||
{
|
||||
case 'sql':
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
case 'sql1':
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
case 'sql2':
|
||||
$this->upgrade_sql(2);
|
||||
break;
|
||||
case 'sql3':
|
||||
$this->upgrade_sql(3);
|
||||
break;
|
||||
case 'sql4':
|
||||
$this->upgrade_sql(4);
|
||||
break;
|
||||
case 'polls':
|
||||
$this->convert_polls();
|
||||
break;
|
||||
case 'calevents':
|
||||
$this->convert_calevents();
|
||||
break;
|
||||
case 'skin':
|
||||
$this->add_skin();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
}
|
||||
|
||||
if ( $this->request['workact'] )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// SQL: 0
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function upgrade_sql( $id=1 )
|
||||
{
|
||||
$man = 0; // Manual upgrade ? intval( $this->request['man'] );
|
||||
$cnt = 0;
|
||||
$SQL = array();
|
||||
$file = '_updates_'.$id.'.php';
|
||||
$output = "";
|
||||
$path = IPSLib::getAppDir( 'core' ) . '/setup/versions/upg_21003/' . strtolower( $this->registry->dbFunctions()->getDriverType() ) . $file;
|
||||
$prefix = $this->registry->dbFunctions()->getPrefix();
|
||||
|
||||
if ( is_file( $path ) )
|
||||
{
|
||||
require( $path );/*noLibHook*/
|
||||
|
||||
$this->error = array();
|
||||
$this->sqlcount = 0;
|
||||
$output = "";
|
||||
|
||||
$this->DB->return_die = 1;
|
||||
|
||||
foreach( $SQL as $query )
|
||||
{
|
||||
$this->DB->allow_sub_select = 1;
|
||||
$this->DB->error = '';
|
||||
|
||||
$query = str_replace( "<%time%>", time(), $query );
|
||||
|
||||
/* Need to tack on a prefix? */
|
||||
if ( $prefix )
|
||||
{
|
||||
$query = IPSSetUp::addPrefixToQuery( $query, $prefix );
|
||||
}
|
||||
|
||||
if ( IPSSetUp::getSavedData('man') )
|
||||
{
|
||||
$output .= preg_replace( "/\s{1,}/", " ", $query ) . "\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ! $query )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->DB->query( $query );
|
||||
|
||||
if ( $this->DB->error )
|
||||
{
|
||||
$this->registry->output->addError( $query."<br /><br />".$this->DB->error );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->sqlcount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage("{$this->sqlcount} queries ran....");
|
||||
}
|
||||
|
||||
//--------------------------------
|
||||
// Next page...
|
||||
//--------------------------------
|
||||
|
||||
$this->request['st'] = 0;
|
||||
|
||||
if ( $id != 4 )
|
||||
{
|
||||
$nextid = $id + 1;
|
||||
$this->request['workact'] = 'sql'.$nextid;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->request['workact'] = 'polls';
|
||||
}
|
||||
|
||||
if ( IPSSetUp::getSavedData('man') AND $output )
|
||||
{
|
||||
/* Create source file */
|
||||
if ( $this->registry->dbFunctions()->getDriverType() == 'mysql' )
|
||||
{
|
||||
$sourceFile = IPSSetUp::createSqlSourceFile( $output, '21003', $id );
|
||||
}
|
||||
|
||||
$this->_output = $this->registry->output->template()->upgrade_manual_queries( $output, $sourceFile );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// POLLS
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function convert_polls()
|
||||
{
|
||||
$start = intval($this->request['st']) > 0 ? intval($this->request['st']) : 0;
|
||||
$lend = 50;
|
||||
$end = $start + $lend;
|
||||
$max = intval(IPSSetUp::getSavedData('max'));
|
||||
$converted = intval(IPSSetUp::getSavedData('conv'));
|
||||
|
||||
//-----------------------------------------
|
||||
// First off.. grab number of polls to convert
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $max )
|
||||
{
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as max',
|
||||
'from' => 'topics',
|
||||
'where' => "poll_state IN ('open', 'close', 'closed')" ) );
|
||||
|
||||
$max = $total['max'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// In steps...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'topics',
|
||||
'where' => "poll_state IN ('open', 'close', 'closed' )",
|
||||
'limit' => array( 0, $lend ) ) );
|
||||
$o = $this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Do it...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->DB->getTotalRows($o) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Got some to convert!
|
||||
//-----------------------------------------
|
||||
|
||||
while ( $r = $this->DB->fetch($o) )
|
||||
{
|
||||
$converted++;
|
||||
|
||||
//-----------------------------------------
|
||||
// All done?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $converted >= $max )
|
||||
{
|
||||
$done = 1;
|
||||
}
|
||||
|
||||
$new_poll = array( 1 => array() );
|
||||
|
||||
$poll_data = $this->DB->buildAndFetch( array( 'select' => '*',
|
||||
'from' => 'polls',
|
||||
'where' => "tid=".$r['tid']
|
||||
) );
|
||||
if ( ! $poll_data['pid'] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! $poll_data['poll_question'] )
|
||||
{
|
||||
$poll_data['poll_question'] = $r['title'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Kick start new poll
|
||||
//-----------------------------------------
|
||||
|
||||
$new_poll[1]['question'] = $poll_data['poll_question'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Get OLD polls
|
||||
//-----------------------------------------
|
||||
|
||||
$poll_answers = unserialize( stripslashes( $poll_data['choices'] ) );
|
||||
|
||||
reset($poll_answers);
|
||||
|
||||
foreach ( $poll_answers as $entry )
|
||||
{
|
||||
$id = $entry[0];
|
||||
$choice = $entry[1];
|
||||
$votes = $entry[2];
|
||||
|
||||
$total_votes += $votes;
|
||||
|
||||
if ( strlen($choice) < 1 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$new_poll[ 1 ]['choice'][ $id ] = $choice;
|
||||
$new_poll[ 1 ]['votes'][ $id ] = $votes;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Got something?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( count( $new_poll[1]['choice'] ) )
|
||||
{
|
||||
$this->DB->update( 'polls' , array( 'choices' => serialize( $new_poll ) ), 'tid='.$r['tid'] );
|
||||
$this->DB->update( 'topics', array( 'poll_state' => 1 ), 'tid='.$r['tid'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$done = 1;
|
||||
}
|
||||
|
||||
|
||||
if ( ! $done )
|
||||
{
|
||||
$this->registry->output->addMessage("Polls: $start to $end completed....");
|
||||
$this->request['workact'] = 'polls';
|
||||
$this->request['st'] = $end;
|
||||
IPSSetUp::setSavedData('max', $max);
|
||||
IPSSetUp::setSavedData('conv', $converted);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->addMessage("Polls converted, proceeding to calendar events...");
|
||||
$this->request['workact'] = 'calevents';
|
||||
$this->request['st'] = '0';
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// CALENDAR EVENTS
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function convert_calevents()
|
||||
{
|
||||
$start = intval($this->request['st']) > 0 ? intval($this->request['st']) : 0;
|
||||
$lend = 50;
|
||||
$end = $start + $lend;
|
||||
|
||||
//-----------------------------------------
|
||||
// In steps...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'calendar_events',
|
||||
'limit' => array( $start, $lend ) ) );
|
||||
$o = $this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Do it...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->DB->getTotalRows($o) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Got some to convert!
|
||||
//-----------------------------------------
|
||||
|
||||
while ( $r = $this->DB->fetch($o) )
|
||||
{
|
||||
$recur_remap = array( 'w' => 1,
|
||||
'm' => 2,
|
||||
'y' => 3 );
|
||||
|
||||
$begin_date = IPSTime::date_getgmdate( $r['unix_stamp'] );
|
||||
$end_date = IPSTime::date_getgmdate( $r['end_unix_stamp'] );
|
||||
|
||||
if ( ! $begin_date OR ! $end_date )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$day = $begin_date['mday'];
|
||||
$month = $begin_date['mon'];
|
||||
$year = $begin_date['year'];
|
||||
|
||||
$end_day = $end_date['mday'];
|
||||
$end_month = $end_date['mon'];
|
||||
$end_year = $end_date['year'];
|
||||
|
||||
$_final_unix_from = gmmktime(0, 0, 0, $month, $day, $year );
|
||||
|
||||
//-----------------------------------------
|
||||
// Recur or ranged...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $r['event_repeat'] OR $r['event_ranged'] )
|
||||
{
|
||||
$_final_unix_to = gmmktime(11, 59, 59, $end_month, $end_day, $end_year);
|
||||
}
|
||||
else
|
||||
{
|
||||
$_final_unix_to = 0;
|
||||
}
|
||||
|
||||
$new_event = array( 'event_calendar_id' => 1,
|
||||
'event_member_id' => $r['userid'],
|
||||
'event_content' => $r['event_text'],
|
||||
'event_title' => $r['title'],
|
||||
'event_smilies' => $r['show_emoticons'],
|
||||
'event_perms' => $r['read_perms'],
|
||||
'event_private' => $r['priv_event'],
|
||||
'event_approved' => 1,
|
||||
'event_unixstamp' => $r['unix_stamp'],
|
||||
'event_recurring' => ( $r['event_repeat'] && $recur_remap[ $r['repeat_unit'] ] ) ? $recur_remap[ $r['repeat_unit'] ] : 0,
|
||||
'event_tz' => 0,
|
||||
'event_unix_from' => $_final_unix_from,
|
||||
'event_unix_to' => $_final_unix_to );
|
||||
|
||||
//-----------------------------------------
|
||||
// INSERT
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->insert( 'cal_events', $new_event );
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage("Calendar events: $start to $end completed....");
|
||||
$this->request['workact'] = 'calevents';
|
||||
$this->request['st'] = $end;
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->addMessage("Calendar events converted, Creating new IPB 2.1 skin...");
|
||||
$this->request['workact'] = 'skin';
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// CALENDAR EVENTS
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function add_skin()
|
||||
{
|
||||
$this->registry->output->addMessage("Skipping 2.1 skin creation (latest skin will be inserted later)...");
|
||||
unset($this->request['workact']);
|
||||
return TRUE;
|
||||
}
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > IPB UPGRADE MODULE:: IPB 2.0.2 -> IPB 2.0.3
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: 23rd April 2004
|
||||
| > "So what, pop is dead - it's no great loss.
|
||||
So many facelifts, it's face flew off"
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class version_upgrade
|
||||
{
|
||||
/**
|
||||
* Custom HTML to show
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_output = '';
|
||||
|
||||
/**
|
||||
* fetchs output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
//--------------------------------
|
||||
// What are we doing?
|
||||
//--------------------------------
|
||||
|
||||
switch( $this->request['workact'] )
|
||||
{
|
||||
case 'sql':
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
case 'sql1':
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
case 'sql2':
|
||||
$this->upgrade_sql(2);
|
||||
break;
|
||||
case 'sql3':
|
||||
$this->upgrade_sql(3);
|
||||
break;
|
||||
case 'sql4':
|
||||
$this->upgrade_sql(4);
|
||||
break;
|
||||
case 'polls':
|
||||
$this->convert_polls();
|
||||
break;
|
||||
case 'calevents':
|
||||
$this->convert_calevents();
|
||||
break;
|
||||
case 'skin':
|
||||
$this->add_skin();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
}
|
||||
|
||||
if ( $this->request['workact'] )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// SQL: 0
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function upgrade_sql( $id=1 )
|
||||
{
|
||||
$man = 0; // Manual upgrade ? intval( $this->request['man'] );
|
||||
$cnt = 0;
|
||||
$SQL = array();
|
||||
$file = '_updates_'.$id.'.php';
|
||||
$output = "";
|
||||
$path = IPSLib::getAppDir( 'core' ) . '/setup/versions/upg_21003/' . strtolower( $this->registry->dbFunctions()->getDriverType() ) . $file;
|
||||
$prefix = $this->registry->dbFunctions()->getPrefix();
|
||||
|
||||
if ( is_file( $path ) )
|
||||
{
|
||||
require( $path );/*noLibHook*/
|
||||
|
||||
$this->error = array();
|
||||
$this->sqlcount = 0;
|
||||
$output = "";
|
||||
|
||||
$this->DB->return_die = 1;
|
||||
|
||||
foreach( $SQL as $query )
|
||||
{
|
||||
$this->DB->allow_sub_select = 1;
|
||||
$this->DB->error = '';
|
||||
|
||||
$query = str_replace( "<%time%>", time(), $query );
|
||||
|
||||
/* Need to tack on a prefix? */
|
||||
if ( $prefix )
|
||||
{
|
||||
$query = IPSSetUp::addPrefixToQuery( $query, $prefix );
|
||||
}
|
||||
|
||||
if ( IPSSetUp::getSavedData('man') )
|
||||
{
|
||||
$output .= preg_replace( "/\s{1,}/", " ", $query ) . "\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ! $query )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->DB->query( $query );
|
||||
|
||||
if ( $this->DB->error )
|
||||
{
|
||||
$this->registry->output->addError( $query."<br /><br />".$this->DB->error );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->sqlcount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage("{$this->sqlcount} запросов выполнено....");
|
||||
}
|
||||
|
||||
//--------------------------------
|
||||
// Next page...
|
||||
//--------------------------------
|
||||
|
||||
$this->request['st'] = 0;
|
||||
|
||||
if ( $id != 4 )
|
||||
{
|
||||
$nextid = $id + 1;
|
||||
$this->request['workact'] = 'sql'.$nextid;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->request['workact'] = 'polls';
|
||||
}
|
||||
|
||||
if ( IPSSetUp::getSavedData('man') AND $output )
|
||||
{
|
||||
/* Create source file */
|
||||
if ( $this->registry->dbFunctions()->getDriverType() == 'mysql' )
|
||||
{
|
||||
$sourceFile = IPSSetUp::createSqlSourceFile( $output, '21003', $id );
|
||||
}
|
||||
|
||||
$this->_output = $this->registry->output->template()->upgrade_manual_queries( $output, $sourceFile );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// POLLS
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function convert_polls()
|
||||
{
|
||||
$start = intval($this->request['st']) > 0 ? intval($this->request['st']) : 0;
|
||||
$lend = 50;
|
||||
$end = $start + $lend;
|
||||
$max = intval(IPSSetUp::getSavedData('max'));
|
||||
$converted = intval(IPSSetUp::getSavedData('conv'));
|
||||
|
||||
//-----------------------------------------
|
||||
// First off.. grab number of polls to convert
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $max )
|
||||
{
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as max',
|
||||
'from' => 'topics',
|
||||
'where' => "poll_state IN ('open', 'close', 'closed')" ) );
|
||||
|
||||
$max = $total['max'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// In steps...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'topics',
|
||||
'where' => "poll_state IN ('open', 'close', 'closed' )",
|
||||
'limit' => array( 0, $lend ) ) );
|
||||
$o = $this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Do it...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->DB->getTotalRows($o) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Got some to convert!
|
||||
//-----------------------------------------
|
||||
|
||||
while ( $r = $this->DB->fetch($o) )
|
||||
{
|
||||
$converted++;
|
||||
|
||||
//-----------------------------------------
|
||||
// All done?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $converted >= $max )
|
||||
{
|
||||
$done = 1;
|
||||
}
|
||||
|
||||
$new_poll = array( 1 => array() );
|
||||
|
||||
$poll_data = $this->DB->buildAndFetch( array( 'select' => '*',
|
||||
'from' => 'polls',
|
||||
'where' => "tid=".$r['tid']
|
||||
) );
|
||||
if ( ! $poll_data['pid'] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! $poll_data['poll_question'] )
|
||||
{
|
||||
$poll_data['poll_question'] = $r['title'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Kick start new poll
|
||||
//-----------------------------------------
|
||||
|
||||
$new_poll[1]['question'] = $poll_data['poll_question'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Get OLD polls
|
||||
//-----------------------------------------
|
||||
|
||||
$poll_answers = unserialize( stripslashes( $poll_data['choices'] ) );
|
||||
|
||||
reset($poll_answers);
|
||||
|
||||
foreach ( $poll_answers as $entry )
|
||||
{
|
||||
$id = $entry[0];
|
||||
$choice = $entry[1];
|
||||
$votes = $entry[2];
|
||||
|
||||
$total_votes += $votes;
|
||||
|
||||
if ( strlen($choice) < 1 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$new_poll[ 1 ]['choice'][ $id ] = $choice;
|
||||
$new_poll[ 1 ]['votes'][ $id ] = $votes;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Got something?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( count( $new_poll[1]['choice'] ) )
|
||||
{
|
||||
$this->DB->update( 'polls' , array( 'choices' => serialize( $new_poll ) ), 'tid='.$r['tid'] );
|
||||
$this->DB->update( 'topics', array( 'poll_state' => 1 ), 'tid='.$r['tid'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$done = 1;
|
||||
}
|
||||
|
||||
|
||||
if ( ! $done )
|
||||
{
|
||||
$this->registry->output->addMessage("Polls: $start to $end completed....");
|
||||
$this->request['workact'] = 'polls';
|
||||
$this->request['st'] = $end;
|
||||
IPSSetUp::setSavedData('max', $max);
|
||||
IPSSetUp::setSavedData('conv', $converted);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->addMessage("Polls converted, proceeding to calendar events...");
|
||||
$this->request['workact'] = 'calevents';
|
||||
$this->request['st'] = '0';
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// CALENDAR EVENTS
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function convert_calevents()
|
||||
{
|
||||
$start = intval($this->request['st']) > 0 ? intval($this->request['st']) : 0;
|
||||
$lend = 50;
|
||||
$end = $start + $lend;
|
||||
|
||||
//-----------------------------------------
|
||||
// In steps...
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$this->DB->checkForTable('calendar_events') )
|
||||
{
|
||||
$this->registry->output->addMessage("События календаря не найдены, Создается новый стиль внешнего вида IPB 2.1...");
|
||||
$this->request['workact'] = 'skin';
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'calendar_events',
|
||||
'limit' => array( $start, $lend ) ) );
|
||||
$o = $this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Do it...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->DB->getTotalRows($o) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Got some to convert!
|
||||
//-----------------------------------------
|
||||
|
||||
while ( $r = $this->DB->fetch($o) )
|
||||
{
|
||||
$recur_remap = array( 'w' => 1,
|
||||
'm' => 2,
|
||||
'y' => 3 );
|
||||
|
||||
$begin_date = IPSTime::date_getgmdate( $r['unix_stamp'] );
|
||||
$end_date = IPSTime::date_getgmdate( $r['end_unix_stamp'] );
|
||||
|
||||
if ( ! $begin_date OR ! $end_date )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$day = $begin_date['mday'];
|
||||
$month = $begin_date['mon'];
|
||||
$year = $begin_date['year'];
|
||||
|
||||
$end_day = $end_date['mday'];
|
||||
$end_month = $end_date['mon'];
|
||||
$end_year = $end_date['year'];
|
||||
|
||||
$_final_unix_from = gmmktime(0, 0, 0, $month, $day, $year );
|
||||
|
||||
//-----------------------------------------
|
||||
// Recur or ranged...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $r['event_repeat'] OR $r['event_ranged'] )
|
||||
{
|
||||
$_final_unix_to = gmmktime(11, 59, 59, $end_month, $end_day, $end_year);
|
||||
}
|
||||
else
|
||||
{
|
||||
$_final_unix_to = 0;
|
||||
}
|
||||
|
||||
$new_event = array( 'event_calendar_id' => 1,
|
||||
'event_member_id' => $r['userid'],
|
||||
'event_content' => $r['event_text'],
|
||||
'event_title' => $r['title'],
|
||||
'event_smilies' => $r['show_emoticons'],
|
||||
'event_perms' => $r['read_perms'],
|
||||
'event_private' => $r['priv_event'],
|
||||
'event_approved' => 1,
|
||||
'event_unixstamp' => $r['unix_stamp'],
|
||||
'event_recurring' => ( $r['event_repeat'] && $recur_remap[ $r['repeat_unit'] ] ) ? $recur_remap[ $r['repeat_unit'] ] : 0,
|
||||
'event_tz' => 0,
|
||||
'event_unix_from' => $_final_unix_from,
|
||||
'event_unix_to' => $_final_unix_to );
|
||||
|
||||
//-----------------------------------------
|
||||
// INSERT
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->insert( 'cal_events', $new_event );
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage("Calendar events: $start to $end completed....");
|
||||
$this->request['workact'] = 'calevents';
|
||||
$this->request['st'] = $end;
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->addMessage("Calendar events converted, Creating new IPB 2.1 skin...");
|
||||
$this->request['workact'] = 'skin';
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// CALENDAR EVENTS
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function add_skin()
|
||||
{
|
||||
$this->registry->output->addMessage("Skipping 2.1 skin creation (latest skin will be inserted later)...");
|
||||
unset($this->request['workact']);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,93 +1,93 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class version_upgrade
|
||||
{
|
||||
/**
|
||||
* Custom HTML to show
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_output = '';
|
||||
|
||||
/**
|
||||
* fetchs output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove dupe categories
|
||||
//-----------------------------------------
|
||||
|
||||
$title_id_to_keep = array();
|
||||
$title_id_to_delete = array();
|
||||
$title_deleted_count = 0;
|
||||
$msg = '';
|
||||
|
||||
$this->DB->build( array( 'select' => '*', 'from' => 'conf_settings_titles', 'order' => 'conf_title_id DESC' ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while ( $r = $this->DB->fetch() )
|
||||
{
|
||||
if ( $title_id_to_keep[ $r['conf_title_title'] ] )
|
||||
{
|
||||
$title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id'];
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $title_id_to_delete ) )
|
||||
{
|
||||
$this->DB->delete( 'conf_settings_titles', 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' );
|
||||
}
|
||||
|
||||
$title_deleted_count = intval( count($title_id_to_delete) );
|
||||
|
||||
$this->registry->output->addMessage("$title_deleted_count duplicate settings deleted");
|
||||
|
||||
return true;
|
||||
}
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class version_upgrade
|
||||
{
|
||||
/**
|
||||
* Custom HTML to show
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_output = '';
|
||||
|
||||
/**
|
||||
* fetchs output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove dupe categories
|
||||
//-----------------------------------------
|
||||
|
||||
$title_id_to_keep = array();
|
||||
$title_id_to_delete = array();
|
||||
$title_deleted_count = 0;
|
||||
$msg = '';
|
||||
|
||||
$this->DB->build( array( 'select' => '*', 'from' => 'conf_settings_titles', 'order' => 'conf_title_id DESC' ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while ( $r = $this->DB->fetch() )
|
||||
{
|
||||
if ( $title_id_to_keep[ $r['conf_title_title'] ] )
|
||||
{
|
||||
$title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id'];
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $title_id_to_delete ) )
|
||||
{
|
||||
$this->DB->delete( 'conf_settings_titles', 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' );
|
||||
}
|
||||
|
||||
$title_deleted_count = intval( count($title_id_to_delete) );
|
||||
|
||||
$this->registry->output->addMessage("$title_deleted_count дубликатов настроек удалено");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,386 +1,386 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class version_upgrade
|
||||
{
|
||||
/**
|
||||
* Custom HTML to show
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_output = '';
|
||||
|
||||
/**
|
||||
* fetchs output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
/* Set DB driver to return any errors */
|
||||
$this->DB->return_die = 1;
|
||||
|
||||
//--------------------------------
|
||||
// What are we doing?
|
||||
//--------------------------------
|
||||
|
||||
switch( $this->request['workact'] )
|
||||
{
|
||||
case 'sql':
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
case 'sql1':
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
case 'sql2':
|
||||
$this->upgrade_sql(2);
|
||||
break;
|
||||
case 'sql3':
|
||||
$this->upgrade_sql(3);
|
||||
break;
|
||||
case 'sql4':
|
||||
$this->upgrade_sql(4);
|
||||
break;
|
||||
case 'forums':
|
||||
$this->update_forums();
|
||||
break;
|
||||
case 'finish':
|
||||
$this->finish_up();
|
||||
break;
|
||||
case 'skin':
|
||||
$this->add_skin();
|
||||
break;
|
||||
case 'update_template_bits':
|
||||
$this->update_template_bits();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
}
|
||||
|
||||
if ( $this->request['workact'] )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// SQL: 0
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function upgrade_sql( $id=1 )
|
||||
{
|
||||
$man = 0; // Manual upgrade ? intval( $this->request['man'] );
|
||||
$cnt = 0;
|
||||
$SQL = array();
|
||||
$file = '_updates_'.$id.'.php';
|
||||
$output = "";
|
||||
$path = IPSLib::getAppDir( 'core' ) . '/setup/versions/upg_22005/' . strtolower( $this->registry->dbFunctions()->getDriverType() ) . $file;
|
||||
$prefix = $this->registry->dbFunctions()->getPrefix();
|
||||
|
||||
if ( is_file( $path ) )
|
||||
{
|
||||
require_once( $path );/*noLibHook*/
|
||||
|
||||
$this->sqlcount = 0;
|
||||
$output = "";
|
||||
|
||||
$this->DB->return_die = 1;
|
||||
|
||||
foreach( $SQL as $query )
|
||||
{
|
||||
$this->DB->allow_sub_select = 1;
|
||||
$this->DB->error = '';
|
||||
|
||||
$query = str_replace( "<%time%>", time(), $query );
|
||||
|
||||
if( $this->settings['mysql_tbl_type'] )
|
||||
{
|
||||
if( preg_match( "/^create table(.+?)/i", $query ) )
|
||||
{
|
||||
$query = preg_replace( "/^(.+?)\);$/is", "\\1) ENGINE={$this->settings['mysql_tbl_type']};", $query );
|
||||
}
|
||||
}
|
||||
|
||||
/* Need to tack on a prefix? */
|
||||
if ( $prefix )
|
||||
{
|
||||
$query = IPSSetUp::addPrefixToQuery( $query, $prefix );
|
||||
}
|
||||
|
||||
if ( IPSSetUp::getSavedData('man') )
|
||||
{
|
||||
$output .= preg_replace( "/\s{1,}/", " ", $query ) ."\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->DB->query( $query );
|
||||
|
||||
if ( $this->DB->error )
|
||||
{
|
||||
$this->registry->output->addError( $query."<br /><br />".$this->DB->error );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->sqlcount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage("$this->sqlcount queries ran....");
|
||||
}
|
||||
|
||||
//--------------------------------
|
||||
// Next page...
|
||||
//--------------------------------
|
||||
|
||||
$this->request['st'] = 0;
|
||||
|
||||
if ( $id != 4 )
|
||||
{
|
||||
$nextid = $id + 1;
|
||||
$this->request['workact'] = 'sql'.$nextid;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->request['workact'] = 'forums';
|
||||
}
|
||||
|
||||
if ( IPSSetUp::getSavedData('man') AND $output )
|
||||
{
|
||||
/* Create source file */
|
||||
if ( $this->registry->dbFunctions()->getDriverType() == 'mysql' )
|
||||
{
|
||||
$sourceFile = IPSSetUp::createSqlSourceFile( $output, '22005', $id );
|
||||
}
|
||||
|
||||
$this->_output = $this->registry->output->template()->upgrade_manual_queries( $output, $sourceFile );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Update forums
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function update_forums()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Update latest news...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->update( "forums", "newest_title=last_title, newest_id=last_id", 'last_title IS NOT NULL AND last_id IS NOT NULL', false, true );
|
||||
$this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$ignore_me = array( 'redirect_url', 'redirect_loc', 'rules_text', 'permission_custom_error', 'notify_modq_emails' );
|
||||
|
||||
if ( !empty($this->settings['forum_cache_minimum']) )
|
||||
{
|
||||
$ignore_me[] = 'description';
|
||||
$ignore_me[] = 'rules_title';
|
||||
}
|
||||
|
||||
$this->caches['forum_cache'] = array();
|
||||
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'forums',
|
||||
'order' => 'parent_id, position'
|
||||
) );
|
||||
$o = $this->DB->execute();
|
||||
|
||||
while( $f = $this->DB->fetch( $o ) )
|
||||
{
|
||||
$fr = array();
|
||||
|
||||
$perms = unserialize(stripslashes($f['permission_array']));
|
||||
|
||||
//-----------------------------------------
|
||||
// Stuff we don't need...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $f['parent_id'] == -1 )
|
||||
{
|
||||
$fr['id'] = $f['id'];
|
||||
$fr['sub_can_post'] = $f['sub_can_post'];
|
||||
$fr['name'] = $f['name'];
|
||||
$fr['parent_id'] = $f['parent_id'];
|
||||
$fr['show_perms'] = $perms['show_perms'];
|
||||
$fr['skin_id'] = $f['skin_id'];
|
||||
$fr['permission_showtopic'] = $f['permission_showtopic'];
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach( $f as $k => $v )
|
||||
{
|
||||
if ( in_array( $k, $ignore_me ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $v != "" )
|
||||
{
|
||||
$fr[ $k ] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$fr['read_perms'] = isset($perms['read_perms']) ? $perms['read_perms'] : '';
|
||||
$fr['reply_perms'] = isset($perms['reply_perms']) ? $perms['reply_perms'] : '';
|
||||
$fr['start_perms'] = isset($perms['start_perms']) ? $perms['start_perms'] : '';
|
||||
$fr['upload_perms'] = isset($perms['upload_perms']) ? $perms['upload_perms'] : '';
|
||||
$fr['download_perms'] = $perms['upload_perms'];
|
||||
$fr['show_perms'] = isset($perms['show_perms']) ? $perms['show_perms'] : '';
|
||||
|
||||
unset($fr['permission_array']);
|
||||
}
|
||||
|
||||
$this->caches['forum_cache'][ $fr['id'] ] = $fr;
|
||||
|
||||
$perm_array = addslashes(serialize(array(
|
||||
'start_perms' => $fr['start_perms'],
|
||||
'reply_perms' => $fr['reply_perms'],
|
||||
'read_perms' => $fr['read_perms'],
|
||||
'upload_perms' => $fr['upload_perms'],
|
||||
'download_perms' => $fr['download_perms'],
|
||||
'show_perms' => $fr['show_perms']
|
||||
) ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Add to save array
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->update( 'forums', array( 'permission_array' => $perm_array ), 'id='.$fr['id'] );
|
||||
|
||||
}
|
||||
|
||||
$this->cache->setCache( 'forum_cache', $this->caches['forum_cache'], array( 'array' => 1 ) );
|
||||
|
||||
$this->registry->output->addMessage("Download permissions added, Converting template bit HTML logic...");
|
||||
$this->request['workact'] = 'update_template_bits';
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Update template bits
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function update_template_bits()
|
||||
{
|
||||
$this->registry->output->addMessage("Template bits skipped, finishing up...");
|
||||
$this->request['workact'] = 'finish';
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Update forums
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function finish_up()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Has gallery?
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->return_die = 1;
|
||||
$this->DB->error = '';
|
||||
|
||||
$table = 'members';
|
||||
|
||||
if ( ! $this->DB->checkForField( 'has_gallery', $table ) )
|
||||
{
|
||||
$this->DB->addField( 'members', 'has_gallery', 'INT(1)', '0' );
|
||||
|
||||
if ( $this->DB->error )
|
||||
{
|
||||
$this->registry->output->addError( "ALTER TABLE {$this->DB->obj['sql_tbl_prefix']}members ADD has_gallery INT(1) default 0<br /><br />".$this->DB->error );
|
||||
}
|
||||
}
|
||||
|
||||
if( $this->settings['conv_configured'] != 1 OR $this->settings['conv_chosen'] == "" )
|
||||
{
|
||||
if( $this->DB->checkForField( "legacy_password", "members" ) )
|
||||
{
|
||||
$this->DB->dropField( 'members', 'legacy_password' );
|
||||
|
||||
if ( $this->DB->error )
|
||||
{
|
||||
$this->registry->output->addError( "ALTER TABLE {$this->DB->obj['sql_tbl_prefix']}members DROP legacy_password<br /><br />".$this->DB->error );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$test = $this->DB->buildAndFetch( array( 'select' => 'count(*) as numrows',
|
||||
'from' => 'cache_store',
|
||||
'where' => "cs_key='calendars'"
|
||||
) );
|
||||
|
||||
if ( ! $test['numrows'] )
|
||||
{
|
||||
$this->DB->insert( 'cache_store', array( 'cs_key' => 'calendars' ) );
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage("Clean up performed, Creating new IPB 2.2.0 skin...");
|
||||
$this->request['workact'] = 'skin';
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add new skin
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function add_skin()
|
||||
{
|
||||
$this->registry->output->addMessage("2.2.0 skin skipped...");
|
||||
unset($this->request['workact']);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class version_upgrade
|
||||
{
|
||||
/**
|
||||
* Custom HTML to show
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_output = '';
|
||||
|
||||
/**
|
||||
* fetchs output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
/* Set DB driver to return any errors */
|
||||
$this->DB->return_die = 1;
|
||||
|
||||
//--------------------------------
|
||||
// What are we doing?
|
||||
//--------------------------------
|
||||
|
||||
switch( $this->request['workact'] )
|
||||
{
|
||||
case 'sql':
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
case 'sql1':
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
case 'sql2':
|
||||
$this->upgrade_sql(2);
|
||||
break;
|
||||
case 'sql3':
|
||||
$this->upgrade_sql(3);
|
||||
break;
|
||||
case 'sql4':
|
||||
$this->upgrade_sql(4);
|
||||
break;
|
||||
case 'forums':
|
||||
$this->update_forums();
|
||||
break;
|
||||
case 'finish':
|
||||
$this->finish_up();
|
||||
break;
|
||||
case 'skin':
|
||||
$this->add_skin();
|
||||
break;
|
||||
case 'update_template_bits':
|
||||
$this->update_template_bits();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->upgrade_sql(1);
|
||||
break;
|
||||
}
|
||||
|
||||
if ( $this->request['workact'] )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// SQL: 0
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function upgrade_sql( $id=1 )
|
||||
{
|
||||
$man = 0; // Manual upgrade ? intval( $this->request['man'] );
|
||||
$cnt = 0;
|
||||
$SQL = array();
|
||||
$file = '_updates_'.$id.'.php';
|
||||
$output = "";
|
||||
$path = IPSLib::getAppDir( 'core' ) . '/setup/versions/upg_22005/' . strtolower( $this->registry->dbFunctions()->getDriverType() ) . $file;
|
||||
$prefix = $this->registry->dbFunctions()->getPrefix();
|
||||
|
||||
if ( is_file( $path ) )
|
||||
{
|
||||
require_once( $path );/*noLibHook*/
|
||||
|
||||
$this->sqlcount = 0;
|
||||
$output = "";
|
||||
|
||||
$this->DB->return_die = 1;
|
||||
|
||||
foreach( $SQL as $query )
|
||||
{
|
||||
$this->DB->allow_sub_select = 1;
|
||||
$this->DB->error = '';
|
||||
|
||||
$query = str_replace( "<%time%>", time(), $query );
|
||||
|
||||
if( $this->settings['mysql_tbl_type'] )
|
||||
{
|
||||
if( preg_match( "/^create table(.+?)/i", $query ) )
|
||||
{
|
||||
$query = preg_replace( "/^(.+?)\);$/is", "\\1) ENGINE={$this->settings['mysql_tbl_type']};", $query );
|
||||
}
|
||||
}
|
||||
|
||||
/* Need to tack on a prefix? */
|
||||
if ( $prefix )
|
||||
{
|
||||
$query = IPSSetUp::addPrefixToQuery( $query, $prefix );
|
||||
}
|
||||
|
||||
if ( IPSSetUp::getSavedData('man') )
|
||||
{
|
||||
$output .= preg_replace( "/\s{1,}/", " ", $query ) ."\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->DB->query( $query );
|
||||
|
||||
if ( $this->DB->error )
|
||||
{
|
||||
$this->registry->output->addError( $query."<br /><br />".$this->DB->error );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->sqlcount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage("$this->sqlcount запросов выполнено....");
|
||||
}
|
||||
|
||||
//--------------------------------
|
||||
// Next page...
|
||||
//--------------------------------
|
||||
|
||||
$this->request['st'] = 0;
|
||||
|
||||
if ( $id != 4 )
|
||||
{
|
||||
$nextid = $id + 1;
|
||||
$this->request['workact'] = 'sql'.$nextid;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->request['workact'] = 'forums';
|
||||
}
|
||||
|
||||
if ( IPSSetUp::getSavedData('man') AND $output )
|
||||
{
|
||||
/* Create source file */
|
||||
if ( $this->registry->dbFunctions()->getDriverType() == 'mysql' )
|
||||
{
|
||||
$sourceFile = IPSSetUp::createSqlSourceFile( $output, '22005', $id );
|
||||
}
|
||||
|
||||
$this->_output = $this->registry->output->template()->upgrade_manual_queries( $output, $sourceFile );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Update forums
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function update_forums()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Update latest news...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->update( "forums", "newest_title=last_title, newest_id=last_id", 'last_title IS NOT NULL AND last_id IS NOT NULL', false, true );
|
||||
$this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$ignore_me = array( 'redirect_url', 'redirect_loc', 'rules_text', 'permission_custom_error', 'notify_modq_emails' );
|
||||
|
||||
if ( !empty($this->settings['forum_cache_minimum']) )
|
||||
{
|
||||
$ignore_me[] = 'description';
|
||||
$ignore_me[] = 'rules_title';
|
||||
}
|
||||
|
||||
$this->caches['forum_cache'] = array();
|
||||
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'forums',
|
||||
'order' => 'parent_id, position'
|
||||
) );
|
||||
$o = $this->DB->execute();
|
||||
|
||||
while( $f = $this->DB->fetch( $o ) )
|
||||
{
|
||||
$fr = array();
|
||||
|
||||
$perms = unserialize(stripslashes($f['permission_array']));
|
||||
|
||||
//-----------------------------------------
|
||||
// Stuff we don't need...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $f['parent_id'] == -1 )
|
||||
{
|
||||
$fr['id'] = $f['id'];
|
||||
$fr['sub_can_post'] = $f['sub_can_post'];
|
||||
$fr['name'] = $f['name'];
|
||||
$fr['parent_id'] = $f['parent_id'];
|
||||
$fr['show_perms'] = $perms['show_perms'];
|
||||
$fr['skin_id'] = $f['skin_id'];
|
||||
$fr['permission_showtopic'] = $f['permission_showtopic'];
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach( $f as $k => $v )
|
||||
{
|
||||
if ( in_array( $k, $ignore_me ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $v != "" )
|
||||
{
|
||||
$fr[ $k ] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$fr['read_perms'] = isset($perms['read_perms']) ? $perms['read_perms'] : '';
|
||||
$fr['reply_perms'] = isset($perms['reply_perms']) ? $perms['reply_perms'] : '';
|
||||
$fr['start_perms'] = isset($perms['start_perms']) ? $perms['start_perms'] : '';
|
||||
$fr['upload_perms'] = isset($perms['upload_perms']) ? $perms['upload_perms'] : '';
|
||||
$fr['download_perms'] = $perms['upload_perms'];
|
||||
$fr['show_perms'] = isset($perms['show_perms']) ? $perms['show_perms'] : '';
|
||||
|
||||
unset($fr['permission_array']);
|
||||
}
|
||||
|
||||
$this->caches['forum_cache'][ $fr['id'] ] = $fr;
|
||||
|
||||
$perm_array = addslashes(serialize(array(
|
||||
'start_perms' => $fr['start_perms'],
|
||||
'reply_perms' => $fr['reply_perms'],
|
||||
'read_perms' => $fr['read_perms'],
|
||||
'upload_perms' => $fr['upload_perms'],
|
||||
'download_perms' => $fr['download_perms'],
|
||||
'show_perms' => $fr['show_perms']
|
||||
) ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Add to save array
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->update( 'forums', array( 'permission_array' => $perm_array ), 'id='.$fr['id'] );
|
||||
|
||||
}
|
||||
|
||||
$this->cache->setCache( 'forum_cache', $this->caches['forum_cache'], array( 'array' => 1 ) );
|
||||
|
||||
$this->registry->output->addMessage("Download permissions added, Converting template bit HTML logic...");
|
||||
$this->request['workact'] = 'update_template_bits';
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Update template bits
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function update_template_bits()
|
||||
{
|
||||
$this->registry->output->addMessage("Template bits skipped, finishing up...");
|
||||
$this->request['workact'] = 'finish';
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Update forums
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function finish_up()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Has gallery?
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->return_die = 1;
|
||||
$this->DB->error = '';
|
||||
|
||||
$table = 'members';
|
||||
|
||||
if ( ! $this->DB->checkForField( 'has_gallery', $table ) )
|
||||
{
|
||||
$this->DB->addField( 'members', 'has_gallery', 'INT(1)', '0' );
|
||||
|
||||
if ( $this->DB->error )
|
||||
{
|
||||
$this->registry->output->addError( "ALTER TABLE {$this->DB->obj['sql_tbl_prefix']}members ADD has_gallery INT(1) default 0<br /><br />".$this->DB->error );
|
||||
}
|
||||
}
|
||||
|
||||
if( $this->settings['conv_configured'] != 1 OR $this->settings['conv_chosen'] == "" )
|
||||
{
|
||||
if( $this->DB->checkForField( "legacy_password", "members" ) )
|
||||
{
|
||||
$this->DB->dropField( 'members', 'legacy_password' );
|
||||
|
||||
if ( $this->DB->error )
|
||||
{
|
||||
$this->registry->output->addError( "ALTER TABLE {$this->DB->obj['sql_tbl_prefix']}members DROP legacy_password<br /><br />".$this->DB->error );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$test = $this->DB->buildAndFetch( array( 'select' => 'count(*) as numrows',
|
||||
'from' => 'cache_store',
|
||||
'where' => "cs_key='calendars'"
|
||||
) );
|
||||
|
||||
if ( ! $test['numrows'] )
|
||||
{
|
||||
$this->DB->insert( 'cache_store', array( 'cs_key' => 'calendars' ) );
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage("Clean up performed, Creating new IPB 2.2.0 skin...");
|
||||
$this->request['workact'] = 'skin';
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add new skin
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function add_skin()
|
||||
{
|
||||
$this->registry->output->addMessage("2.2.0 skin skipped...");
|
||||
unset($this->request['workact']);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
# INSERTS AND UPDATES
|
||||
$SQL[] = <<<EOF
|
||||
INSERT INTO core_sys_lang VALUES (1, 'en_US', 'English (USA)', 'USD', '$', '.', ',', 1, 0);
|
||||
INSERT INTO core_sys_lang VALUES(1, 'ru_RU.UTF-8', 'Русский (RU)', 'USD', '$', '.', ',', 1, 0);
|
||||
EOF;
|
||||
|
||||
$SQL[] = <<<EOF
|
||||
@@ -24,27 +24,27 @@ INSERT INTO cache_store ( cs_key , cs_value , cs_extra , cs_array , cs_updated )
|
||||
EOF;
|
||||
|
||||
$SQL[] = <<<EOF
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd) VALUES(1, 'Simple Plugin Example', 'Plugin that does not require any programming, but does need to be configured.', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'default', ',1,2,3,4,6,', ',4,6,', 'a:5:{s:14:"required_input";a:1:{s:8:"video_id";s:13:"[^A-Za-z0-9_]";}s:10:"string_url";s:41:"http://www.youtube.com/watch?v={video_id}";s:12:"string_title";s:25:"#PAGE_TITLE# ({video_id})";s:13:"section_title";s:7:"YouTube";s:11:"section_url";s:22:"http://www.youtube.com";}', 1);
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd) VALUES(1, 'Пример плагина', 'Плагин, не требующий написания кода, но требующий настройки.', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'default', ',1,2,3,4,6,', ',4,6,', 'a:5:{s:14:"required_input";a:1:{s:8:"video_id";s:13:"[^A-Za-z0-9_]";}s:10:"string_url";s:41:"http://www.youtube.com/watch?v={video_id}";s:12:"string_title";s:25:"#PAGE_TITLE# ({video_id})";s:13:"section_title";s:7:"YouTube";s:11:"section_url";s:22:"http://www.youtube.com";}', 1);
|
||||
EOF;
|
||||
$SQL[] = <<<EOF
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd) VALUES(1, 'Forum Plugin', 'This is the plugin used for reporting posts on the forum.', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'post', ',1,2,3,4,6,', ',4,6,', 'a:1:{s:15:"report_supermod";i:1;}', 1);
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd) VALUES(1, 'Плагин форума', 'Плагин жалоб на сообщения и темы в форумах.', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'post', ',1,2,3,4,6,', ',4,6,', 'a:1:{s:15:"report_supermod";i:1;}', 1);
|
||||
EOF;
|
||||
$SQL[] = <<<EOF
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd) VALUES(1, 'Private Messages Plugin', 'This plugin allows private messages to be reported', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'messages', ',1,2,3,4,6,', ',4,6,', 'a:1:{s:18:"plugi_messages_add";s:5:"4,6,8";}', 1);
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd) VALUES(1, 'Плагин личных сообщений', 'Плагин жалоб на личные сообщения', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'messages', ',1,2,3,4,6,', ',4,6,', 'a:1:{s:18:"plugi_messages_add";s:5:"4,6,8";}', 1);
|
||||
EOF;
|
||||
$SQL[] = <<<EOF
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd) VALUES(1, 'Member Profiles', 'Allows you to report member profiles', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'profiles', ',1,2,3,4,6,', ',4,6,', 'N;', 1);
|
||||
INSERT INTO rc_classes (onoff, class_title, class_desc, author, author_url, pversion, my_class, group_can_report, mod_group_perm, extra_data, lockd) VALUES(1, 'Плагин пользовательских профилей', 'Плагин жалоб на профили пользователей', 'Invision Power Services, Inc', 'http://invisionpower.com', 'v1.0', 'profiles', ',1,2,3,4,6,', ',4,6,', 'N;', 1);
|
||||
EOF;
|
||||
|
||||
|
||||
$SQL[] = <<<EOF
|
||||
INSERT INTO rc_status VALUES (1, 'New Report', 1, 5, 1, 0, 1, 1);
|
||||
INSERT INTO rc_status VALUES (1, 'Новая', 1, 5, 1, 0, 1, 1);
|
||||
EOF;
|
||||
$SQL[] = <<<EOF
|
||||
INSERT INTO rc_status VALUES (2, 'Under Review', 1, 5, 0, 0, 1, 2);
|
||||
INSERT INTO rc_status VALUES (2, 'Рассматривается', 1, 5, 0, 0, 1, 2);
|
||||
EOF;
|
||||
$SQL[] = <<<EOF
|
||||
INSERT INTO rc_status VALUES (3, 'Complete', 0, 0, 0, 1, 0, 3);
|
||||
INSERT INTO rc_status VALUES (3, 'Завершена', 0, 0, 0, 1, 0, 3);
|
||||
EOF;
|
||||
|
||||
$SQL[] = <<<EOF
|
||||
@@ -64,20 +64,20 @@ EOF;
|
||||
|
||||
$SQL[] = <<<EOF
|
||||
INSERT INTO pfields_groups (pf_group_id, pf_group_name, pf_group_key) VALUES
|
||||
(1, 'Contact Methods', 'contact'),
|
||||
(2, 'Profile Information', 'profile_info'),
|
||||
(3, 'Previous Fields', 'previous' );
|
||||
(1, 'Контакты', 'contact'),
|
||||
(2, 'Информация', 'profile_info'),
|
||||
(3, 'Старые поля', 'previous' );
|
||||
EOF;
|
||||
|
||||
$SQL[] = <<<EOF
|
||||
INSERT INTO pfields_data (pf_id, pf_title, pf_desc, pf_content, pf_type, pf_not_null, pf_member_hide, pf_max_input, pf_member_edit, pf_position, pf_show_on_reg, pf_input_format, pf_admin_only, pf_topic_format, pf_group_id, pf_icon, pf_key) VALUES
|
||||
(NULL, 'AIM', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_aim.gif', 'aim'),
|
||||
(NULL, 'MSN', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_msn.gif', 'msn'),
|
||||
(NULL, 'Website URL', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_website.gif', 'website'),
|
||||
(NULL, 'Сайт', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_website.gif', 'website'),
|
||||
(NULL, 'ICQ', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_icq.gif', 'icq'),
|
||||
(NULL, 'Gender', '', 'm=Male|f=Female|u=Not Telling', 'drop', 0, 0, 0, 1, 0, 0, '', 0, '<dt>{title}:</dt><dd>{content}</dd>', 2, '', 'gender'),
|
||||
(NULL, 'Location', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '<dt>{title}:</dt><dd>{content}</dd>', 2, '', 'location'),
|
||||
(NULL, 'Interests', '', '', 'textarea', 0, 0, 0, 1, 0, 0, '', 0, '<dt>{title}:</dt><dd>{content}</dd>', 2, '', 'interests'),
|
||||
(NULL, 'Пол', '', 'm=Мужчина|f=Женщина|u=Не определился', 'drop', 0, 0, 0, 1, 0, 0, '', 0, '<dt>{title}:</dt><dd>{content}</dd>', 2, '', 'gender'),
|
||||
(NULL, 'Город', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '<dt>{title}:</dt><dd>{content}</dd>', 2, '', 'location'),
|
||||
(NULL, 'Интересы', '', '', 'textarea', 0, 0, 0, 1, 0, 0, '', 0, '<dt>{title}:</dt><dd>{content}</dd>', 2, '', 'interests'),
|
||||
(NULL, 'Yahoo', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_yahoo.gif', 'yahoo'),
|
||||
(NULL, 'Jabber', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_jabber.gif', 'jabber'),
|
||||
(NULL, 'Skype', '', '', 'input', 0, 0, 0, 1, 0, 0, '', 0, '', 1, 'style_extra/cprofile_icons/profile_skype.gif', 'skype');
|
||||
@@ -100,10 +100,10 @@ $SQL[] = "TRUNCATE TABLE task_manager;";
|
||||
$SQL[] = "DELETE FROM cache_store WHERE cs_key='skin_id_cache';";
|
||||
$SQL[] = "DELETE FROM cache_store WHERE cs_key='forum_cache';";
|
||||
|
||||
$SQL[] = "INSERT INTO reputation_levels VALUES(1, -20, 'Bad', '');";
|
||||
$SQL[] = "INSERT INTO reputation_levels VALUES(2, -10, 'Poor', '');";
|
||||
$SQL[] = "INSERT INTO reputation_levels VALUES(3, 0, 'Neutral', '');";
|
||||
$SQL[] = "INSERT INTO reputation_levels VALUES(4, 10, 'Good', '');";
|
||||
$SQL[] = "INSERT INTO reputation_levels VALUES(5, 20, 'Excellent', '');";
|
||||
$SQL[] = "INSERT INTO reputation_levels VALUES(1, -20, 'Очень плохой', '');";
|
||||
$SQL[] = "INSERT INTO reputation_levels VALUES(2, -10, 'Плохой', '');";
|
||||
$SQL[] = "INSERT INTO reputation_levels VALUES(3, 0, 'Обычный', '');";
|
||||
$SQL[] = "INSERT INTO reputation_levels VALUES(4, 10, 'Хороший', '');";
|
||||
$SQL[] = "INSERT INTO reputation_levels VALUES(5, 20, 'Очень хороший', '');";
|
||||
|
||||
?>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
@@ -21,6 +21,11 @@ class SQLVC
|
||||
$DB = ipsRegistry::DB();
|
||||
$PRE = ipsRegistry::dbFunctions()->getPrefix();
|
||||
|
||||
if( empty($field) )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return "UPDATE {$PRE}pfields_content p, {$PRE}member_extra m
|
||||
SET p.field_{$field['pf_id']}=m.{$old}
|
||||
WHERE p.member_id=m.id";
|
||||
|
||||
@@ -1,161 +1,161 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Upgrade Class
|
||||
*
|
||||
* Class to add options and notices for IP.Board upgrade
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author Matt Mecham <matt@invisionpower.com>
|
||||
* @version $Rev: 10914 $
|
||||
* @since 3.0
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @link http://www.invisionpower.com
|
||||
* @package IP.Board
|
||||
*/
|
||||
|
||||
class version_class_core_30001
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Form
|
||||
*
|
||||
* @return string HTML block
|
||||
*/
|
||||
public function preInstallOptionsForm()
|
||||
{
|
||||
return <<<EOF
|
||||
<ul>
|
||||
<li>
|
||||
<input type='checkbox' name='exportSkins' value='1' />
|
||||
Export current skin's modified template bits and CSS? (This will be saved in /cache/previousSkinFiles)
|
||||
</li>
|
||||
<li>
|
||||
<input type='checkbox' name='exportLangs' value='1' />
|
||||
Copy language PHP files into /cache/previousLangFiles before upgrading?
|
||||
</li>
|
||||
<li>
|
||||
<input type='checkbox' name='skipPms' value='1' />
|
||||
<strong>Skip</strong> PM Conversion? If so, old tables will not be removed and you can use the provided shell tool post-upgrade
|
||||
</li>
|
||||
<li>
|
||||
<input type='checkbox' name='rootAdmins' value='1' />
|
||||
<strong>Remove all "non-root" admin ACP permissions?</strong> Due to the change in permission models, root admins and admins have the same default permissions.
|
||||
You have the option to restrict all non-root admins and then manually set up their permissions after the upgrade. Not ticking this box will effectively give all
|
||||
administrators full access regardless of administrator type.
|
||||
</li>
|
||||
</ul>
|
||||
EOF;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Save
|
||||
*
|
||||
* Data will be saved in saved data array as: appOptions[ app ][ versionLong ] = ( key => value );
|
||||
*
|
||||
* @return array Key / value pairs to save
|
||||
*/
|
||||
public function preInstallOptionsSave()
|
||||
{
|
||||
/* Return */
|
||||
return array( 'exportSkins' => intval( $_REQUEST['exportSkins'] ),
|
||||
'exportLangs' => intval( $_REQUEST['exportLangs'] ),
|
||||
'skipPms' => intval( $_REQUEST['skipPms'] )
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Return any post-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function postInstallNotices()
|
||||
{
|
||||
$options = IPSSetUp::getSavedData('custom_options');
|
||||
$_doSkin = $options['core'][30001]['exportSkins'];
|
||||
$_doLang = $options['core'][30001]['exportLangs'];
|
||||
$rootAdmins = $options['core'][30001]['rootAdmins'];
|
||||
$skipPms = $options['core'][30001]['skipPms'];
|
||||
|
||||
$notices = array();
|
||||
|
||||
if ( $_doSkin )
|
||||
{
|
||||
$notices[] = "All previous skins have been exported into 'cache/previousSkinFiles'";
|
||||
}
|
||||
|
||||
if ( $_doLang )
|
||||
{
|
||||
$notices[] = "All previous language files have been exported into 'cache/previousLangFiles'";
|
||||
}
|
||||
|
||||
if ( $skipPms )
|
||||
{
|
||||
$notices[] = "PM Conversion was skipped. If you want to convert PMs, please use the provided shell tool found in your 'tools' directory of the download";
|
||||
}
|
||||
|
||||
/* Notice about post content */
|
||||
$notices[] = "You should now log into your Admin CP and rebuild post content (System > Recount & Rebuild)";
|
||||
|
||||
/* Notice about admin restrictions */
|
||||
$notices[] = "Due to the change in permission systems, any admins that had restrictions have been updated to have no access to any module until you edit them.";
|
||||
|
||||
/* Notice about admin restrictions */
|
||||
if ( $rootAdmins )
|
||||
{
|
||||
$notices[] = "Due to the change in permission systems, 'Root Admins' and 'Administrators' both have full access to the ACP including SQL toolbox, etc. You chose to remove all ACP permissions on upgrade. You can restore selective permissions via the ACP.";
|
||||
}
|
||||
else
|
||||
{
|
||||
$notices[] = "Due to the change in permission systems, 'Root Admins' and 'Administrators' both have full access to the ACP including SQL toolbox, etc. You can restrict individual admins using the ACP permission system.";
|
||||
}
|
||||
|
||||
/* Notice about custom time settings */
|
||||
$notices[] = "Due to the change in how times are shown, all custom time/clock formats have been reset.";
|
||||
|
||||
/* Notice about FURLs */
|
||||
$notices[] = "If you wish to use Friendly URLs, you will need to edit your conf_global.php file and add: \$INFO['use_friendly_urls'] = '1';. Once this is done run also the tool in \"ACP -> System TAB -> Recount & Rebuild -> Resynchronize Forums\".";
|
||||
|
||||
return $notices;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return any pre-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function preInstallNotices()
|
||||
{
|
||||
$notices = array();
|
||||
|
||||
$notices[] = "Skins made for prior versions will not be compatible with this version. The default skin will be restored.";
|
||||
|
||||
return $notices;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.5
|
||||
* Upgrade Class
|
||||
*
|
||||
* Class to add options and notices for IP.Board upgrade
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author Matt Mecham <matt@invisionpower.com>
|
||||
* @version $Rev: 10721 $
|
||||
* @since 3.0
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @link http://www.invisionpower.com
|
||||
* @package IP.Board
|
||||
*/
|
||||
|
||||
class version_class_core_30001
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Form
|
||||
*
|
||||
* @return string HTML block
|
||||
*/
|
||||
public function preInstallOptionsForm()
|
||||
{
|
||||
return <<<EOF
|
||||
<ul>
|
||||
<li>
|
||||
<input type='checkbox' name='exportSkins' value='1' />
|
||||
Экспортировать текущие шаблоны и CSS? (Будут сохранены в директории /cache/previousSkinFiles)
|
||||
</li>
|
||||
<li>
|
||||
<input type='checkbox' name='exportLangs' value='1' />
|
||||
Скопировать старые директории языков в /cache/previousLangFiles ?
|
||||
</li>
|
||||
<li>
|
||||
<input type='checkbox' name='skipPms' value='1' />
|
||||
<strong>Пропустить</strong> конвертацию личных сообщений? Старые сообщения будут оставлены, вы в любой момент сможете сконвертировать ЛС при помощи shell или утилиты в админцентре.
|
||||
</li>
|
||||
<li>
|
||||
<input type='checkbox' name='rootAdmins' value='1' />
|
||||
<strong>Запретить доступ в АЦ для неглавных администраторов?</strong> В систему распеределния прав в IP.Board 3 внесены изменения, поэтому больше нет необходимости разделять администраторов и главных администраторов на разные группы.
|
||||
Вы можете сохранить доступ в АЦ только для главных администраторов и вручную выставить права доступа. Если опция отключена, то
|
||||
все администраторы получат доступ в АЦ независимо от типа.
|
||||
</li>
|
||||
</ul>
|
||||
EOF;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Save
|
||||
*
|
||||
* Data will be saved in saved data array as: appOptions[ app ][ versionLong ] = ( key => value );
|
||||
*
|
||||
* @return array Key / value pairs to save
|
||||
*/
|
||||
public function preInstallOptionsSave()
|
||||
{
|
||||
/* Return */
|
||||
return array( 'exportSkins' => intval( $_REQUEST['exportSkins'] ),
|
||||
'exportLangs' => intval( $_REQUEST['exportLangs'] ),
|
||||
'skipPms' => intval( $_REQUEST['skipPms'] )
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Return any post-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function postInstallNotices()
|
||||
{
|
||||
$options = IPSSetUp::getSavedData('custom_options');
|
||||
$_doSkin = $options['core'][30001]['exportSkins'];
|
||||
$_doLang = $options['core'][30001]['exportLangs'];
|
||||
$rootAdmins = $options['core'][30001]['rootAdmins'];
|
||||
$skipPms = $options['core'][30001]['skipPms'];
|
||||
|
||||
$notices = array();
|
||||
|
||||
if ( $_doSkin )
|
||||
{
|
||||
$notices[] = "Все старые стили сохранены в 'cache/previousSkinFiles'";
|
||||
}
|
||||
|
||||
if ( $_doLang )
|
||||
{
|
||||
$notices[] = "Все старые языки сохранены в 'cache/previousLangFiles'";
|
||||
}
|
||||
|
||||
if ( $skipPms )
|
||||
{
|
||||
$notices[] = "Конвертация личных сообщений пропущена. Для конвертации личных сообщений в будущем воспользуйтесь shell-скриптом из директории 'tools' дистрибутива";
|
||||
}
|
||||
|
||||
/* Notice about post content */
|
||||
$notices[] = "Теперь вам необходимо обновить содержимое всех сообщений через админцентр (Система > Пересчет и обновление). <br />";
|
||||
|
||||
/* Notice about admin restrictions */
|
||||
$notices[] = "Из-за изменений в системе прав доступа. Все администраторы, имевшие ограничения, будут лишены доступа ко всем модулям, пока вы не измените права.";
|
||||
|
||||
/* Notice about admin restrictions */
|
||||
if ( $rootAdmins )
|
||||
{
|
||||
$notices[] = "Были сброшены все ограничения для доступа в админцентр Вы можете восстановить их через АЦ.<br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
$notices[] = "Все администраторы получили полный доступ к админцентру. Вы можете ограничить их доступ через АЦ.<br />";
|
||||
}
|
||||
|
||||
/* Notice about custom time settings */
|
||||
$notices[] = "Формат показа времени изменен в настройках.<br />";
|
||||
|
||||
/* Notice about FURLs */
|
||||
$notices[] = "Для использования Friendly URLs (ЧПУ), добавьте в ваш conf_global.php строчку: \$INFO['use_friendly_urls'] = '1';.";
|
||||
|
||||
return $notices;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return any pre-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function preInstallNotices()
|
||||
{
|
||||
$notices = array();
|
||||
|
||||
$notices[] = "Стили внешнего вида более ранних версий будут несовместимы с этой версией форума. Будет восстановлен стиль по-умолчанию.";
|
||||
|
||||
return $notices;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,84 +1,84 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class version_upgrade
|
||||
{
|
||||
/**
|
||||
* Custom HTML to show
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_output = '';
|
||||
|
||||
/**
|
||||
* fetchs output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
|
||||
/* Now make add a key */
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'pfields_data' ) );
|
||||
|
||||
$o = $this->DB->execute();
|
||||
|
||||
while( $row = $this->DB->fetch( $o ) )
|
||||
{
|
||||
/* Attempt conversion of dd / dt microformats */
|
||||
if ( stristr( $row['pf_topic_format'], '<dt>' ) OR stristr( $row['pf_topic_format'], '<dd>' ) )
|
||||
{
|
||||
$row['pf_topic_format'] = str_replace( '<dt>', "<span class='ft'>", $row['pf_topic_format'] );
|
||||
$row['pf_topic_format'] = str_replace( '<dd>', "<span class='fc'>", $row['pf_topic_format'] );
|
||||
$row['pf_topic_format'] = str_replace( array( '</dt>', '</dd>' ), "</span>", $row['pf_topic_format'] );
|
||||
|
||||
$this->DB->update( 'pfields_data', array( 'pf_topic_format' => $row['pf_topic_format'] ), 'pf_id=' . $row['pf_id'] );
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage( "Updated custom profile fields");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class version_upgrade
|
||||
{
|
||||
/**
|
||||
* Custom HTML to show
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_output = '';
|
||||
|
||||
/**
|
||||
* fetchs output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
|
||||
/* Now make add a key */
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'pfields_data' ) );
|
||||
|
||||
$o = $this->DB->execute();
|
||||
|
||||
while( $row = $this->DB->fetch( $o ) )
|
||||
{
|
||||
/* Attempt conversion of dd / dt microformats */
|
||||
if ( stristr( $row['pf_topic_format'], '<dt>' ) OR stristr( $row['pf_topic_format'], '<dd>' ) )
|
||||
{
|
||||
$row['pf_topic_format'] = str_replace( '<dt>', "<span class='ft'>", $row['pf_topic_format'] );
|
||||
$row['pf_topic_format'] = str_replace( '<dd>', "<span class='fc'>", $row['pf_topic_format'] );
|
||||
$row['pf_topic_format'] = str_replace( array( '</dt>', '</dd>' ), "</span>", $row['pf_topic_format'] );
|
||||
|
||||
$this->DB->update( 'pfields_data', array( 'pf_topic_format' => $row['pf_topic_format'] ), 'pf_id=' . $row['pf_id'] );
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage( "Обновление пользовательских полей профиля");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
@@ -361,12 +361,13 @@ $SQL[] = "INSERT INTO core_share_links VALUES(1, 'Twitter', 'http://twitter.com/
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(2, 'Facebook', 'http://www.facebook.com/share.php?u={url}', 'facebook', 1, 2, '',1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(3, 'Digg', 'http://digg.com/submit?phase=2&url={url}&title={title}', 'digg', 1, 3, '',1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(4, 'Del.icio.us', 'http://del.icio.us/post?v=2&url={url}&title={title}', 'delicious', 1, 4, '',1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(5, 'Reddit', 'http://reddit.com/submit?url={url}&title={title}', 'reddit', 1, 5, '',1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(6, 'StumbleUpon', 'http://www.stumbleupon.com/submit?url={url}&title={title}', 'stumble', 1, 6, '',1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(8, 'Email', '', 'email', 1, 7, '',1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(5, 'Вконтакте', 'http://vk.com/share.php?url={url}&title={title}', 'vkontakte', 1, 5, '',1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(6, 'Мемори', 'http://memori.ru/link/?sm=1&u_data[url]={url}&u_data[name]={title}', 'memori', 1, 6, '',1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(7, 'БобрДобр', 'http://bobrdobr.ru/addext.html?url={url}&title={title}', 'bobrdobr', 1, 7, '',1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(8, 'Email', '', 'email', 1, 8, '',1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(9, 'Buzz', '', 'buzz', 1, 3, '', 1);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(10, 'Print', '', 'print', 1, 10, '', 0);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(11, 'Download', '', 'download', 1, 11, '', 0);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(10, 'Печать', '', 'print', 1, 10, '', 0);";
|
||||
$SQL[] = "INSERT INTO core_share_links VALUES(11, 'Скачать', '', 'download', 1, 11, '', 0);";
|
||||
|
||||
/* Grab stuff */
|
||||
$DB->build( array( 'select' => '*',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
@@ -24,3 +24,12 @@ if ( ! $DB->checkForField( 'replacement_master_key', 'skin_replacements' ) )
|
||||
$SQL[] = "UPDATE skin_replacements SET replacement_master_key='root' WHERE replacement_set_id=0;";
|
||||
}
|
||||
|
||||
$SQL[] = "CREATE TABLE vkontakte_connect (
|
||||
v_key varchar(32) NOT NULL default '',
|
||||
v_user varchar(255) NOT NULL default '',
|
||||
v_data varchar(255) NOT NULL default '',
|
||||
v_id bigint(20) NOT NULL
|
||||
);";
|
||||
|
||||
$SQL[] = "ALTER TABLE members ADD vk_uid bigint(20) unsigned NOT NULL default '0';";
|
||||
$SQL[] = "ALTER TABLE members ADD INDEX vk_uid (vk_uid);";
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,114 +1,112 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Upgrade Class
|
||||
*
|
||||
* Class to add options and notices for IP.Board upgrade
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author Matt Mecham <matt@invisionpower.com>
|
||||
* @version $Rev: 10914 $
|
||||
* @since 3.0
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @link http://www.invisionpower.com
|
||||
* @package IP.Board
|
||||
*/
|
||||
|
||||
class version_class_core_32000
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Form
|
||||
*
|
||||
* @return string HTML block
|
||||
*/
|
||||
public function preInstallOptionsForm()
|
||||
{
|
||||
$_wrapper = "<ul>%s</ul>";
|
||||
$_html = '';
|
||||
$posts = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'posts' ) );
|
||||
|
||||
/* Got more than 100K posts? */
|
||||
if( $posts['total'] > 100000 )
|
||||
{
|
||||
$_html .= <<<EOF
|
||||
<li>
|
||||
<input type='checkbox' name='manualPostsTableQuery' value='1' checked='checked' />
|
||||
Manually apply changes to the posts table? Your site has more than 100,000 posts. We <b>strongly recommend</b> that you enable this option and manually run the provided
|
||||
SQL query to alter your posts table in order to prevent timeouts in the web-based upgrader. If you uncheck this option, it is very possible the upgrader will timeout attempting to
|
||||
update your posts table.
|
||||
</li>
|
||||
EOF;
|
||||
}
|
||||
|
||||
if( $_html )
|
||||
{
|
||||
return sprintf( $_wrapper, $_html );
|
||||
}
|
||||
else
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Save
|
||||
*
|
||||
* Data will be saved in saved data array as: appOptions[ app ][ versionLong ] = ( key => value );
|
||||
*
|
||||
* @return array Key / value pairs to save
|
||||
*/
|
||||
public function preInstallOptionsSave()
|
||||
{
|
||||
return array( 'manualPostsTableQuery' => intval( $_REQUEST['manualPostsTableQuery'] )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return any post-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function postInstallNotices()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return any pre-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function preInstallNotices()
|
||||
{
|
||||
$notices = array();
|
||||
|
||||
$notices[] = "All XML skins will be uninstalled during the upgrade.";
|
||||
|
||||
return $notices;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.5
|
||||
* Upgrade Class
|
||||
*
|
||||
* Class to add options and notices for IP.Board upgrade
|
||||
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author Matt Mecham <matt@invisionpower.com>
|
||||
* @version $Rev: 10721 $
|
||||
* @since 3.0
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @link http://www.invisionpower.com
|
||||
* @package IP.Board
|
||||
*/
|
||||
|
||||
class version_class_core_32000
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Form
|
||||
*
|
||||
* @return string HTML block
|
||||
*/
|
||||
public function preInstallOptionsForm()
|
||||
{
|
||||
$_wrapper = "<ul>%s</ul>";
|
||||
$_html = '';
|
||||
$posts = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'posts' ) );
|
||||
|
||||
/* Got more than 100K posts? */
|
||||
if( $posts['total'] > 100000 )
|
||||
{
|
||||
$_html .= <<<EOF
|
||||
<li>
|
||||
<input type='checkbox' name='manualPostsTableQuery' value='1' checked='checked' />
|
||||
Внести изменение в структуру таблицы сообщений вручную? Ваш форум содержит более 100,000 сообщений. Мы <b>крайне рекомендуем</b> чтобы вы включили эту опцию для предотвращения возможных проблем при обновлении мастером обновления. В процессе обновления мастер на необходимом шаге выведет запросы, которые вы должны будете выполнить напрямую в базе данных, после чего вам достаточно будет обновить страницу и процесс будет продолжен.
|
||||
</li>
|
||||
EOF;
|
||||
}
|
||||
|
||||
if( $_html )
|
||||
{
|
||||
return sprintf( $_wrapper, $_html );
|
||||
}
|
||||
else
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Save
|
||||
*
|
||||
* Data will be saved in saved data array as: appOptions[ app ][ versionLong ] = ( key => value );
|
||||
*
|
||||
* @return array Key / value pairs to save
|
||||
*/
|
||||
public function preInstallOptionsSave()
|
||||
{
|
||||
return array( 'manualPostsTableQuery' => intval( $_REQUEST['manualPostsTableQuery'] )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return any post-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function postInstallNotices()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return any pre-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function preInstallNotices()
|
||||
{
|
||||
$notices = array();
|
||||
|
||||
$notices[] = "При обновлении будут удалены все XML стили.";
|
||||
|
||||
return $notices;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
@@ -36,3 +36,8 @@ $SQL[] = "ALTER TABLE skin_collections ADD set_by_skin_gen INT(1) NOT NULL DEFAU
|
||||
|
||||
$SQL[] = "INSERT INTO core_share_links (share_title, share_key, share_enabled, share_position, share_canonical) VALUES('Google Plus One', 'googleplusone', 1, 2, 1);";
|
||||
$SQL[] = "DELETE FROM core_share_links WHERE share_key='buzz';";
|
||||
|
||||
$SQL[] = "DROP TABLE IF EXISTS vkontakte_connect;";
|
||||
|
||||
$SQL[] = "ALTER TABLE members ADD vk_token TEXT NULL;";
|
||||
$SQL[] = "ALTER TABLE profile_portal ADD vk_bwoptions INT UNSIGNED NOT NULL DEFAULT '0';";
|
||||
@@ -1,117 +1,117 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class version_upgrade
|
||||
{
|
||||
/**
|
||||
* Custom HTML to show
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_output = '';
|
||||
|
||||
/**
|
||||
* fetchs output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
//--------------------------------
|
||||
// What are we doing?
|
||||
//--------------------------------
|
||||
|
||||
switch( $this->request['workact'] )
|
||||
{
|
||||
default:
|
||||
case 'oldhooks':
|
||||
$this->removeOldHooks();
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove old hooks
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function removeOldHooks()
|
||||
{
|
||||
/* Hooks to remove */
|
||||
$hooks = array( 'sharelinks', 'fb_like' );
|
||||
$_hookIds = array();
|
||||
$_total = 0;
|
||||
|
||||
/* Get hook records */
|
||||
$this->DB->build( array( 'select' => 'hook_id', 'from' => 'core_hooks', 'where' => "hook_key IN('" . implode( "','", $hooks ) . "')" ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
$_hookIds[] = $r['hook_id'];
|
||||
}
|
||||
|
||||
/* Remove associated files */
|
||||
if( count($_hookIds) )
|
||||
{
|
||||
$this->DB->build( array( 'select' => 'hook_file_stored', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id IN(' . implode( ',', $_hookIds ) . ')' ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
@unlink( IPS_HOOKS_PATH . $r['hook_file_stored'] );
|
||||
}
|
||||
|
||||
/* Remove hook records */
|
||||
$this->DB->delete( 'core_hooks_files', 'hook_hook_id IN(' . implode( ',', $_hookIds ) . ')' );
|
||||
$this->DB->delete( 'core_hooks', 'hook_id IN(' . implode( ',', $_hookIds ) . ')' );
|
||||
|
||||
$_total++;
|
||||
}
|
||||
|
||||
/* Message */
|
||||
$this->registry->output->addMessage("{$_total} outdated hook(s) uninstalled....");
|
||||
|
||||
/* Next Page */
|
||||
$this->request['workact'] = '';
|
||||
}
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class version_upgrade
|
||||
{
|
||||
/**
|
||||
* Custom HTML to show
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_output = '';
|
||||
|
||||
/**
|
||||
* fetchs output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function fetchOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
//--------------------------------
|
||||
// What are we doing?
|
||||
//--------------------------------
|
||||
|
||||
switch( $this->request['workact'] )
|
||||
{
|
||||
default:
|
||||
case 'oldhooks':
|
||||
$this->removeOldHooks();
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove old hooks
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function removeOldHooks()
|
||||
{
|
||||
/* Hooks to remove */
|
||||
$hooks = array( 'sharelinks', 'fb_like' );
|
||||
$_hookIds = array();
|
||||
$_total = 0;
|
||||
|
||||
/* Get hook records */
|
||||
$this->DB->build( array( 'select' => 'hook_id', 'from' => 'core_hooks', 'where' => "hook_key IN('" . implode( "','", $hooks ) . "')" ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
$_hookIds[] = $r['hook_id'];
|
||||
}
|
||||
|
||||
/* Remove associated files */
|
||||
if( count($_hookIds) )
|
||||
{
|
||||
$this->DB->build( array( 'select' => 'hook_file_stored', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id IN(' . implode( ',', $_hookIds ) . ')' ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
@unlink( IPS_HOOKS_PATH . $r['hook_file_stored'] );
|
||||
}
|
||||
|
||||
/* Remove hook records */
|
||||
$this->DB->delete( 'core_hooks_files', 'hook_hook_id IN(' . implode( ',', $_hookIds ) . ')' );
|
||||
$this->DB->delete( 'core_hooks', 'hook_id IN(' . implode( ',', $_hookIds ) . ')' );
|
||||
|
||||
$_total++;
|
||||
}
|
||||
|
||||
/* Message */
|
||||
$this->registry->output->addMessage("{$_total} устаревших хуков удалено....");
|
||||
|
||||
/* Next Page */
|
||||
$this->request['workact'] = '';
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2009 Invision Power Services
|
||||
|
||||
@@ -61,11 +61,11 @@ $SQL[] = "CREATE TABLE members_warn_reasons (
|
||||
|
||||
$SQL[] = "INSERT INTO members_warn_reasons (wr_id, wr_name, wr_points, wr_points_override, wr_remove, wr_remove_unit, wr_remove_override, wr_order)
|
||||
VALUES
|
||||
(1, 'Spamming', 1, 0, 0, 'h', 0, 1),
|
||||
(2, 'Inappropriate Language', 1, 0, 0, 'h', 0, 2),
|
||||
(3, 'Signature Violation', 1, 0, 0, 'h', 0, 3),
|
||||
(4, 'Abusive Behaviour', 1, 0, 0, 'h', 0, 4),
|
||||
(5, 'Topic Bumping', 1, 0, 0, 'h', 0, 5);";
|
||||
(1, 'Спам', 1, 0, 0, 'h', 0, 1),
|
||||
(2, 'Нецензурные выражения', 1, 0, 0, 'h', 0, 2),
|
||||
(3, 'Злоупотребление подписью', 1, 0, 0, 'h', 0, 3),
|
||||
(4, 'Асоциальное поведение', 1, 0, 0, 'h', 0, 4),
|
||||
(5, 'Черезмерный подъем тем', 1, 0, 0, 'h', 0, 5);";
|
||||
|
||||
$SQL[] = "ALTER TABLE members ADD unacknowledged_warnings TINYINT(1) DEFAULT NULL;";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2011 Invision Power Services
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| IP.Board v3.3.4
|
||||
| IP.Board v3.4.5
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2011 Invision Power Services
|
||||
|
||||
@@ -1,120 +1,119 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Upgrade Class
|
||||
*
|
||||
* Class to add options and notices for IP.Board upgrade
|
||||
* Last Updated: $Date: 2011-05-25 19:58:10 +0100 (Wed, 25 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author Matt Mecham <matt@invisionpower.com>
|
||||
* @version $Rev: 8891 $
|
||||
* @since 3.0
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @link http://www.invisionpower.com
|
||||
* @package IP.Board
|
||||
*/
|
||||
|
||||
class version_class_core_33000
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Form
|
||||
*
|
||||
* @return string HTML block
|
||||
*/
|
||||
public function preInstallOptionsForm()
|
||||
{
|
||||
$_wrapper = "<ul>%s</ul>";
|
||||
$_html = '';
|
||||
$posts = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'posts' ) );
|
||||
|
||||
// Is 3.1?
|
||||
if ( IPSSetUp::is300plus() && ! IPSSetUp::is320plus() )
|
||||
{
|
||||
// Got more than 100K posts?
|
||||
if( $posts['total'] > 100000 && ! $this->DB->checkForField( 'post_field_int', 'posts' ) )
|
||||
{
|
||||
$_html .= <<<EOF
|
||||
<li>
|
||||
<input type='checkbox' name='manualPostsTableQuery' value='1' checked='checked' />
|
||||
Manually apply changes to the posts table? Your site has more than 100,000 posts. We <b>strongly recommend</b> that you enable this option and manually run the provided
|
||||
SQL query to alter your posts table in order to prevent timeouts in the web-based upgrader. If you uncheck this option, it is very possible the upgrader will timeout attempting to
|
||||
update your posts table.
|
||||
</li>
|
||||
EOF;
|
||||
}
|
||||
}
|
||||
|
||||
$_html .= <<<EOF
|
||||
<li>
|
||||
<input type='checkbox' name='flagBanned' value='1' checked='checked' />
|
||||
<strong>Flag all members in the Banned member group as banned</strong><br />
|
||||
3.3.0 removes the need for a specific Banned Group and uses the built in 'flag' on a per-member basis. However, unless you choose to update all
|
||||
members in the current Banned Group as 'banned' they may not appear when searching for banned members in the ACP.
|
||||
<br />We recommend you keep this box ticked
|
||||
</li>
|
||||
EOF;
|
||||
|
||||
if( $_html )
|
||||
{
|
||||
return sprintf( $_wrapper, $_html );
|
||||
}
|
||||
else
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Save
|
||||
*
|
||||
* Data will be saved in saved data array as: appOptions[ app ][ versionLong ] = ( key => value );
|
||||
*
|
||||
* @return array Key / value pairs to save
|
||||
*/
|
||||
public function preInstallOptionsSave()
|
||||
{
|
||||
return array( 'flagBanned' => intval( $_REQUEST['flagBanned'] ), 'manualPostsTableQuery' => intval( $_REQUEST['manualPostsTableQuery'] ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return any post-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function postInstallNotices()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return any pre-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function preInstallNotices()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.5
|
||||
* Upgrade Class
|
||||
*
|
||||
* Class to add options and notices for IP.Board upgrade
|
||||
* Last Updated: $Date: 2011-05-25 19:58:10 +0100 (Wed, 25 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author Matt Mecham <matt@invisionpower.com>
|
||||
* @version $Rev: 8891 $
|
||||
* @since 3.0
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @link http://www.invisionpower.com
|
||||
* @package IP.Board
|
||||
*/
|
||||
|
||||
class version_class_core_33000
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Form
|
||||
*
|
||||
* @return string HTML block
|
||||
*/
|
||||
public function preInstallOptionsForm()
|
||||
{
|
||||
$_wrapper = "<ul>%s</ul>";
|
||||
$_html = '';
|
||||
$posts = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'posts' ) );
|
||||
|
||||
// Is 3.1?
|
||||
if ( IPSSetUp::is300plus() && ! IPSSetUp::is320plus() )
|
||||
{
|
||||
// Got more than 100K posts?
|
||||
if( $posts['total'] > 100000 && ! $this->DB->checkForField( 'post_field_int', 'posts' ) )
|
||||
{
|
||||
$_html .= <<<EOF
|
||||
<li>
|
||||
<input type='checkbox' name='manualPostsTableQuery' value='1' checked='checked' />
|
||||
Внести изменения в структуру таблицы Posts вручную? На вашем форуме более 100,000 сообщений. Мы <b>настоятельно рекомендуем</b> вам включить данную опцию и самостоятельно выполнить
|
||||
SQL запросы для обновления таблицы сообщений. Если вы отключите данную опцию существует большая вероятность того, что мастер обновления не сможет обновить форум.
|
||||
</li>
|
||||
EOF;
|
||||
}
|
||||
}
|
||||
|
||||
$_html .= <<<EOF
|
||||
<li>
|
||||
<input type='checkbox' name='flagBanned' value='1' checked='checked' />
|
||||
<strong>Отметить всех пользователей из группы "Забаненные", как забаненных</strong><br />
|
||||
В 3.3.0 удалена отдельная группа для заблокированных, теперь проверка осуществляется на основе метки для каждого пользователя. Возможно, что часть пользователей, отмеченных как
|
||||
забаненные, в результате такого переноса, не будут находится поиском в админ-центре при применении фильтра поиска по заблокированным.
|
||||
<br />Мы рекомендуем воспользоваться этой опцией.
|
||||
</li>
|
||||
EOF;
|
||||
|
||||
if( $_html )
|
||||
{
|
||||
return sprintf( $_wrapper, $_html );
|
||||
}
|
||||
else
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add pre-upgrade options: Save
|
||||
*
|
||||
* Data will be saved in saved data array as: appOptions[ app ][ versionLong ] = ( key => value );
|
||||
*
|
||||
* @return array Key / value pairs to save
|
||||
*/
|
||||
public function preInstallOptionsSave()
|
||||
{
|
||||
return array( 'flagBanned' => intval( $_REQUEST['flagBanned'] ), 'manualPostsTableQuery' => intval( $_REQUEST['manualPostsTableQuery'] ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return any post-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function postInstallNotices()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return any pre-installation notices
|
||||
*
|
||||
* @return array Array of notices
|
||||
*/
|
||||
public function preInstallNotices()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -155,7 +155,7 @@ class version_upgrade
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage("{$cnt} queries ran... ");
|
||||
$this->registry->output->addMessage("{$cnt} запросов выполнено... ");
|
||||
}
|
||||
|
||||
/* Next Page */
|
||||
|
||||
@@ -91,7 +91,7 @@ class version_upgrade
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->output->addMessage( "XML Skin restored" );
|
||||
$this->registry->output->addMessage( "XML стиль восстановлен" );
|
||||
|
||||
$this->request['workact'] = '';
|
||||
}
|
||||
|
||||
Loaded 100 of 1360 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user