diff --git a/SETUP/db_schema.sql b/SETUP/db_schema.sql index 71a8a2aca1..e0dd479921 100644 --- a/SETUP/db_schema.sql +++ b/SETUP/db_schema.sql @@ -550,12 +550,8 @@ CREATE TABLE `user_profiles` ( `id` int(10) unsigned NOT NULL auto_increment, `u_ref` int(10) unsigned NOT NULL default '0', `profilename` varchar(30) NOT NULL default 'default', - `i_res` tinyint(1) default '1', `i_type` tinyint(1) default '0', `i_layout` tinyint(1) default '0', - `i_toolbar` tinyint(1) default '0', - `i_statusbar` tinyint(1) default '0', - `i_newwin` tinyint(1) default '0', `v_fnts` tinyint(2) default '0', `v_fntf` tinyint(1) default '2', `v_fntf_other` varchar(32) default '', diff --git a/SETUP/devex/dpdev-docker/dp_db.sql b/SETUP/devex/dpdev-docker/dp_db.sql index cb43166bce..f849111b3b 100644 --- a/SETUP/devex/dpdev-docker/dp_db.sql +++ b/SETUP/devex/dpdev-docker/dp_db.sql @@ -46,7 +46,7 @@ INSERT INTO `project_events` VALUES (1,1451401587,'projectID5682a1735f76a','pm', INSERT INTO `projects` VALUES ('Demonology','Doe, John','English','pm','Match the scan, man!','html','projectID5682a1735f76a','','proofer',1451401669,1458275991,1451401587,1599454842,'','P1.proj_avail',NULL,'testingonly',NULL,1,'Other','average',0,'','',33,32,NULL,'_internal','pm','pm','',0,'',''); -INSERT INTO `user_profiles` VALUES (1,1,'default',1,0,0,0,0,1,0,0,'',50,40,65,1,0,0,0,'',35,6,70,1,0),(2,2,'default',1,0,0,0,0,1,0,0,'',50,40,65,1,0,0,0,'',35,6,70,1,0),(3,3,'default',1,0,0,0,0,1,0,2,'',50,40,65,1,0,0,0,'',35,6,70,1,0); +INSERT INTO `user_profiles` VALUES (1,1,'default',0,0,0,0,'',50,40,65,1,0,0,0,'',35,6,70,1,0),(2,2,'default',0,0,0,0,'',50,40,65,1,0,0,0,'',35,6,70,1,0),(3,3,'default',0,0,0,2,'',50,40,65,1,0,0,0,'',35,6,70,1,0); INSERT INTO `user_project_info` VALUES ('proofer','projectID5682a1735f76a',1599454853,1599454842,0,0,0,0,0,0,0,0,0); diff --git a/SETUP/tests/smoketests/test_tables.sql b/SETUP/tests/smoketests/test_tables.sql index 24c50e4353..f4efc0f87f 100644 --- a/SETUP/tests/smoketests/test_tables.sql +++ b/SETUP/tests/smoketests/test_tables.sql @@ -16,7 +16,7 @@ REPLACE INTO `users` VALUES ('userID460b20a8a8a71','BKeir','teststeel','teststee /* $up = new UserProfile(); $up->foo = bar; $up->save(); does not allow new * profiles to be created with programmatic control of id. */ -REPLACE INTO `user_profiles` VALUES (110,105,'default',4,1,1,0,0,1,5,6,'',50,40,65,1,0,5,6,'',35,20,70,1,0); +REPLACE INTO `user_profiles` VALUES (110,105,'default',1,1,5,6,'',50,40,65,1,0,5,6,'',35,20,70,1,0); /* This can be done with $s = new Settings('admin'); $s->set_true('sitemanager'); * But there's not much point until we can do some of the rest with code. diff --git a/SETUP/upgrade/24/20251224_alter_user_profiles.php b/SETUP/upgrade/24/20251224_alter_user_profiles.php new file mode 100644 index 0000000000..3c859f2ad8 --- /dev/null +++ b/SETUP/upgrade/24/20251224_alter_user_profiles.php @@ -0,0 +1,24 @@ +"), 'content' => _("
Enable/Disable wrapping of lines in the proofreading area that exceed the 'Length of Text Lines' setting.
"), ], - 'set_newwindow' => - [ - 'title' => _("Launch in New Window"), - 'content' => -_("This setting specifies if the proofreading interface will launch in a new window or not.
"), - ], - - 'set_statusbar' => - [ - 'title' => _("Show Status Bar"), - 'content' => -_("This setting specifies if the standard browser status bar should be displayed when 'Launch in New Window' is set to Yes.
"), - ], - - 'set_toolbar' => - [ - 'title' => _("Show Toolbar"), - 'content' => -_("This setting specifies if the standard browser toolbars should be displayed when 'Launch in New Window' is set to Yes.
"), - ], - - // FIXME This setting, and all the code that uses it and the 1000px for calculations should die. :D - 'set_screenres' => - [ - 'title' => _("Screen Resolution"), - 'content' => _("You may select a screen resolution from the dropdown list.
"), - ], - 'set_showspecialcolors' => [ 'title' => _("Show Special Colors"), diff --git a/pinc/UserProfile.inc b/pinc/UserProfile.inc index 38bcb4779e..f557700192 100644 --- a/pinc/UserProfile.inc +++ b/pinc/UserProfile.inc @@ -8,12 +8,8 @@ class NonexistentUserProfileException extends Exception * @property int $id; * @property int $u_ref; * @property string $profilename; - * @property int $i_res; * @property int $i_type; * @property int $i_layout; - * @property bool $i_toolbar; - * @property bool $i_statusbar; - * @property bool $i_newwin; * @property int $v_fnts; * @property int $v_fntf; * @property string $v_fntf_other; diff --git a/pinc/js_newwin.inc b/pinc/js_newwin.inc deleted file mode 100644 index d1138f3abd..0000000000 --- a/pinc/js_newwin.inc +++ /dev/null @@ -1,52 +0,0 @@ -profile->i_newwin -// (leaving aside code to save/restore/display/update it). - -include_once($relPath.'resolution.inc'); - -function get_js_for_links_to_project_pages() -{ - global $i_resolutions; - - $user = User::load_current(); - - $wSize = explode("x", $i_resolutions[$user->profile->i_res * 1]); - $window_width = (int)$wSize[0] - 20; - $window_height = (int)$wSize[1] - 80; - - return " - function newProofWin(winURL) - { - newFeatures='toolbar={$user->profile->i_toolbar},status={$user->profile->i_statusbar},location=0,directories=0,menubar=0,scrollbars=1,resizable=1,width=$window_width,height=$window_height,top=0,left=5'; - nwWin=window.open(winURL,'_blank',newFeatures); - } - "; -} - -function prep_for_links_to_project_pages() -{ - // Ensure that the guts of this function are only done once, - // because don't want to define newProofWin more than once. - static $this_func_has_been_called = false; - if ($this_func_has_been_called) { - return; - } - $this_func_has_been_called = true; - - echo ""; -} - -function get_onclick_attr_for_link_to_project_page($url) -// Get the 'onclick' attribute (if any) for an element -// that links to a project page. -{ - $user = User::load_current(); - if ($user->profile->i_newwin == 1) { - $attr = "onclick=\"newProofWin('$url'); return false;\""; - } else { - $attr = ''; - } - return $attr; -} diff --git a/pinc/resolution.inc b/pinc/resolution.inc deleted file mode 100644 index 5ac22c93c2..0000000000 --- a/pinc/resolution.inc +++ /dev/null @@ -1,76 +0,0 @@ - '600x480', - 12 => '600x800', - 22 => '640x200', - 23 => '640x240', - 24 => '640x320', - 25 => '640x350', - 26 => '640x360', - 27 => '640x400', - 0 => '640x480', - 28 => '640x512', - 16 => '720x1280', - 29 => '768x480', - 13 => '768x1024', - 30 => '800x352', - 31 => '800x400', - 32 => '800x480', - 1 => '800x600', - 33 => '960x540', - 34 => '960x640', - 17 => '960x1280', - 35 => '1024x576', - 36 => '1024x600', - 37 => '1024x640', - 2 => '1024x768', - 38 => '1024x800', - 39 => '1024x1024', - 14 => '1024x1280', - 19 => '1024x1600', - 18 => '1050x1400', - 20 => '1080x1920', - 40 => '1152x720', - 41 => '1152x768', - 3 => '1152x864', - 42 => '1152x900', - 15 => '1200x1600', - 6 => '1280x720', - 43 => '1280x768', - 44 => '1280x800', - 7 => '1280x854', - 8 => '1280x960', - 4 => '1280x1024', - 45 => '1366x768', - 9 => '1400x1050', - 46 => '1440x900', - 47 => '1440x960', - 48 => '1440x1024', - 49 => '1440x1080', - 50 => '1600x768', - 51 => '1600x900', - 10 => '1600x1024', - 5 => '1600x1200', - 52 => '1680x1050', - 53 => '1792x1344', - 54 => '1800x1440', - 55 => '1856x1392', - 11 => '1920x1080', - 56 => '1920x1200', - 57 => '1920x1400', - 58 => '1920x1440', - 59 => '2048x1152', - 60 => '2048x1536', - 61 => '2304x1440', - 62 => '2560x1440', - 63 => '2560x1600', - 64 => '2560x1920', - 65 => '2560x2048', - 66 => '2800x2100', - 67 => '3200x2048', - 68 => '3200x2400', -]; diff --git a/pinc/showavailablebooks.inc b/pinc/showavailablebooks.inc index c73aea9ba2..cc162b62bd 100644 --- a/pinc/showavailablebooks.inc +++ b/pinc/showavailablebooks.inc @@ -4,7 +4,6 @@ include_once($relPath.'Settings.inc'); include_once($relPath.'special_colors.inc'); include_once($relPath.'forum_interface.inc'); // get_forum_email_address get_url_to_compose_message_to_user include_once($relPath.'user_is.inc'); // user_is_a_sitemanager -include_once($relPath.'js_newwin.inc'); // prep_for_links_to_project_pages get_onclick_attr_for_link_to_project_page include_once($relPath.'genres.inc'); include_once($relPath.'post_processing.inc'); @@ -455,10 +454,6 @@ function show_project_listing( } $result = DPDatabase::query($query); - if (is_a($stage, 'Round')) { - prep_for_links_to_project_pages(); - } - // Start the table. echo "\n| "; $url = "$code_url/project.php?id=" . $row["projectid"]; - $onclick_attr = get_onclick_attr_for_link_to_project_page($url); - echo "" . html_safe($row["nameofwork"]) . ""; + echo "" . html_safe($row["nameofwork"]) . ""; echo " | \n"; if (isset($colspecs['round'])) { diff --git a/userprefs.php b/userprefs.php index e7923fbd4c..b467a00d61 100644 --- a/userprefs.php +++ b/userprefs.php @@ -2,7 +2,6 @@ $relPath = "./pinc/"; include_once($relPath.'base.inc'); include_once($relPath.'metarefresh.inc'); -include_once($relPath.'resolution.inc'); include_once($relPath.'prefs_options.inc'); include_once($relPath.'languages.inc'); // bilingual_name() include_once($relPath.'theme.inc'); @@ -443,8 +442,6 @@ function save_general_tab(User $user): void function echo_proofreading_tab(User $user): void { - global $i_resolutions; - // see if they already have 10 profiles, etc. $profiles = UserProfile::load_user_profiles($user->u_id); @@ -481,25 +478,6 @@ function echo_proofreading_tab(User $user): void th_label_long(6, _('Profile details')); echo "