Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions SETUP/db_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 '',
Expand Down
2 changes: 1 addition & 1 deletion SETUP/devex/dpdev-docker/dp_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion SETUP/tests/smoketests/test_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
24 changes: 24 additions & 0 deletions SETUP/upgrade/24/20251224_alter_user_profiles.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
$relPath = '../../../pinc/';
include_once($relPath.'base.inc');

header('Content-type: text/plain');

// ------------------------------------------------------------

echo "Dropping some columns on user_profiles...\n";
$sql = "
ALTER TABLE user_profiles
DROP COLUMN i_res,
DROP COLUMN i_toolbar,
DROP COLUMN i_statusbar,
DROP COLUMN i_newwin;
";

echo "$sql\n";

mysqli_query(DPDatabase::get_connection(), $sql) or die(mysqli_error(DPDatabase::get_connection()));

// ------------------------------------------------------------

echo "\nDone!\n";
28 changes: 0 additions & 28 deletions faq/pophelp/prefs/prefs_pophelp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -310,34 +310,6 @@ The lower control frame is not included when calculating this percentage.</p>"),
'content' => _("<p>Enable/Disable wrapping of lines in the proofreading area that exceed the 'Length of Text Lines' setting.</p>"),
],

'set_newwindow' =>
[
'title' => _("Launch in New Window"),
'content' =>
_("<p>This setting specifies if the proofreading interface will launch in a new window or not.</p>"),
],

'set_statusbar' =>
[
'title' => _("Show Status Bar"),
'content' =>
_("<p>This setting specifies if the standard browser status bar should be displayed when 'Launch in New Window' is set to Yes.</p>"),
],

'set_toolbar' =>
[
'title' => _("Show Toolbar"),
'content' =>
_("<p>This setting specifies if the standard browser toolbars should be displayed when 'Launch in New Window' is set to Yes.</p>"),
],

// FIXME This setting, and all the code that uses it and the 1000px for calculations should die. :D
'set_screenres' =>
[
'title' => _("Screen Resolution"),
'content' => _("<p>You may select a screen resolution from the dropdown list.</p>"),
],

'set_showspecialcolors' =>
[
'title' => _("Show Special Colors"),
Expand Down
4 changes: 0 additions & 4 deletions pinc/UserProfile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
52 changes: 0 additions & 52 deletions pinc/js_newwin.inc

This file was deleted.

76 changes: 0 additions & 76 deletions pinc/resolution.inc

This file was deleted.

12 changes: 1 addition & 11 deletions pinc/showavailablebooks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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<table id='$anchor' class='availprojectlisting stage_$stage->id'>";
echo "<tr class='center-align'>";
Expand Down Expand Up @@ -522,12 +517,7 @@ function show_project_listing(
}
} elseif ($col_id == "nameofwork") {
$eURL = "$code_url/project.php?id={$book['projectid']}&amp;expected_state={$book['state']}";
$onclick_attr = (
is_a($stage, 'Round')
? get_onclick_attr_for_link_to_project_page($eURL)
: ""
);
$cell = "<a href=\"$eURL\" $onclick_attr>" . html_safe($book['nameofwork']) . "</a>";
$cell = "<a href=\"$eURL\">" . html_safe($book['nameofwork']) . "</a>";
} elseif ($col_id == "genre") {
$genre = $book['trans_genre'];
if ($book['difficulty'] == "beginner") {
Expand Down
8 changes: 2 additions & 6 deletions tools/proofers/my_projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
include_once($relPath.'theme.inc');
include_once($relPath.'Project.inc');
include_once($relPath.'User.inc');
include_once($relPath.'js_newwin.inc'); // get_js_for_links_to_project_pages(), get_onclick_attr_for_link_to_project_page()
include_once($relPath.'Settings.inc');
include_once($relPath.'pg.inc'); // get_pg_catalog_link_for_etext()
include_once($relPath.'gradual.inc'); // maybe_output_new_proofer_message()
Expand Down Expand Up @@ -65,9 +64,7 @@
"text_other" => sprintf(_("%s's Projects"), $username),
];

$extra_args['js_data'] = get_js_for_links_to_project_pages();

output_header(get_usertext($page_header), NO_STATSBAR, $extra_args);
output_header(get_usertext($page_header), NO_STATSBAR);

output_link_box($username);

Expand Down Expand Up @@ -166,8 +163,7 @@
echo html_safe($orig_nameofwork) . " <i>" . _("merged into") . "</i> ";
}
$url = "$code_url/project.php?id=$projectid";
$onclick_attr = get_onclick_attr_for_link_to_project_page($url);
echo "<a href='$url' $onclick_attr>" . html_safe($nameofwork) . "</a>";
echo "<a href='$url'>" . html_safe($nameofwork) . "</a>";
echo "</td>\n";

if (isset($colspecs['state'])) {
Expand Down
8 changes: 2 additions & 6 deletions tools/proofers/my_suggestions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
include_once($relPath.'theme.inc');
include_once($relPath.'Project.inc');
include_once($relPath.'User.inc');
include_once($relPath.'js_newwin.inc'); // get_js_for_links_to_project_pages(), get_onclick_attr_for_link_to_project_page()
include_once($relPath.'gradual.inc'); // get_pages_proofed_maybe_simulated()
include_once($relPath.'graph_data.inc'); // get_round_backlog_stats()

Expand Down Expand Up @@ -49,9 +48,7 @@
$title = sprintf(_("%s's Suggestions"), $username);
}

$extra_args['js_data'] = get_js_for_links_to_project_pages();

output_header($title, NO_STATSBAR, $extra_args);
output_header($title, NO_STATSBAR);

output_link_box($username, $verbose);

Expand Down Expand Up @@ -245,8 +242,7 @@ function output_suggestion_table($projects, $colspecs, $username)

echo "<td>";
$url = "$code_url/project.php?id=" . $row["projectid"];
$onclick_attr = get_onclick_attr_for_link_to_project_page($url);
echo "<a href='$url' $onclick_attr>" . html_safe($row["nameofwork"]) . "</a>";
echo "<a href='$url'>" . html_safe($row["nameofwork"]) . "</a>";
echo "</td>\n";

if (isset($colspecs['round'])) {
Expand Down
Loading