Compare commits

..

14 Commits

Author SHA1 Message Date
cyeh%netscape.com
7019e88fb8 fix windows issues for landing
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14471 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-11 22:09:39 +00:00
leaf%mozilla.org
4dcc16c1ae adding my remerge (with conflict resolution)
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14428 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-11 18:47:44 +00:00
leaf%mozilla.org
59c90d9dfd fixed merge conflict.
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14336 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-10 16:15:46 +00:00
cyeh%netscape.com
c3fffabd90 remove conflicts
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14315 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-09 23:53:56 +00:00
cyeh%netscape.com
1233abdf05 remove conflicts
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14115 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-04 23:34:17 +00:00
cyeh%netscape.com
f9a67068bc ifdef out sections to get it to build
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14114 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-04 23:28:06 +00:00
cyeh%netscape.com
ad506a07ff resolve conflicts and fix NO_SECURITY stupidity
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14093 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-04 19:18:36 +00:00
cyeh%netscape.com
80f1babe1c fix merge conflicts
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14091 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-04 18:55:41 +00:00
cyeh%netscape.com
62c48c500d checking in for landing
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14090 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-04 18:52:21 +00:00
cyeh%netscape.com
157de7ed55 checkin conflicts as part of landing
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14089 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-04 18:51:28 +00:00
cyeh%netscape.com
9d299fac81 checking in conflicts to fix
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14088 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-04 18:50:31 +00:00
cyeh%netscape.com
75116498ce checkin files with conflicts to fix
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14087 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-04 18:50:06 +00:00
cyeh%netscape.com
8a793e8ed9 force the checkin with conflicts
git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@14086 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-04 18:49:40 +00:00
(no author)
900de98ebe This commit was manufactured by cvs2svn to create branch
'XPCOM_BRANCH_LANDING_981104'.

git-svn-id: svn://10.0.0.236/branches/XPCOM_BRANCH_LANDING_981104@13235 18797224-902f-48f8-a5cc-f745e15eee43
1998-10-21 02:13:58 +00:00
331 changed files with 19597 additions and 104276 deletions

View File

@@ -0,0 +1,169 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
pref("editor.html_editor", "");
pref("editor.image_editor", "");
pref("editor.author", "");
pref("editor.auto_save_delay", 10); // minutes
pref("editor.html_editor", "");
pref("editor.image_editor", "");
pref("editor.fontsize_mode", 0);
pref("editor.template_location", "http://home.netscape.com/home/gold3.0_templates.html");
pref("editor.default_template_location", "http://home.netscape.com/home/gold3.0_templates.html");
pref("editor.template_last_loc", "");
pref("editor.template_history_0", "");
pref("editor.template_history_1", "");
pref("editor.template_history_2", "");
pref("editor.template_history_3", "");
pref("editor.template_history_4", "");
pref("editor.template_history_5", "");
pref("editor.template_history_6", "");
pref("editor.template_history_7", "");
pref("editor.template_history_8", "");
pref("editor.template_history_9", "");
pref("editor.template_history_10", "");
pref("editor.template_history_11", "");
pref("editor.template_history_12", "");
pref("editor.template_history_13", "");
pref("editor.template_history_14", "");
pref("editor.template_history_15", "");
pref("editor.template_history_16", "");
pref("editor.template_history_17", "");
pref("editor.template_history_18", "");
pref("editor.template_history_19", "");
pref("editor.url_history.TITLE_0", "");
pref("editor.url_history.TITLE_1", "");
pref("editor.url_history.TITLE_2", "");
pref("editor.url_history.TITLE_3", "");
pref("editor.url_history.TITLE_4", "");
pref("editor.url_history.TITLE_5", "");
pref("editor.url_history.TITLE_6", "");
pref("editor.url_history.TITLE_7", "");
pref("editor.url_history.TITLE_8", "");
pref("editor.url_history.TITLE_9", "");
pref("editor.url_history.URL_0", "");
pref("editor.url_history.URL_1", "");
pref("editor.url_history.URL_2", "");
pref("editor.url_history.URL_3", "");
pref("editor.url_history.URL_4", "");
pref("editor.url_history.URL_5", "");
pref("editor.url_history.URL_6", "");
pref("editor.url_history.URL_7", "");
pref("editor.url_history.URL_8", "");
pref("editor.url_history.URL_9", "");
localDefPref("editor.html_directory", "C:\\My Documents");
localDefPref("editor.image_directory", "C:\\My Documents");
localDefPref("editor.background_image", "");
pref("editor.last_pref_page", 0);
pref("editor.last_text_page", 0);
pref("editor.last_doc_page", 0);
pref("editor.last_table_page", 0);
pref("editor.use_custom_colors", false);
pref("editor.use_background_image", true);
pref("editor.publish_keep_links", true);
pref("editor.publish_keep_images", true);
pref("editor.show_copyright", true);
pref("editor.show_character_toolbar", true);
pref("editor.show_paragraph_toolbar", true);
pref("editor.text_color", "#000000");
pref("editor.link_color", "#0000FF");
pref("editor.active_link_color", "#000088");
pref("editor.followed_link_color", "#FF0000");
pref("editor.background_color", "#FFFFFF");
pref("editor.auto_save", false);
pref("editor.javascript_color", "#FF0000");
pref("editor.color_scheme", "Netscape Default Colors");
pref("editor.hints.bookmark", true);
pref("editor.hints.image", true);
pref("editor.hints.sitemanager", true);
pref("editor.hints.copyright", true);
pref("editor.hints.removelinks", true);
localDefPref("editor.hrule.height", 2);
localDefPref("editor.hrule.width", 100);
pref("editor.hrule.width_percent", true);
pref("editor.hrule.shading", true);
pref("editor.hrule.align", 0); // match types in edttypes.h ED_ALIGN_CENTER
pref("editor.publish_username", "");
pref("editor.publish_password", "");
pref("editor.publish_save_password", false);
pref("editor.publish_location", "");
pref("editor.publish_browse_location", "");
pref("editor.publish_last_loc", "");
pref("editor.publish_last_pass", "");
pref("editor.publish_history_0", "");
pref("editor.publish_history_1", "");
pref("editor.publish_history_2", "");
pref("editor.publish_history_3", "");
pref("editor.publish_history_4", "");
pref("editor.publish_history_5", "");
pref("editor.publish_history_6", "");
pref("editor.publish_history_7", "");
pref("editor.publish_history_8", "");
pref("editor.publish_history_9", "");
pref("editor.publish_history_10", "");
pref("editor.publish_history_11", "");
pref("editor.publish_history_12", "");
pref("editor.publish_history_13", "");
pref("editor.publish_history_14", "");
pref("editor.publish_history_15", "");
pref("editor.publish_history_16", "");
pref("editor.publish_history_17", "");
pref("editor.publish_history_18", "");
pref("editor.publish_history_19", "");
pref("editor.publish_password_0", "");
pref("editor.publish_password_1", "");
pref("editor.publish_password_2", "");
pref("editor.publish_password_3", "");
pref("editor.publish_password_4", "");
pref("editor.publish_password_5", "");
pref("editor.publish_password_6", "");
pref("editor.publish_password_7", "");
pref("editor.publish_password_8", "");
pref("editor.publish_password_9", "");
pref("editor.publish_password_10", "");
pref("editor.publish_password_11", "");
pref("editor.publish_password_12", "");
pref("editor.publish_password_13", "");
pref("editor.publish_password_14", "");
pref("editor.publish_password_15", "");
pref("editor.publish_password_16", "");
pref("editor.publish_password_17", "");
pref("editor.publish_password_18", "");
pref("editor.publish_password_19", "");
pref("editor.custom_color_0", "0,0,0");
pref("editor.custom_color_1", "99,0,0");
pref("editor.custom_color_2", "CC,0,0");
pref("editor.custom_color_3", "FF,0,0");
pref("editor.custom_color_4", "0,99,0");
pref("editor.custom_color_5", "0,CC,0");
pref("editor.custom_color_6", "0,FF,0");
pref("editor.custom_color_7", "0,0,99");
pref("editor.custom_color_8", "0,0,CC");
pref("editor.custom_color_9", "0,0,FF");
pref("editor.last_color_picked", "0,0,0");
pref("editor.last_background_color_picked", "255,255,255");
pref("editor.new_cell_has_space", true);

View File

@@ -0,0 +1,266 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// Added by mwelch 97 Feb
pref("news.show_pretty_names", false);
pref("mail.wrap_long_lines", false);
pref("news.wrap_long_lines", false);
pref("mail.inline_attachments", true);
// Mail server preferences, pop by default
pref("mail.server_type", 0); // 0 pop, 1 imap,
// (Unix only:)
// 2 movemail, 3 inbox
pref("mail.auth_login", true);
pref("mail.use_drafts", true);
pref("mail.default_drafts", ""); // empty string use default Drafts name;
pref("mail.use_templates", true);
pref("mail.default_templates", ""); // empty string use default Templates name
pref("mail.use_x_sender", false);
pref("mail.imap.local_copies", false);
pref("mail.imap.cache_fetch_responses", true);
pref("mail.imap.server_sub_directory", "");
pref("mail.imap.delete_is_move_to_trash", false);
pref("mail.imap.server_ssl", false);
pref("mail.imap.ssl_port", 993);
pref("mail.imap.hard.mailbox.depth", 0);
pref("mail.imap.max_cached_connections", 10);
pref("mail.imap.fetch_by_chunks", true);
pref("mail.imap.auto_subscribe_on_open", true);
pref("mail.imap.chunk_size", 10240);
pref("mail.imap.min_chunk_size_threshold", 15360);
pref("mail.imap.max_chunk_size", 40960);
pref("mail.imap.chunk_fast", 2);
pref("mail.imap.chunk_ideal", 4);
pref("mail.imap.chunk_add", 2048);
pref("mail.imap.auto_subscribe", true);
pref("mail.imap.auto_unsubscrube", true);
pref("mail.imap.new_mail_get_headers", true);
pref("mail.imap.strip_personal_namespace", true);
pref("mail.imap.upgrade.leave_subscriptions_alone", false);
pref("mail.imap.upgrade.auto_subscribe_to_all", false);
pref("mail.imap.auto_unsubscribe_from_noselect_folders", true);
pref("mail.imap.allow_multiple_folder_connections", false);
pref("mail.imap.cleanup_inbox_on_exit", false);
pref("mail.imap.mime_parts_on_demand", false);
pref("mail.imap.mime_parts_on_demand_threshold", 15000);
pref("mail.imap.optimize_header_dl", false);
pref("mail.use_altmail", false);
pref("mail.altmail_dll", "postal32.dll");
pref("mail.use_altmail_for_news", true);
pref("mail.thread_mail", false);
pref("mail.sort_mail", false);
pref("mail.ascend_mail", false);
pref("mail.leave_on_server", false);
pref("mail.default_cc", "");
pref("mail.default_fcc", ""); // maibox:URL or Imap://Host/OnLineFolderName
pref("mail.check_new_mail", false);
pref("mail.pop3_gets_new_mail", false);
pref("mail.check_time", 10);
pref("mail.pop_name", "");
pref("mail.remember_password", false);
pref("mail.support_skey", false);
pref("mail.pop_password", "");
pref("mail.auto_quote", true);
pref("mail.fixed_width_messages", true);
pref("mail.quoted_style", 2); // 0=plain, 1=bold, 2=italic, 3=bolditalic
pref("mail.quoted_size", 0); // 0=normal, 1=bigger, 2=smaller
pref("mail.citation_color", "#000000"); // quoted color
pref("mail.identity.organization", "");
pref("mail.identity.reply_to", "");
pref("mail.identity.username", "");
pref("mail.identity.useremail", "");
pref("mail.identity.defaultdomain", "");
pref("mail.use_fcc", true);
pref("mail.cc_self", false);
pref("mail.limit_message_size", false);
pref("mail.max_size", 50); // download message size limit
pref("mail.deliver_immediately", true);
pref("mail.strictly_mime", false);
pref("mail.strictly_mime_headers", true);
pref("mail.file_attach_binary", false);
pref("mail.use_signature_file", false);
pref("mail.show_headers", 1); // some
pref("mail.pane_config", 0);
pref("mail.sort_by", 1); // by date
localDefPref("mail.window_rect", "-1,-1,-1,-1");
localDefPref("mail.compose_window_rect", "-1,-1,-1,-1");
pref("mail.addr_book.ldap.disabled", false);
localDefPref("mail.addr_book_window_rect", "-1,-1,-1,-1");
pref("mail.wfe.addr_book.show_value", 0);
pref("mail.addr_book.lastnamefirst", false);
pref("mail.addr_book.sortby", 2);
pref("mail.addr_book.sort_ascending", true);
localDefPref("mail.addr_book.name.width", 0);
localDefPref("mail.addr_book.email.width", 0);
localDefPref("mail.addr_book.nickname.width", 0);
localDefPref("mail.addr_book.locality.width", 0);
localDefPref("mail.addr_book.company.width", 0);
localDefPref("mail.addr_book.type.pos", -1);
localDefPref("mail.addr_book.name.pos", -1);
localDefPref("mail.addr_book.email.pos", -1);
localDefPref("mail.addr_book.nickname.pos", -1);
localDefPref("mail.addr_book.locality.pos", -1);
localDefPref("mail.addr_book.company.pos", -1);
pref("mail.attach_vcard", false);
pref("mail.html_compose", true);
pref("mail.htmldomains", "netscape.com,mcom.com");
pref("mail.play_sound", true);
pref("mail.send_html", true);
pref("mail.directory_names.first_first", true);
pref("mail.attach_address_card", false);
localDefPref("mail.fcc_folder", "");
pref("mail.purge_threshhold", 100);
pref("mail.prompt_purge_threshhold", false); //Ask about compacting folders
pref("mail.encrypt_outgoing_mail", false);
pref("mail.crypto_sign_outgoing_mail", false);
pref("mail.crypto_sign_outgoing_news", false);
pref("mail.warn_forward_encrypted", true); // forward encrypted message to another warning
pref("mail.warn_reply_unencrypted", true); // clear reply to encrypted message warning
pref("mail.use_mapi_server", false);
pref("mail.match_nickname", false);
pref("mail.default_html_action", 0); // 0=ask, 1=plain, 2=html, 3=both
pref("mail.selection.count",0); //default - 0 mail folders selected for download
pref("mail.smtp.ssl", 0); // 0 = no, 1 = try, 2 = must use SSL
pref("mail.allow_at_sign_in_user_name", false); //strip off chars following the @ sign in mail user name
pref("mail.mdn.report.enabled", false); // enable sending MDN report
// no denial mdns for not_in_to_cc, forward and outside_domain cases
// this could eliminate potential mail traffics
pref("mail.mdn.report.not_in_to_cc", 0); // 0: Never 1: Always 2: Ask me
pref("mail.mdn.report.outside_domain", 2); // 0: Never 1: Always 2: Ask me
pref("mail.mdn.report.other", 2); // 0: Never 1: Always 2: Ask me 3: Denial
pref("mail.incorporate.return_receipt", 1); // 0: inbox/filter 1: Sent folder
pref("mail.request.return_receipt", 2); // 1: DSN 2: MDN 3: Both
pref("mail.receipt.request_header_type", 0); // 0: MDN-DNT header 1: RRT header 2: Both (MC)
pref("news.enabled", true);
pref("news.default_cc", "");
pref("news.default_fcc", ""); // mailbox:URL or Imap://Host/OnlineFolderName
pref("news.thread_news", true);
pref("news.use_fcc", true);
pref("news.cc_self", false);
pref("news.show_headers", 2); // some
pref("news.pane_config", 0);
pref("news.sort_by", 1); // by date
localDefPref("news.window_rect", "-1,-1,-1,-1");
pref("news.fcc_folder", "");
pref("news.notify.on", true);
pref("news.notify.size", 1000);
pref("news.max_articles", 500);
pref("news.mark_old_read", false);
pref("news.server_is_secure", false);
pref("news.server_port", 119); //default non-secure port number
localDefPref("news.subscribe.name_width", -1); // Subscribe UI cols width
localDefPref("news.subscribe.join_width", -1);
localDefPref("news.subscribe.post_width", -1);
localDefPref("news.subscribe.name_pos", 0); // Subscribe UI cols pos
localDefPref("news.subscribe.join_pos", 1);
localDefPref("news.subscribe.post_pos", 2);
// the next pref's value is irrelevant; it gets tweaked when back end needs to be called
// regarding any change to network.hosts.nntp_server, news.server_port,
// and/or news.server_is_secure.
pref("news.server_change_xaction", 0);
pref("news.send.fake_sender", "");
pref("mailnews.profile_age", 0);
pref("mailnews.profile_age.default_install", 13);
localDefPref("mailnews.folder_window_rect", "-1,-1,-1,-1");
localDefPref("mailnews.thread_window_rect", "-1,-1,-1,-1");
localDefPref("mailnews.message_window_rect", "-1,-1,-1,-1");
localDefPref("mailnews.thread_pane_height", -1);
localDefPref("mailnews.category_pane_width", -1);
pref("mailnews.reuse_thread_window", true);
pref("mailnews.reuse_message_window", true);
pref("mailnews.message_in_thread_window", true);
pref("mailnews.javascript_enabled", true);
pref("mailnews.wraplength", 72);
pref("mailnews.nicknames_only", false);
pref("mailnews.nav_crosses_folders", 1); // 0=do it, don't prompt 1=prompt, 2=don't do it, don't prompt
pref("mailnews.reply_on_top", 1); // 0=bottom 1=top 2=select+bottom 3=select+top
pref("mailnews.reply_with_extra_lines", 2);
pref("mailnews.force_ascii_search", true);
pref("mailnews.autolookup_unknown_mime_types", true);
pref("mailnews.customHeaders", "");
pref("mailnews.searchSubFolders", true);
pref("mailnews.searchServer", true);
pref("mailnews.sort_by_date_received", false);
pref("offline.startup_mode", 0); // 0 online work, 1 offline work, 2 ask me
pref("offline.download.size_limit", 50); // K
pref("offline.news.download.unread_only", true);
pref("offline.news.download.by_date", true);
pref("offline.news.download.use_days", false);
pref("offline.news.download.days", 30); // days
pref("offline.news.download.increments", 3); // 0-yesterday, 1-1 wk ago, 2-2 wk ago,
// 3-1 month ago, 4-6 month ago, 5-1 year ago
pref("offline.news.discussions_count", 0); // select discussion count
pref("offline.download_discussions", true); //default for offline usage is TRUE
pref("offline.download_mail", true); //default for offline usage is TRUE
pref("offline.download_messages", true); //default for offline usage is TRUE
pref("offline.download_directories", true); //default for offline usage is TRUE
pref("news.keep.method", 0); // 0 = all, 1 = by age, 2 = by message count
pref("news.keep.days", 30); // days
pref("news.keep.count", 30); //keep x newest messages
pref("news.keep.only_unread", false);
pref("news.remove_bodies.by_age", false);
pref("news.remove_bodies.days", 20);
pref("ldap_1.autoComplete.interval", 1250);
pref("ldap_1.autoComplete.useAddressBooks", true);
pref("ldap_1.autoComplete.useDirectory", false);
pref("ldap_1.autoComplete.showDialogForMultipleMatches", true);
pref("ldap_1.autoComplete.skipDirectoryIfLocalMatchFound", false);
pref("ldap_1.number_of_directories", 6);
pref("ldap_1.directory1.description", "Personal Address Book");
pref("ldap_1.directory1.dirType", 2);
pref("ldap_1.directory1.isOffline", false);
pref("ldap_1.directory2.description", "Four11 Directory");
pref("ldap_1.directory2.serverName", "ldap.four11.com");
pref("ldap_1.directory3.description", "InfoSpace Directory");
pref("ldap_1.directory3.serverName", "ldap.infospace.com");
pref("ldap_1.directory4.description", "WhoWhere Directory");
pref("ldap_1.directory4.serverName", "ldap.whowhere.com");
pref("ldap_1.directory5.description", "Bigfoot Directory");
pref("ldap_1.directory5.serverName", "ldap.bigfoot.com");
pref("ldap_1.directory6.description", "Switchboard Directory");
pref("ldap_1.directory6.serverName", "ldap.switchboard.com");
pref("ldap_1.directory6.searchBase", "c=US");
pref("ldap_1.directory6.attributes.telephoneNumber", "Phone Number:homephone");
pref("ldap_1.directory6.attributes.street", "State:st");
pref("ldap_1.directory6.filter1.repeatFilterForWords", false);
pref("ldapList.version", 0);

View File

@@ -0,0 +1,21 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../..
DIRS = public admin src
include $(DEPTH)/config/rules.mk

View File

@@ -0,0 +1,27 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public admin src
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,50 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
ifdef POLARIS
SHARED_LIBRARY = $(OBJDIR)/libAutoAdmin.so
endif
XFEDIR = $(DEPTH)/cmd/xfe
CSRCS = prefldap.c icondata.c
REQUIRES = nspr dbm ldap js pref
include $(DEPTH)/config/rules.mk
INCLUDES += -I$(DEPTH)/cmd/xfe/icons -I$(DEPTH)/cmd/xfe/icons/$(OBJDIR)
DEFINES += -DPOLARIS
GARBAGE += icondata.c
ifeq ($(OS_ARCH),AIX)
MKSHLIB = svld -berok $(DSO_LDOPTS)
endif
ifeq ($(OS_ARCH),OSF1)
MKSHLIB = $(LD) $(DSO_LDOPTS)
endif
polaris: $(SHARED_LIBRARY)
$(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/bin
icondata.c:
@rm -f icondata.c $(NOSUCHFILE)
@cd $(XFEDIR)/icons; $(MAKE)
@ln -s $(XFEDIR)/icons/$(OBJDIR)/icondata.c $@

View File

@@ -0,0 +1,55 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef POLARIS
SHARED_LIBRARY = $(OBJDIR)/libAutoAdmin.so
endif
XFEDIR = $(DEPTH)/cmd/xfe
CSRCS = prefldap.c icondata.c
REQUIRES = dbm ldap js pref
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(topsrcdir)/cmd/xfe/icons -I$(DEPTH)/cmd/xfe/icons/$(OBJDIR)
DEFINES += -DPOLARIS
GARBAGE += icondata.c
ifeq ($(OS_ARCH),AIX)
MKSHLIB = svld -berok $(DSO_LDOPTS)
endif
ifeq ($(OS_ARCH),OSF1)
MKSHLIB = $(LD) $(DSO_LDOPTS)
endif
polaris: $(SHARED_LIBRARY)
$(INSTALL) -m 555 $(SHARED_LIBRARY) $(DIST)/bin
icondata.c:
@rm -f icondata.c $(NOSUCHFILE)
@cd $(XFEDIR)/icons; $(MAKE)
@ln -s $(XFEDIR)/icons/$(OBJDIR)/icondata.c $@

View File

@@ -0,0 +1,54 @@
; -*- Mode: Fundamental; tab-width: 4; indent-tabs-mode: nil -*-
;
; The contents of this file are subject to the Netscape Public License
; Version 1.0 (the "NPL"); you may not use this file except in
; compliance with the NPL. You may obtain a copy of the NPL at
; http://www.mozilla.org/NPL/
;
; Software distributed under the NPL is distributed on an "AS IS" basis,
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
; for the specific language governing rights and limitations under the
; NPL.
;
; The Initial Developer of this code under the NPL is Netscape
; Communications Corporation. Portions created by Netscape are
; Copyright (C) 1998 Netscape Communications Corporation. All Rights
; Reserved.
LIBRARY ADM1640.DLL
EXETYPE WINDOWS
PROTMODE
DESCRIPTION 'Netscape 16-bit AutoAdmin Library'
CODE LOADONCALL MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE SINGLE
HEAPSIZE 8192
IMPORTS
EXPORTS
_pref_get_ldap_attributes=_pref_get_ldap_attributes @1

View File

@@ -0,0 +1,82 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/////////////////////////////////////////////////////////////////////////////
// Version stamp for this .DLL
#include <windows.h>
#include <ver.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4 // major, minor, release (alpha 1), build #
PRODUCTVERSION 4
FILEFLAGSMASK 0
FILEFLAGS 0 // final version
FILEOS VOS_DOS_WINDOWS16
FILETYPE VFT_DLL
FILESUBTYPE 0 // not used
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilingual
BEGIN
VALUE "CompanyName", "Netscape Communications Corporation\0"
VALUE "FileDescription", "Netscape 16-bit AutoAdmin Module\0"
VALUE "FileVersion", "4.0\0"
VALUE "InternalName", "ADM1640\0"
VALUE "LegalCopyright", "Copyright Netscape Communications. 1994-96\0"
VALUE "LegalTrademarks", "Netscape, Mozilla\0"
VALUE "OriginalFilename","ADM1640.DLL\0"
VALUE "ProductName", "NETSCAPE\0"
VALUE "ProductVersion", "4.0\0"
END
END
END
1474 BITMAP DISCARDABLE "splash.BMP"

View File

@@ -0,0 +1,102 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
//Microsoft Developer Studio generated resource script.
//
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winver.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,0,0,0
PRODUCTVERSION 4,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x10004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "Netscape Communications Corporation\0"
VALUE "FileDescription", "Netscape 32-bit AutoAdmin Module\0"
VALUE "FileVersion", "4.0\0"
VALUE "InternalName", "ADM3240\0"
VALUE "LegalCopyright", "Copyright Netscape Communications. 1994-96\0"
VALUE "LegalTrademarks", "Netscape, Mozilla\0"
VALUE "OriginalFilename", "adm3240.dll\0"
VALUE "ProductName", "NETSCAPE\0"
VALUE "ProductVersion", "4.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
1474 BITMAP DISCARDABLE "splash.BMP"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""winver.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,100 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
IGNORE_MANIFEST=1
#//------------------------------------------------------------------------
#//
#// Specify the depth of the current directory relative to the
#// root of NS
#//
#//------------------------------------------------------------------------
DEPTH = ..\..\..
#//------------------------------------------------------------------------
#//
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
#//
#//------------------------------------------------------------------------
DLLNAME = adm$(MOZ_BITS)$(VERSION_NUMBER)
PDBFILE = $(DLLNAME).pdb
MAPFILE = $(DLLNAME).map
RESFILE = $(DLLNAME).res
DLL =.\$(OBJDIR)\$(DLLNAME).dll
MAKE_OBJ_TYPE = DLL
LINCS = -I$(PUBLIC)/js \
-I$(PUBLIC)/pref \
-I$(PUBLIC)/java \
-I$(PUBLIC)/ldap \
-I$(PUBLIC)/dbm \
-I$(PUBLIC)/security \
-I$(DEPTH)\include \
LCFLAGS = -DMOZILLA_CLIENT
!if ("$(MOZ_BITS)" == "16" )
BINREL_DIST = $(DIST)
!else
!ifndef MOZ_DEBUG
BINREL_DIST=$(XPDIST)\$(DIST_PREFIX)954.0_OPT.OBJ
!else
BINREL_DIST=$(XPDIST)\$(DIST_PREFIX)954.0_DBG.OBJD
!endif
!endif
!if ("$(MOZ_BITS)" == "16" )
LLIBS=$(LIBNSPR) $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib \
$(DIST)\lib\nsldap.lib $(BINREL_DIST)\lib\hash.lib
DEFFILE = $(DLLNAME).def
!else
LLIBS=$(LIBNSPR) $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib \
$(DIST)\lib\nsldap$(MOZ_BITS).lib $(BINREL_DIST)\lib\hash.lib
!endif
#//------------------------------------------------------------------------
#//
#// Define the files necessary to build the target (ie. OBJS)
#//
#//------------------------------------------------------------------------
OBJS = .\$(OBJDIR)\prefldap.obj \
$(NULL)
#//------------------------------------------------------------------------
#//
#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
#// (these must be defined before the common makefiles are included)
#//
#//------------------------------------------------------------------------
LIBRARY=.\$(OBJDIR)\$(LIBNAME).lib
#//------------------------------------------------------------------------
#//
#// Include the common makefile rules
#//
#//------------------------------------------------------------------------
include <$(DEPTH)\config\rules.mak>
libs:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
# $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib

View File

@@ -0,0 +1,111 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* LDAP functions callable from JavaScript */
#include "ldap.h"
#include "xp_mcom.h"
#ifdef XP_WIN
#include "jsapi.h"
#endif
#include "prefldap.h"
/*
* Creates an LDAP search URL given a comma-separated list of attributes.
* Returns a list of key=values separated by '\n'
*/
#if defined(XP_WIN)
PR_IMPLEMENT(char*)
#else
char *
#endif
pref_get_ldap_attributes(char* host, char* base, char* filter, char* attrs,
char** return_error)
{
char *value = NULL;
LDAP* ld;
int err, i;
char *url;
LDAPMessage *result;
LDAPMessage *e;
char *a;
BerElement *ber;
char **vals;
ld = ldap_init(host, LDAP_PORT);
if (!ld)
return value;
url = (char*) malloc(sizeof(char) *
(strlen(host) + strlen(base) + strlen(filter) + strlen(attrs) + 20));
if (!url)
return value;
XP_SPRINTF(url, "ldap://%s/%s?%s?sub?%s", host, base, attrs, filter);
err = ldap_url_search_s( ld, url, 0, &result );
XP_FREE(url);
if (err != LDAP_SUCCESS) {
*return_error = ldap_err2string(err);
return value;
}
e = ldap_first_entry( ld, result );
if (e) {
a = ldap_first_attribute( ld, e, &ber );
if (a) {
int total_buf_size = 200;
int remaining_buf_size = total_buf_size;
value = (char*) malloc(sizeof(char*) * total_buf_size);
if (!value)
return NULL;
value[0] = '\0';
for ( ; a != NULL; a = ldap_next_attribute( ld, e, ber )) {
vals = ldap_get_values( ld, e, a );
if (vals && vals[0]) {
remaining_buf_size -= (strlen(a) + strlen(vals[0]) + 2);
if (remaining_buf_size < 1) {
remaining_buf_size += 2 * total_buf_size;
total_buf_size += 2 * total_buf_size;
value = (char*) realloc(value, sizeof(char*) * total_buf_size);
if (!value)
return NULL;
}
strcat(value, "\n");
strcat(value, a);
strcat(value, "=");
strcat(value, vals[0]);
ldap_value_free( vals );
}
}
ldap_memfree(a);
}
if (ber)
ber_free(ber, 0);
}
ldap_msgfree(result);
ldap_unbind(ld);
return value;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,35 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
REQUIRES = security nspr
include $(DEPTH)/config/rules.mk
LIBS = -L$(DIST)/lib -lhash
all:: other-stuff $(OBJDIR)/resources $(OBJDIR)/un-obscure
other-stuff:
cd $(DEPTH)/config; $(MAKE)
cd $(DEPTH)/nspr/include; $(MAKE)
cd $(DEPTH)/security/lib/util; $(MAKE) export
cd $(DEPTH)/security/lib/hash; $(MAKE)
$(OBJDIR)/resources: $(OBJDIR)/resources.o
$(CC) -o $@ $< $(LIBS)

View File

@@ -0,0 +1,39 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
REQUIRES = security
include $(topsrcdir)/config/rules.mk
LIBS = -L$(DIST)/lib -lhash
all:: other-stuff $(OBJDIR)/resources $(OBJDIR)/un-obscure
other-stuff:
cd $(DEPTH)/config; $(MAKE)
cd $(DEPTH)/security/lib/util; $(MAKE) export
cd $(DEPTH)/security/lib/hash; $(MAKE)
$(OBJDIR)/resources: $(OBJDIR)/resources.o
$(CC) -o $@ $< $(LIBS)

View File

@@ -0,0 +1,373 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/**********************************************************************
resources.c
Turns a Netscape.ad file into a netscape.cfg file so we can do
l10n for Dogbert.
Usage:
resources Netscape.ad
**********************************************************************/
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sechash.h>
#define OUT_FILE_NAME "netscape.cfg"
#define COUNT(a) (sizeof(a)/sizeof((a)[0]))
struct mapping {
char* resource;
char* pref_name;
char* verb;
char* value;
char mnemonic;
};
struct mapping map[] = {
/* Help Menu labels */
{"*menuBar*manual", "menu.help.item_0.label"},
{"*menuBar*relnotes", "menu.help.item_1.label"},
{"*menuBar*productInfo", "menu.help.item_2.label"},
{"*menuBar*upgrade", "menu.help.item_4.label"},
{"*menuBar*registration", "menu.help.item_5.label"},
{"*menuBar*feedback", "menu.help.item_6.label"},
{"*menuBar*intl", "menu.help.item_8.label"},
{"*menuBar*aboutSecurity", "menu.help.item_9.label"},
{"*menuBar*aboutUsenet", "menu.help.item_10.label"},
{"*menuBar*aboutplugins", "menu.help.item_12.label"},
{"*menuBar*aboutfonts", "menu.help.item_13.label"},
/* Help Menu URLs */
{"*url*manual", "menu.help.item_0.url"},
{"*url*relnotes", "menu.help.item_1.url"},
{"*url*productInfo", "menu.help.item_2.url"},
{"*url*feedback", "menu.help.item_4.url"},
{"*url*registration", "menu.help.item_5.url"},
{"*url*upgrade", "menu.help.item_6.url"},
{"*url*intl", "menu.help.item_8.url"},
{"*url*aboutSecurity", "menu.help.item_9.url"},
{"*url*aboutUsenet", "menu.help.item_10.url"},
{"*url*aboutplugins", "menu.help.item_12.url"},
{"*url*aboutfonts", "menu.help.item_13.url"},
/* Communicator/Bookmarks/Guide labels */
{"*menuBar*inetIndex", "menu.places.item_0.label"},
{"*menuBar*inetWhite", "menu.places.item_1.label"},
{"*menuBar*inetYellow", "menu.places.item_2.label"},
{"*menuBar*whatsNew", "menu.places.item_3.label"},
{"*menuBar*whatsCool", "menu.places.item_4.label"},
/* Communicator/Bookmarks/Guide URLs */
{"*url.about", "menu.places.item_0.url"},
{"*url.white", "menu.places.item_1.url"},
{"*url.yellow", "menu.places.item_2.url"},
{"*url.whats_new", "menu.places.item_3.url"},
{"*url.whats_cool", "menu.places.item_4.url"},
/* Toolbar labels */
{"*toolBar*destinations*inetIndex", "toolbar.places.item_0.label"},
{"*toolBar*destinations*inetWhite", "toolbar.places.item_1.label"},
{"*toolBar*destinations*inetYellow", "toolbar.places.item_2.label"},
{"*toolBar*destinations*whatsNew", "toolbar.places.item_3.label"},
{"*toolBar*destinations*whatsCool", "toolbar.places.item_4.label"},
/* Toolbar URLs */
{"*url.about", "toolbar.places.item_0.url"},
{"*url.white", "toolbar.places.item_1.url"},
{"*url.yellow", "toolbar.places.item_2.url"},
{"*url.whats_new", "toolbar.places.item_3.url"},
{"*url.whats_cool", "toolbar.places.item_4.url"},
/* i18n stuff */
{"*url.netscape", "browser.startup.homepage", "pref"},
{"*versionLocale", "intl.accept_languages", "pref"},
/* Personal Toolbar labels */
/* Personal Toolbar URLs */
};
char output_buf[10 * 1024];
/*
* usage
*/
void
usage(char* prog_name)
{
fprintf(stderr, "Usage: %s filename\n", prog_name);
}
/*
* append_to_file
*/
void
append_to_file(char buf[])
{
strcat(output_buf, buf);
}
/*
* get_value
*/
char*
get_value(char buf[])
{
char* ptr = strchr(buf, ':') + 1;
while ( isspace(*ptr) ) ptr++;
return ptr;
}
/*
* is_label
*/
int
is_label(char buf[])
{
return ( strstr(buf, ".labelString:") != NULL );
}
/*
* is_mnemonic
*/
int
is_mnemonic(char buf[])
{
return ( strstr(buf, ".mnemonic:") != NULL );
}
/*
* is_url
*/
int
is_url(char buf[])
{
return ( !strncmp(buf, "*url.", 5) );
}
/*
* process_line
*/
void
process_line(char buf[])
{
int i;
for ( i = 0; i < COUNT(map); i++ ) {
if ( !strncmp(map[i].resource, buf, strlen(map[i].resource)) ) {
if ( is_label(buf) ) {
map[i].value = strdup(get_value(buf));
} else
if ( is_mnemonic(buf) ) {
map[i].mnemonic = *get_value(buf);
} else {
map[i].value = strdup(get_value(buf));
}
}
}
}
/*
* obscure
*/
static void
obscure(char* buf)
{
int i;
static int offset = 0;
int len = buf ? strlen(buf) : 0;
for ( i = 0; i < len; i++, offset++ ) {
buf[i]+= 7;
}
}
/*
* write_hash
*/
static void
write_hash(FILE* file)
{
char buf[256];
unsigned char digest[16];
unsigned char magic_key[] = "VonGloda5652TX75235ISBN";
int len;
MD5Context* md5_cxt = MD5_NewContext();
MD5_Begin(md5_cxt);
/* start with the magic key */
MD5_Update(md5_cxt, magic_key, sizeof(magic_key));
MD5_Update(md5_cxt, output_buf, strlen(output_buf));
MD5_End(md5_cxt, digest, &len, 16);
MD5_DestroyContext(md5_cxt, PR_TRUE);
sprintf(buf, "// %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
digest[0], digest[1], digest[2], digest[3],
digest[4], digest[5], digest[6], digest[7],
digest[8], digest[9], digest[10], digest[11],
digest[12], digest[13], digest[14], digest[15]);
obscure(buf);
if ( fwrite(buf, sizeof(char), strlen(buf), file) != strlen(buf) ) {
perror("fwrite");
exit(errno);
}
}
/*
* output_file
*/
void
output_file(FILE* out)
{
int i, j, k;
int len;
char buf[256];
append_to_file("with ( PrefConfig ) {\n");
for ( i = 0; i < COUNT(map); i++ ) {
if ( map[i].value ) {
if ( !is_url(map[i].resource) ) {
if ( strchr(map[i].value, '&') ) {
for ( j = 0, k = 0; j < strlen(map[i].value); j++, k++ ) {
buf[k] = map[i].value[j];
if ( buf[k] == '&' ) buf[++k] = '&';
}
free(map[i].value);
buf[k] = '\0';
map[i].value = strdup(buf);
}
if ( map[i].mnemonic ) {
for ( j = 0, k = 0; j < strlen(map[i].value); j++, k++ ) {
buf[k] = map[i].value[j];
if ( buf[k] == map[i].mnemonic ) {
buf[k++] = '&';
buf[k] = map[i].mnemonic;
map[i].mnemonic = '\0';
}
}
free(map[i].value);
buf[k] = '\0';
map[i].value = strdup(buf);
}
}
sprintf(buf, "%s(\"%s\", \"%s\");\n",
map[i].verb ? map[i].verb : "config",
map[i].pref_name,
map[i].value);
append_to_file(buf);
}
}
append_to_file("}\n");
write_hash(out);
len = strlen(output_buf);
obscure(output_buf);
fwrite(output_buf, sizeof(char), len, out);
}
/*
* fatal
*/
void
fatal(char* progname, int error)
{
fprintf(stderr, "%s failed\n", progname);
exit(error);
}
/*
* main
*/
int
main(int argc, char* argv[])
{
FILE* in;
FILE* out;
char buf[64 * 1024];
int line = 0;
if ( argc != 2 ) {
usage(argv[0]);
fatal(argv[0], 1);
}
if ( (in = fopen(argv[1], "r")) == NULL ) {
perror(argv[1]);
fatal(argv[0], errno);
}
if ( (out = fopen(OUT_FILE_NAME, "w")) == NULL ) {
perror(OUT_FILE_NAME);
fatal(argv[0], errno);
}
while ( fgets(buf, sizeof(buf), in) != NULL ) {
line++;
if ( strchr(buf, '\n') == NULL ) {
fprintf(stderr, "%s, line %d: Line too long\n", argv[1], line);
fatal(argv[0], 1);
}
*(char*) strchr(buf, '\n') = '\0';
process_line(buf);
}
output_file(out);
if ( fclose(in) != 0 ) {
perror(argv[1]);
fatal(argv[0], errno);
}
if ( fclose(out) != 0 ) {
perror(OUT_FILE_NAME);
fatal(argv[0], errno);
}
fprintf(stderr, "Created " OUT_FILE_NAME "\n");
return 0;
}

View File

@@ -0,0 +1,61 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/**********************************************************************
un-obscure.c
Prints a netscape.cfg file in plaintext.
Usage:
un-obscure netscape.cfg
**********************************************************************/
#include <stdio.h>
#include <errno.h>
/*
* main
*/
int
main(int argc, char* argv[])
{
int i, n;
FILE* file;
unsigned char buf[1024];
if ( argc != 2 ) {
fprintf(stderr, "Usage: %s filename\n", argv[0]);
}
if ( (file = fopen(argv[1], "r")) == NULL ) {
perror(argv[1]);
exit(errno);
}
while ( (n = fread(buf, sizeof(char), sizeof(buf), file)) > 0 ) {
for ( i = 0; i < n; i++ ) {
buf[i]-= 7;
}
fwrite(buf, sizeof(char), n, stdout);
}
return 0;
}

View File

@@ -0,0 +1,34 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
IGNORE_MANIFEST=1
DEPTH = ..\..
## Include support for MOZ_LITE/MOZ_MEDIUM
include <$(DEPTH)/config/liteness.mak>
DIRS= \
public \
!ifdef MOZ_ADMIN_LIB
admin \
!endif
src
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,7 @@
#
# This is a list of local files which get copied to the mozilla:dist directory
#
prefapi.h
prefldap.h
nsIPref.h

View File

@@ -0,0 +1,24 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
MODULE = pref
EXPORTS = prefapi.h prefldap.h nsIPref.h
include $(DEPTH)/config/rules.mk

View File

@@ -0,0 +1,30 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = pref
EXPORTS = prefapi.h prefldap.h nsIPref.h
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,25 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
IGNORE_MANIFEST=1
#
MODULE=pref
DEPTH=..\..\..
EXPORTS=prefapi.h prefldap.h nsIPref.h
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,70 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIBrowserPrefsManager_h__
#define nsIBrowserPrefsManager_h__
#include "nsIPrefsManager.h"
#include "jsapi.h"
#include "nsISupports.h"
// Browser-specific interface to prefs
class nsIBrowserPrefsManager: public nsIPrefsManager {
public:
// Initialize/shutdown
NS_IMETHOD Startup(char *filename) = 0;
NS_IMETHOD Shutdown() = 0;
// Config file input
NS_IMETHOD ReadUserJSFile(char *filename) = 0;
NS_IMETHOD ReadLIJSFile(char *filename) = 0;
// JS stuff
NS_IMETHOD GetConfigContext(JSContext **js_context) = 0;
NS_IMETHOD GetGlobalConfigObject(JSObject **js_object) = 0;
NS_IMETHOD GetPrefConfigObject(JSObject **js_object) = 0;
NS_IMETHOD EvaluateConfigScript(const char * js_buffer, size_t length,
const char* filename,
PRBool bGlobalContext,
PRBool bCallbacks) = 0;
// Copy prefs
NS_IMETHOD CopyCharPref(const char *pref, char ** return_buf) = 0;
NS_IMETHOD CopyBinaryPref(const char *pref_name,
void ** return_value, int *size) = 0;
NS_IMETHOD CopyDefaultCharPref( const char
*pref_name, char ** return_buffer ) = 0;
NS_IMETHOD CopyDefaultBinaryPref(const char *pref,
void ** return_val, int * size) = 0;
// Path prefs
NS_IMETHOD CopyPathPref(const char *pref, char ** return_buf) = 0;
NS_IMETHOD SetPathPref(const char *pref_name,
const char *path, PRBool set_default) = 0;
// Save pref files
NS_IMETHOD SavePrefFile(void) = 0;
NS_IMETHOD SavePrefFileAs(const char *filename) = 0;
NS_IMETHOD SaveLIPrefFile(const char *filename) = 0;
};
#endif /* nsIBrowserPrefsManager_h__ */

View File

@@ -0,0 +1,146 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIPref_h__
#define nsIPref_h__
#include "xp_core.h"
#include "jsapi.h"
#include "nsISupports.h"
typedef int (*PrefChangedFunc) (const char *, void *);
// {A22AD7B0-CA86-11d1-A9A4-00805F8A7AC4}
NS_DECLARE_ID(kIPrefIID,
0xa22ad7b0, 0xca86, 0x11d1, 0xa9, 0xa4, 0x0, 0x80, 0x5f, 0x8a, 0x7a, 0xc4);
// {DC26E0E0-CA94-11d1-A9A4-00805F8A7AC4}
NS_DECLARE_ID(kPrefCID,
0xdc26e0e0, 0xca94, 0x11d1, 0xa9, 0xa4, 0x0, 0x80, 0x5f, 0x8a, 0x7a, 0xc4);
/*
* Return values
*/
#define NS_PREF_VALUE_CHANGED 1
class nsIPref: public nsISupports {
public:
// Initialize/shutdown
NS_IMETHOD Startup(char *filename) = 0;
NS_IMETHOD Shutdown() = 0;
// Config file input
NS_IMETHOD ReadUserJSFile(char *filename) = 0;
NS_IMETHOD ReadLIJSFile(char *filename) = 0;
// JS stuff
NS_IMETHOD GetConfigContext(JSContext **js_context) = 0;
NS_IMETHOD GetGlobalConfigObject(JSObject **js_object) = 0;
NS_IMETHOD GetPrefConfigObject(JSObject **js_object) = 0;
NS_IMETHOD EvaluateConfigScript(const char * js_buffer, size_t length,
const char* filename,
PRBool bGlobalContext,
PRBool bCallbacks) = 0;
// Getters
NS_IMETHOD GetCharPref(const char *pref,
char * return_buf, int * buf_length) = 0;
NS_IMETHOD GetIntPref(const char *pref, int32 * return_int) = 0;
NS_IMETHOD GetBoolPref(const char *pref, XP_Bool *return_val) = 0;
NS_IMETHOD GetBinaryPref(const char *pref,
void * return_val, int * buf_length) = 0;
NS_IMETHOD GetColorPref(const char *pref_name,
uint8 *red, uint8 *green, uint8 *blue) = 0;
NS_IMETHOD GetColorPrefDWord(const char *pref_name, uint32 *colorref) = 0;
NS_IMETHOD GetRectPref(const char *pref_name,
int16 *left, int16 *top,
int16 *right, int16 *bottom) = 0;
// Setters
NS_IMETHOD SetCharPref(const char *pref,const char* value) = 0;
NS_IMETHOD SetIntPref(const char *pref,int32 value) = 0;
NS_IMETHOD SetBoolPref(const char *pref,PRBool value) = 0;
NS_IMETHOD SetBinaryPref(const char *pref,void * value, long size) = 0;
NS_IMETHOD SetColorPref(const char *pref_name,
uint8 red, uint8 green, uint8 blue) = 0;
NS_IMETHOD SetColorPrefDWord(const char *pref_name, uint32 colorref) = 0;
NS_IMETHOD SetRectPref(const char *pref_name,
int16 left, int16 top, int16 right, int16 bottom) = 0;
// Get Defaults
NS_IMETHOD GetDefaultCharPref(const char *pref,
char * return_buf, int * buf_length) = 0;
NS_IMETHOD GetDefaultIntPref(const char *pref, int32 * return_int) = 0;
NS_IMETHOD GetDefaultBoolPref(const char *pref, XP_Bool *return_val) = 0;
NS_IMETHOD GetDefaultBinaryPref(const char *pref,
void * return_val, int * buf_length) = 0;
NS_IMETHOD GetDefaultColorPref(const char *pref_name,
uint8 *red, uint8 *green, uint8 *blue) = 0;
NS_IMETHOD GetDefaultColorPrefDWord(const char *pref_name,
uint32 *colorref) = 0;
NS_IMETHOD GetDefaultRectPref(const char *pref_name,
int16 *left, int16 *top,
int16 *right, int16 *bottom) = 0;
// Set defaults
NS_IMETHOD SetDefaultCharPref(const char *pref,const char* value) = 0;
NS_IMETHOD SetDefaultIntPref(const char *pref,int32 value) = 0;
NS_IMETHOD SetDefaultBoolPref(const char *pref,PRBool value) = 0;
NS_IMETHOD SetDefaultBinaryPref(const char *pref,
void * value, long size) = 0;
NS_IMETHOD SetDefaultColorPref(const char *pref_name,
uint8 red, uint8 green, uint8 blue) = 0;
NS_IMETHOD SetDefaultRectPref(const char *pref_name,
int16 left, int16 top,
int16 right, int16 bottom) = 0;
// Copy prefs
NS_IMETHOD CopyCharPref(const char *pref, char ** return_buf) = 0;
NS_IMETHOD CopyBinaryPref(const char *pref_name,
void ** return_value, int *size) = 0;
NS_IMETHOD CopyDefaultCharPref( const char
*pref_name, char ** return_buffer ) = 0;
NS_IMETHOD CopyDefaultBinaryPref(const char *pref,
void ** return_val, int * size) = 0;
// Path prefs
NS_IMETHOD CopyPathPref(const char *pref, char ** return_buf) = 0;
NS_IMETHOD SetPathPref(const char *pref_name,
const char *path, PRBool set_default) = 0;
// Pref info
NS_IMETHOD PrefIsLocked(const char *pref_name, XP_Bool *res) = 0;
// Save pref files
NS_IMETHOD SavePrefFile(void) = 0;
NS_IMETHOD SavePrefFileAs(const char *filename) = 0;
NS_IMETHOD SaveLIPrefFile(const char *filename) = 0;
// Callbacks
NS_IMETHOD RegisterCallback( const char* domain,
PrefChangedFunc callback,
void* instance_data ) = 0;
NS_IMETHOD UnregisterCallback( const char* domain,
PrefChangedFunc callback,
void* instance_data ) = 0;
};
#endif /* nsIPref_h__ */

View File

@@ -0,0 +1,114 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIPrefsManager_h__
#define nsIPrefsManager_h__
#include "nsISupports.h"
typedef int (*nsPrefChangedFunc) (const char *, void *);
/*
* Return values
*/
#define NS_PREF_VALUE_CHANGED 1
class nsIPrefsManager: public nsISupports {
public:
// Getters
NS_IMETHOD GetCharPref(const char *pref,
char * return_buf, int * buf_length) = 0;
NS_IMETHOD GetIntPref(const char *pref, int32 * return_int) = 0;
NS_IMETHOD GetBoolPref(const char *pref, PRBool *return_val) = 0;
NS_IMETHOD GetBinaryPref(const char *pref,
void * return_val, int * buf_length) = 0;
NS_IMETHOD GetColorPref(const char *pref_name,
uint8 *red, uint8 *green, uint8 *blue) = 0;
NS_IMETHOD GetColorPrefDWord(const char *pref_name, uint32 *colorref) = 0;
NS_IMETHOD GetRectPref(const char *pref_name,
int16 *left, int16 *top,
int16 *right, int16 *bottom) = 0;
// Setters
NS_IMETHOD SetCharPref(const char *pref,const char* value) = 0;
NS_IMETHOD SetIntPref(const char *pref,int32 value) = 0;
NS_IMETHOD SetBoolPref(const char *pref,PRBool value) = 0;
NS_IMETHOD SetBinaryPref(const char *pref,void * value, long size) = 0;
NS_IMETHOD SetColorPref(const char *pref_name,
uint8 red, uint8 green, uint8 blue) = 0;
NS_IMETHOD SetColorPrefDWord(const char *pref_name, uint32 colorref) = 0;
NS_IMETHOD SetRectPref(const char *pref_name,
int16 left, int16 top, int16 right, int16 bottom) = 0;
// Get Defaults
NS_IMETHOD GetDefaultCharPref(const char *pref,
char * return_buf, int * buf_length) = 0;
NS_IMETHOD GetDefaultIntPref(const char *pref, int32 * return_int) = 0;
NS_IMETHOD GetDefaultBoolPref(const char *pref, PRBool *return_val) = 0;
NS_IMETHOD GetDefaultBinaryPref(const char *pref,
void * return_val, int * buf_length) = 0;
NS_IMETHOD GetDefaultColorPref(const char *pref_name,
uint8 *red, uint8 *green, uint8 *blue) = 0;
NS_IMETHOD GetDefaultColorPrefDWord(const char *pref_name,
uint32 *colorref) = 0;
NS_IMETHOD GetDefaultRectPref(const char *pref_name,
int16 *left, int16 *top,
int16 *right, int16 *bottom) = 0;
// Set defaults
NS_IMETHOD SetDefaultCharPref(const char *pref,const char* value) = 0;
NS_IMETHOD SetDefaultIntPref(const char *pref,int32 value) = 0;
NS_IMETHOD SetDefaultBoolPref(const char *pref,PRBool value) = 0;
NS_IMETHOD SetDefaultBinaryPref(const char *pref,
void * value, long size) = 0;
NS_IMETHOD SetDefaultColorPref(const char *pref_name,
uint8 red, uint8 green, uint8 blue) = 0;
NS_IMETHOD SetDefaultRectPref(const char *pref_name,
int16 left, int16 top,
int16 right, int16 bottom) = 0;
// Pref info
NS_IMETHOD PrefIsLocked(const char *pref_name, PRBool *res) = 0;
// Callbacks
NS_IMETHOD RegisterCallback( const char* domain,
nsPrefChangedFunc callback,
void* instance_data ) = 0;
NS_IMETHOD UnregisterCallback( const char* domain,
nsPrefChangedFunc callback,
void* instance_data ) = 0;
};
#define NS_IPREFSMANAGER_IID \
{ /* e10fb550-62cb-11d2-8164-006008119d7a */ \
0xe10fb550, \
0x62cb, \
0x11d2, \
{0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
}
#define NS_PREFSMANAGER_CID \
{ /* fa8fa650-62cb-11d2-8164-006008119d7a */ \
0xfa8fa650, \
0x62cb, \
0x11d2, \
{0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
}
#endif /* nsIPrefsManager_h__ */

View File

@@ -0,0 +1,387 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*
// <pre>
*/
#ifndef PREFAPI_H
#define PREFAPI_H
#include "xp_core.h"
#include "prtypes.h"
#include "jscompat.h"
#include "jspubtd.h"
#ifdef XP_WIN
#include "plhash.h"
#endif
NSPR_BEGIN_EXTERN_C
#ifdef XP_PC
// horrible pre-declaration...so kill me.
int pref_InitInitialObjects(JSContext *js_context,JSObject *js_object);
PR_EXTERN(int) pref_savePref(PRHashEntry *he, int i, void *arg);
#endif
/*
// <font color=blue>
// The Init function sets up of the JavaScript preference context and creates
// the basic preference and pref_array objects:
// It also takes the filename of the preference file to use. This allows the
// module to create its own pref file if that is so desired. If a filename isn't
// passed, the pref module will either use the current name and file (if known) or
// will call (FE_GetPrefFileName() ?) to have a module prompt the user to determine
// which user it is (on a mulit-user system). In general, the FE should pass the
// filename and the sub-modules should pass NULL
//
// At the moment, the Init function is defining 3 JavaScript functions that can be
// called in arbitrary JavaScript (like that passed to the EvaluateJS function below).
// This may increase in the future...
//
// pref(pref_name,default_value) : Setup the initial preference storage and default
// user_pref(pref_name, user_value) : Set a user preference
// lock_pref(pref_name) : Lock a preference (prevent it from being modifyed by user)
// </font>
*/
PR_EXTERN(int)
PREF_ReadUserJSFile(char *filename);
/* LI_STUFF read in an li prefs file and give it a name- preobably temporary */
PR_EXTERN(int)
PREF_ReadLIJSFile(char *filename);
PR_EXTERN(int)
PREF_Init(char *filename);
PR_EXTERN(int)
PREF_GetConfigContext(JSContext **js_context);
PR_EXTERN(int)
PREF_GetGlobalConfigObject(JSObject **js_object);
PR_EXTERN(int)
PREF_GetPrefConfigObject(JSObject **js_object);
/*
// Cleanup should be called at program exit to free the
// list of registered callbacks.
*/
PR_EXTERN(void)
PREF_Cleanup();
/*
// <font color=blue>
// Given a path to a local Lock file, unobscures the file (not implemented yet)
// and verifies the MD5 hash. Returns PREF_BAD_LOCKFILE if hash failed;
// otherwise, evaluates the contents of the file as a JS buffer.
// </font>
*/
PR_EXTERN(int)
PREF_ReadLockFile(const char *filename);
/*
// <font color=blue>
// Pass an arbitrary JS buffer to be evaluated in the Preference context.
// On startup modules will want to setup their preferences with reasonable
// defaults. For example netlib might call with a buffer of:
//
// pref("network.tcpbufsize",4096);
// pref("network.max_connections", 4);
// pref("network.proxy.http_host", "");
// pref("network.proxy.http_port". 0);
// ...etc...
//
// This routine generates callbacks to functions registered with
// PREF_RegisterCallback() for any user values that have changed.
// </font>
*/
PR_EXTERN(int)
PREF_EvaluateJSBuffer(const char * js_buffer, size_t length);
/*
// Like the above but does not generate callbacks.
*/
PR_EXTERN(int)
PREF_QuietEvaluateJSBuffer(const char * js_buffer, size_t length);
/*
// Like the above but does not generate callbacks and executes in scope of global config object
*/
PR_EXTERN(int)
PREF_QuietEvaluateJSBufferWithGlobalScope(const char * js_buffer, size_t length);
/*
// This routine is newer than the above which are not being called externally,
// as far as I know. The following is used from mkautocf to evaluate a
// config URL file with callbacks.
*/
PR_EXTERN(JSBool)
PREF_EvaluateConfigScript(const char * js_buffer, size_t length,
const char* filename, PRBool bGlobalContext, PRBool bCallbacks);
/*
// <font color=blue>
// Error codes
// </font>
*/
enum {
PREF_OUT_OF_MEMORY = -5,
PREF_TYPE_CHANGE_ERR = -4,
PREF_NOT_INITIALIZED = -3,
PREF_BAD_LOCKFILE = -2,
PREF_ERROR = -1,
PREF_NOERROR = 0,
PREF_OK = 0, /* same as PREF_NOERROR */
PREF_VALUECHANGED = 1
};
/*
// <font color=blue>
// Set the various types of preferences. These functions take a dotted
// notation of the preference name (e.g. "browser.startup.homepage").
// Note that this will cause the preference to be saved to the file if
// it is different from the default. In other words, these are used
// to set the _user_ preferences.
// Each set returns PREF_VALUECHANGED if the user value changed
// (triggering a callback), or PREF_NOERROR if the value was unchanged.
// </font>
*/
PR_EXTERN(int) PREF_SetCharPref(const char *pref,const char* value);
PR_EXTERN(int) PREF_SetIntPref(const char *pref,int32 value);
PR_EXTERN(int) PREF_SetBoolPref(const char *pref,PRBool value);
PR_EXTERN(int) PREF_SetBinaryPref(const char *pref,void * value, long size);
PR_EXTERN(int) PREF_SetColorPref(const char *pref_name, uint8 red, uint8 green, uint8 blue);
PR_EXTERN(int) PREF_SetColorPrefDWord(const char *pref_name, uint32 colorref);
PR_EXTERN(int) PREF_SetRectPref(const char *pref_name, int16 left, int16 top, int16 right, int16 bottom);
/*
// <font color=blue>
// Set the default for various types of preferences. These functions take a dotted
// notation of the preference name (e.g. "browser.startup.homepage")
// This will only affect the program behavior if the user does not have a value
// saved over it for the particular preference. In addition, these will never
// be saved out to disk.
// </font>
*/
PR_EXTERN(int) PREF_SetDefaultCharPref(const char *pref,const char* value);
PR_EXTERN(int) PREF_SetDefaultIntPref(const char *pref,int32 value);
PR_EXTERN(int) PREF_SetDefaultBoolPref(const char *pref,PRBool value);
PR_EXTERN(int) PREF_SetDefaultBinaryPref(const char *pref,void * value, long size);
PR_EXTERN(int) PREF_SetDefaultColorPref(const char *pref_name, uint8 red, uint8 green, uint8 blue);
PR_EXTERN(int) PREF_SetDefaultRectPref(const char *pref_name, int16 left, int16 top, int16 right, int16 bottom);
/*
// <font color=blue>
// Get the various types of preferences. These functions take a dotted
// notation of the preference name (e.g. "browser.startup.homepage")
//
// They also take a pointer to fill in with the return value and return an
// error value. At the moment, this is simply an int but it may
// be converted to an enum once the global error strategy is worked out.
// In addition, the GetChar and GetBinary versions take an (int *) which
// should contain the length of the buffer which is passed to be filled
// in. If the length passed in is 0, the function will not copy the
// preference but will instead return the length necessary for the buffer,
// including null terminator.
//
// They will perform conversion if the type doesn't match what was requested.
// (if it is reasonably possible)
// </font>
*/
PR_EXTERN(int) PREF_GetCharPref(const char *pref, char * return_buf, int * buf_length);
PR_EXTERN(int) PREF_GetIntPref(const char *pref, int32 * return_int);
PR_EXTERN(int) PREF_GetBoolPref(const char *pref, XP_Bool * return_val);
PR_EXTERN(int) PREF_GetBinaryPref(const char *pref, void * return_val, int * buf_length);
PR_EXTERN(int) PREF_GetColorPref(const char *pref_name, uint8 *red, uint8 *green, uint8 *blue);
PR_EXTERN(int) PREF_GetColorPrefDWord(const char *pref_name, uint32 *colorref);
PR_EXTERN(int) PREF_GetRectPref(const char *pref_name, int16 *left, int16 *top, int16 *right, int16 *bottom);
/*
// <font color=blue>
// These functions are similar to the above "Get" version with the significant
// difference that the preference module will alloc the memory (e.g. XP_STRDUP) and
// the caller will need to be responsible for freeing it...
// </font>
*/
PR_EXTERN(int) PREF_CopyCharPref(const char *pref, char ** return_buf);
PR_EXTERN(int) PREF_CopyBinaryPref(const char *pref_name, void ** return_value, int *size);
PR_EXTERN(int) PREF_CopyDefaultCharPref( const char *pref_name, char ** return_buffer );
PR_EXTERN(int) PREF_CopyDefaultBinaryPref(const char *pref, void ** return_val, int * size);
/*
// <font color=blue>
// Get and set encoded full file/directory pathname strings
// (i.e. file URLs without the file:// part).
// On Windows and Unix, these are just stored as string preferences.
// On Mac, paths should be stored as aliases. These calls convert
// between paths and aliases flattened into binary strings.
// </font>
*/
PR_EXTERN(int) PREF_CopyPathPref(const char *pref, char ** return_buf);
PR_EXTERN(int) PREF_SetPathPref(const char *pref_name, const char *path, PRBool set_default);
/*
// <font color=blue>
// Same as the previous "Get" functions but will always return the
// default value regardless of what the user has set. These are designed
// to be used by functions which "reset" the preferences
//
// </font>
*/
PR_EXTERN(int) PREF_GetDefaultCharPref(const char *pref, char * return_buf, int * buf_length);
PR_EXTERN(int) PREF_GetDefaultIntPref(const char *pref, int32 * return_int);
PR_EXTERN(int) PREF_GetDefaultBoolPref(const char *pref, XP_Bool * return_val);
PR_EXTERN(int) PREF_GetDefaultBinaryPref(const char *pref, void * return_val, int * buf_length);
PR_EXTERN(int) PREF_GetDefaultColorPref(const char *pref_name, uint8 *red, uint8 *green, uint8 *blue);
PR_EXTERN(int) PREF_GetDefaultColorPrefDWord(const char *pref_name, uint32 *colorref);
PR_EXTERN(int) PREF_GetDefaultRectPref(const char *pref_name, int16 *left, int16 *top, int16 *right, int16 *bottom);
/*
// <font color=blue>
// Administration Kit support
//
// These fetch a given configuration parameter.
// If the parameter is not defined, an error code will be returned;
// a JavaScript error will not be generated (unlike the above Get routines).
//
// IndexConfig fetches an indexed button or menu string, e.g.
// PREF_CopyIndexConfigString( "menu.help.item", 3, "label", &buf );
// to fetch the label of Help menu item 3.
// The caller is responsible for freeing the returned string.
// </font>
*/
PR_EXTERN(int) PREF_CopyConfigString(const char *obj_name, char **return_buffer);
PR_EXTERN(int) PREF_CopyIndexConfigString(const char *obj_name, int index,
const char *field, char **return_buffer);
PR_EXTERN(int) PREF_GetConfigInt(const char *obj_name, int32 *return_int);
PR_EXTERN(int) PREF_GetConfigBool(const char *obj_name, XP_Bool *return_bool);
/* OLD:: */PR_EXTERN(int) PREF_GetConfigString(const char *obj_name, char * return_buffer, int size,
int index, const char *field);
/*
// <font color=blue>
// PRBool funtion that returns whether or not the preference is locked and therefore
// cannot be changed.
// </font>
*/
PR_EXTERN(PRBool) PREF_PrefIsLocked(const char *pref_name);
PR_EXTERN(int) PREF_GetPrefType(const char *pref_name);
/*
// <font color=blue>
// Cause the preference file to be written to disk
// </font>
*/
PR_EXTERN(int) PREF_SavePrefFile(void);
PR_EXTERN(int) PREF_SavePrefFileAs(const char *filename);
/* LI_STUFF */
PR_EXTERN(int) PREF_SaveLIPrefFile(const char *filename);
/*
* Called to handle the "about:config" command.
* Currently dumps out some debugging information.
*/
PR_EXTERN(char *) PREF_AboutConfig();
/*
* Delete a branch of the tree
*/
PR_EXTERN(int) PREF_DeleteBranch(const char *branch_name);
/*
* Clears the given pref (reverts it to its default value)
*/
PR_EXTERN(int) PREF_ClearUserPref(const char *pref_name);
/*
* Creates an iterator over the children of a node. Sample code:
char* children;
if ( PREF_CreateChildList("mime", &children) == 0 )
{
int index = 0;
while (char* child = PREF_NextChild(children, &index)) {
...
}
XP_FREE(children);
}
* e.g. subsequent calls to Next() return
* "mime.image_gif", then
* "mime.image_jpeg", etc.
*/
PR_EXTERN(int) PREF_CreateChildList(const char* parent_node, char **child_list);
PR_EXTERN(char*) PREF_NextChild(char *child_list, int *index);
/*
* Copies parts of the hierarchy from one root to another.
For example, PREF_CopyPrefsTree("mail","newmail") copies all
the "mail." prefs to "newmail." prefs. It does not delete the
source tree; you should do that yourself.
Either srcRoot or destRoot can be empty strings, to denote
the root of the entire tree, but cannot be NULL.
*
*
*/
PR_EXTERN(int) PREF_CopyPrefsTree(const char *srcRoot, const char *destRoot);
/*
// <font color=blue>
// The callback function will get passed the pref_node which triggered the call
// and the void * instance_data which was passed to the register callback function.
// Return a non-zero result to pass an error up to the caller.
// </font>
*/
typedef int (*PrefChangedFunc) (const char *, void *);
/*
// <font color=blue>
// Register a callback. This takes a node in the preference tree and will
// call the callback function if anything below that node is modified.
// Unregister returns PREF_NOERROR if a callback was found that
// matched all the parameters; otherwise it returns PREF_ERROR.
// </font>
*/
PR_EXTERN(void) PREF_RegisterCallback( const char* domain,
PrefChangedFunc callback, void* instance_data );
PR_EXTERN(int) PREF_UnregisterCallback( const char* domain,
PrefChangedFunc callback, void* instance_data );
/*
// Front ends implement to determine whether AutoAdmin library is installed.
*/
PR_EXTERN(PRBool) PREF_IsAutoAdminEnabled(void);
#ifdef XP_UNIX
typedef void* XmStringPtr;
typedef void* KeySymPtr;
PR_EXTERN(void) PREF_AlterSplashIcon(struct fe_icon_data*);
PR_EXTERN(PRBool) PREF_GetLabelAndMnemonic(char*, char**, XmStringPtr xmstring, KeySymPtr keysym);
PR_EXTERN(PRBool) PREF_GetUrl(char*, char**);
#endif
NSPR_END_EXTERN_C
#endif

View File

@@ -0,0 +1,27 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* prefldap.h */
/* Interface to LDAP AutoAdmin function */
#if defined(XP_WIN)
PR_EXTERN(char*)
#else
char *
#endif
pref_get_ldap_attributes(char* host, char* base, char* filter, char* attr, char** return_error);

View File

@@ -0,0 +1,132 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
MODULE = pref
LIBRARY_NAME = pref
REQUIRES = js pref nspr dbm security ldap img layer xpcom util
ifneq ($(subst /,_,$(shell uname -s)),OS2)
CSRCS = unix/unixpref.c
else
CSRCS = prefldap.c
LIBRARY = xppref32.$(LIB_SUFFIX)
EXPORTS = initpref.js init/all.js init/config.js win/winpref.js os2/os2pref.js
OS2_IMPLIB = 1
DEF_FILE = xpOS2.def
EXTRA_LIBS = $(DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib \
$(LIBNSPR) \
$(DIST)/lib/libldap.lib $(DIST)/lib/liblber.lib \
$(DIST)/lib/libldap.lib $(DIST)/lib/libhash.lib \
$(NULL)
endif
CSRCS += prefapi.c
CPPSRCS += nsPref.cpp
include $(DEPTH)/config/rules.mk
INCLUDES += -I$(DEPTH)/cmd/xfe/icons -Iunix
DEFINES += -DB1M
GARBAGE += unix/jsbuffer.h
CONFIG_FILES = initpref.js \
init/all.js \
$(NULL)
ifdef MOZ_MAIL_NEWS
CONFIG_FILES += \
init/mailnews.js \
$(NULL)
endif
ifdef MOZ_SECURITY
CONFIG_FILES += \
init/security.js \
$(NULL)
endif
ifdef MOZ_EDITOR
CONFIG_FILES += \
init/editor.js \
$(NULL)
endif
ifndef MOZ_MAIL_NEWS
CONFIG_FILES += \
init/configr.js \
$(NULL)
else
CONFIG_FILES += \
init/config.js \
$(NULL)
endif
CONFIG_FILES += \
unix/unix.js \
$(NULL)
##############################
# Magic PREF_ generation hacks
# put auto-generated headers in here
HEADER_DEST_DIR = prefnames
# find names of files by stripping path and converting .js -> .h
CONFIG_FILE_HEADERS = $(notdir $(CONFIG_FILES:%.js=%.h))
# strip out the path and add the dest and pref_ prefix
CONFIG_FILE_EXPORTS = $(addprefix $(HEADER_DEST_DIR)/pref_,$(CONFIG_FILE_HEADERS))
# export these new files so other modules can use them
EXPORTS += $(CONFIG_FILE_EXPORTS)
include $(DEPTH)/config/rules.mk
# VPATH allows us to make sure the auto-generation rule works for
# everything in VPATH (so init/all.js->pref_all.h etc)
VPATH += init/ unix/
# this comes after rules.mk because rules.mk blows it away
INCLUDES += -Iunix
$(LIBRARY): $(OBJS)
unix/unixpref.c: unix/jsbuffer.h
unix/jsbuffer.h: Makefile $(CONFIG_FILES)
@echo "/* This is an automatically generated file */" > $@
@echo >> $@
@echo "static char* pref_init_buffer = " >> $@
@cat $(CONFIG_FILES) | sed 's/\\/\\\\/g' | sed 's/\\r/\\n/' | sed 's/\"/\\\"/g' | sed 's/^M//g' | sed 's/^/"/' | sed 's/$$/\\n"/' >> $@
@echo \; >> $@
# create the directory if necessary
$(HEADER_DEST_DIR):
mkdir $(HEADER_DEST_DIR)
# generate the header files so that path/file.js -> pref_file.h
# path must be in the VPATH above
$(HEADER_DEST_DIR)/pref_%.h: %.js $(HEADER_DEST_DIR)
$(PERL) prefheader.pl $< > $@

View File

@@ -0,0 +1,108 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = pref
LIBRARY_NAME = pref
REQUIRES = js pref dbm security ldap img layer xpcom util
ifneq ($(subst /,_,$(shell uname -s)),OS2)
CSRCS = unix/unixpref.c
else
CSRCS = prefldap.c
LIBRARY = xppref32.$(LIB_SUFFIX)
EXPORTS = initpref.js init/all.js init/config.js win/winpref.js os2/os2pref.js
OS2_IMPLIB = 1
DEF_FILE = xpOS2.def
EXTRA_LIBS = $(DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib \
$(LIBNSPR) \
$(DIST)/lib/libldap.lib $(DIST)/lib/liblber.lib \
$(DIST)/lib/libldap.lib $(DIST)/lib/libhash.lib \
$(NULL)
endif
CSRCS += prefapi.c
CPPSRCS += nsPref.cpp
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(topsrcdir)/cmd/xfe/icons -I$(srcdir)/unix -Iunix
DEFINES += -DB1M
GARBAGE += unix/jsbuffer.h
CONFIG_FILES = initpref.js \
init/all.js \
$(NULL)
ifdef MOZ_MAIL_NEWS
CONFIG_FILES += \
init/mailnews.js \
$(NULL)
endif
ifdef MOZ_SECURITY
CONFIG_FILES += \
init/security.js \
$(NULL)
endif
ifdef MOZ_EDITOR
CONFIG_FILES += \
init/editor.js \
$(NULL)
endif
ifndef MOZ_MAIL_NEWS
CONFIG_FILES += \
init/configr.js \
$(NULL)
else
CONFIG_FILES += \
init/config.js \
$(NULL)
endif
CONFIG_FILES += \
unix/unix.js \
$(NULL)
CONFIG_FILES := $(addprefix $(srcdir)/, $(CONFIG_FILES))
$(LIBRARY): $(OBJS)
unix/unixpref.c: unix/jsbuffer.h
@if test ! -d unix; then rm -f unix && mkdir -p unix; fi
@if test ! -f $@; then $(INSTALL) $(srcdir)/unix/unixpref.c unix/; fi
unix/jsbuffer.h: Makefile $(CONFIG_FILES)
@if test ! -d unix; then rm -f unix && mkdir -p unix; fi
@(echo "/* This is an automatically generated file */" > $@; \
echo >> $@; \
echo "static char* pref_init_buffer = " >> $@; \
cat $(CONFIG_FILES) | sed 's/\\/\\\\/g' | sed 's/\\r/\\n/' | sed 's/\"/\\\"/g' | sed 's/^M//g' | sed 's/^/"/' | sed 's/$$/\\n"/' >> $@; \
echo \; >> $@; \
)

View File

@@ -0,0 +1,296 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// SYNTAX HINTS: dashes are delimiters. Use underscores instead.
// The first character after a period must be alphabetic.
config("timebomb.expiration_time",-1);
config("timebomb.warning_time",-1);
config("timebomb.relative_timebomb_secret_name","general.bproxy_cert_digest");
config("timebomb.relative_timebomb_days",-1);
config("timebomb.relative_timebomb_warning_days",-1);
pref("network.search.url","http://cgi.netscape.com/cgi-bin/url_search.cgi?search=");
pref("general.bproxy_cert_digest",0);
pref("general.startup.browser", true);
pref("general.startup.mail", false);
pref("general.startup.news", false);
pref("general.startup.editor", false);
pref("general.startup.conference", false);
pref("general.startup.calendar", false);
pref("general.startup.netcaster", false);
pref("general.always_load_images", true);
pref("general.always_load_movies", true);
pref("general.always_load_sounds", true);
pref("general.title_tips", true);
pref("general.help_source.site", 1); // 0 = Netscape, 1 = installed, 2 = custom
pref("general.help_source.url", "");
pref("general.fullcircle_enable", true);
pref("general.fullcircle_collect_ns_data", false);
pref("browser.enable_style_sheets", true);
pref("browser.startup.page", 1); // 0 = blank, 1 = home, 2 = last
pref("browser.startup.homepage", "http://www.mozilla.org/");
pref("browser.startup.homepage_override", true);
pref("browser.startup.autoload_homepage", true);
pref("browser.startup.agreed_to_licence", false);
pref("browser.startup.license_version", 0);
pref("browser.startup.default_window", 1); // start up browser
pref("browser.cache.disk_cache_size", 7680);
pref("browser.cache.memory_cache_size", 1024);
pref("browser.cache.disk_cache_ssl", false);
pref("browser.foreground_color", "#000000");
pref("browser.background_color", "#C0C0C0");
pref("browser.anchor_color", "#0000EE");
pref("browser.visited_color", "#551A8B");
pref("browser.chrome.show_directory_buttons", true);
pref("browser.chrome.toolbar_style", 2);
pref("browser.chrome.advanced_toolbar", false);
pref("browser.chrome.show_toolbar", true);
pref("browser.chrome.show_status_bar", true);
pref("browser.chrome.show_url_bar", true);
pref("browser.chrome.show_security_bar", true);
pref("browser.chrome.button_style", 0);
pref("browser.background_option", 0); // DEFAULT_BACKGROUND
pref("browser.link_expiration", 9);
pref("browser.cache.check_doc_frequency", 0);
pref("browser.delay_images", false);
pref("browser.underline_anchors", true);
pref("browser.never_expire", false);
pref("browser.display_while_loading", true);
pref("browser.custom_link_color", false);
pref("browser.custom_visited_color", false);
pref("browser.custom_text_color", false);
pref("browser.use_document_colors", true);
pref("browser.ldapfile_location", "");
pref("browser.print_background", false);
pref("browser.prefs_window_rect", "-1,-1,-1,-1");
pref("browser.find_window_rect", "-1,-1,-1,-1");
pref("browser.bookmark_window_rect", "-1,-1,-1,-1");
pref("browser.download_window_rect", "-1,-1,-1,-1");
pref("browser.wfe.ignore_def_check",false);
pref("browser.wfe.use_windows_colors",true);
pref("browser.startup_mode",1);
localDefPref("browser.bookmark_location", "");
localDefPref("browser.addressbook_location", "");
localDefPref("browser.socksfile_location", "");
localDefPref("browser.ldapfile_location", "");
pref("browser.url_history.URL_1", "");
pref("browser.url_history.URL_2", "");
pref("browser.url_history.URL_3", "");
pref("browser.url_history.URL_4", "");
pref("browser.url_history.URL_5", "");
pref("browser.url_history.URL_6", "");
pref("browser.url_history.URL_7", "");
pref("browser.url_history.URL_8", "");
pref("browser.url_history.URL_9", "");
pref("browser.url_history.URL_10", "");
pref("browser.url_history.URL_11", "");
pref("browser.url_history.URL_12", "");
pref("browser.url_history.URL_13", "");
pref("browser.url_history.URL_14", "");
pref("browser.url_history.URL_15", "");
pref("browser.personal_toolbar_button.min_chars", 15);
pref("browser.personal_toolbar_button.max_chars", 30);
pref("browser.PICS.ratings_enabled", false);
pref("browser.PICS.pages_must_be_rated", false);
pref("browser.PICS.disable_for_this_session", false);
pref("browser.PICS.reenable_for_this_session", false);
pref("browser.PICS.service.http___home_netscape_com_default_rating.service_enabled", true);
pref("browser.PICS.service.http___home_netscape_com_default_rating.s", 0);
// Smart Browsing prefs
pref("browser.related.enabled", true);
pref("browser.related.autoload", 1); // 0 = Always, 1 = After first use, 2 = Never
pref("browser.related.provider", "http://www-rl.netscape.com/wtgn?");
pref("browser.related.detailsProvider", "http://cgi.netscape.com/cgi-bin/rlcgi.cgi?URL=");
pref("browser.related.disabledForDomains", "");
pref("browser.goBrowsing.enabled", true);
// The NavCenter preferences
localDefPref("browser.navcenter.dockstyle", 1); // 1 = left, 2 = right, 3 = top, 4 = bottom
localDefPref("browser.navcenter.docked.tree.visible", false);
localDefPref("browser.navcenter.docked.selector.visible", true);
localDefPref("browser.navcenter.docked.tree.width", 250); // Percent of parent window consumed by docked nav center
localDefPref("browser.navcenter.floating.rect", "20, 20, 400, 600"); // Window dimensions when floating
localDefPref("ghist.expires.pos", 4);
localDefPref("ghist.expires.width", 1400);
localDefPref("ghist.firstvisit.pos", 2);
localDefPref("ghist.firstvisit.width", 1400);
localDefPref("ghist.lastvisit.pos", 3);
localDefPref("ghist.lastvisit.width", 1400);
localDefPref("ghist.location.pos", 1);
localDefPref("ghist.location.width", 2400);
pref("ghist.show_value", 0);
pref("ghist.sort_descending", false);
pref("ghist.sortby", 3); // eGH_LastDateSort
localDefPref("ghist.title.pos", 0);
localDefPref("ghist.title.width", 2400);
localDefPref("ghist.visiblecolumns", 6);
localDefPref("ghist.visitcount.pos", 5);
localDefPref("ghist.visitcount.width", 1000);
localDefPref("ghist.window_rect", "0,0,0,0");
pref("javascript.enabled", true);
pref("javascript.allow.mailnews", true);
pref("javascript.allow.signing", true);
pref("javascript.reflect_preferences", false); // for PE
pref("network.dnsAttempt", 0);
pref("network.tcptimeout", 0); // use default
pref("network.tcpbufsize", 0); //
pref("network.use_async_dns", true);
pref("network.dnsCacheExpiration", 900); // in seconds
pref("network.enableUrlMatch", true);
pref("network.max_connections", 4);
pref("network.speed_over_ui", true);
pref("network.file_sort_method", 0); // NAME 0, TYPE 1, SIZE 2, DATE 3
pref("network.ftp.passive", true);
pref("network.hosts.smtp_server", "mail");
pref("network.hosts.pop_server", "mail");
pref("network.hosts.nntp_server", "news");
pref("network.hosts.socks_server", "");
pref("network.hosts.socks_serverport", 1080);
pref("network.hosts.socks_conf", "");
pref("network.proxy.autoconfig_url", "");
pref("network.proxy.type", 3); /* Changed default by req of Jon Kalb */
pref("network.proxy.ftp", "");
pref("network.proxy.ftp_port", 0);
pref("network.proxy.gopher", "");
pref("network.proxy.gopher_port", 0);
pref("network.proxy.news", "");
pref("network.proxy.news_port", 0);
pref("network.proxy.http", "");
pref("network.proxy.http_port", 0);
pref("network.proxy.wais", "");
pref("network.proxy.wais_port", 0);
pref("network.proxy.ssl", "");
pref("network.proxy.ssl_port", 0);
pref("network.proxy.no_proxies_on", "");
pref("network.online", true); //online/offline
pref("network.prompt_at_startup", false);//Ask me
pref("network.accept_cookies", 0); // 0 = Always, 1 = warn, 2 = never
pref("network.foreign_cookies", 0); // 0 = Accept, 1 = Don't accept
pref("network.cookie.cookieBehavior", 0); // 0-Accept, 1-dontAcceptForeign, 2-dontUse
pref("network.cookie.warnAboutCookies", false);
pref("network.signon.rememberSignons", true);
pref("network.cookie.filterName", "");
pref("network.sendRefererHeader", true);
pref("network.enablePad", false); // Allow client to do proxy autodiscovery
pref("network.padPacURL", ""); // The proxy autodiscovery url
pref("privacy.warn_no_policy", false); // Warn when submitting to site without policy
pref("messages.new_window", true); // ML obsolete; use mailnews.message_in_thread_window
pref("intl.accept_languages", "en");
pref("intl.mailcharset.cyrillic", "koi8-r");
pref("intl.accept_charsets", "iso-8859-1,*,utf-8");
pref("intl.auto_detect_encoding", true);
pref("intl.character_set", 2); // CS_LATIN1
pref("intl.font_encoding", 6); // CS_MAC_ROMAN
pref("browser.enable_webfonts", true);
pref("browser.use_document_fonts", 2); // 0 = never, 1 = quick, 2 = always
// -- folders (Mac: these are binary aliases.)
localDefPref("browser.download_directory", "");
localDefPref("browser.cache.directory", "");
localDefPref("mail.signature_file", "");
localDefPref("mail.directory", "");
localDefPref("mail.cc_file", "");
localDefPref("news.cc_file", "");
pref("news.fancy_listing", true); // obsolete
localDefPref("browser.cache.wfe.directory", null);
pref("browser.wfe.show_value", 1);
pref("browser.blink_allowed", true);
pref("images.dither", "auto");
pref("images.incremental_display", true);
pref("network.wfe.use_async_dns", true);
pref("network.wfe.tcp_connect_timeout",0);
localDefPref("news.directory", "");
localDefPref("security.directory", "");
pref("autoupdate.enabled", true);
pref("autoupdate.confirm_install", false);
pref("autoupdate.background_download_enabled", true);
pref("autoupdate.background_download_directory", "");
pref("autoupdate.background_download_byte_range", 3000);
pref("autoupdate.background_download_interval", 10000);
pref("autoupdate.unsigned_jar_support", false);
pref("imap.io.mac.logging", false);
pref("browser.editor.disabled", false);
pref("netcaster.containers.count", "2");
pref("netcaster.containers.container1", "-3;'Channel_Finder';'http://netcaster.netscape.com/finder/container/index.html';1440;0");
pref("netcaster.containers.container2", "1,2;'Channels';");
pref("netcaster.channel.count", "0");
pref("netcaster.castanet.count", "0");
pref("netcaster.castanet.acceptCookies", false);
pref("netcaster.castanet.loggingEnabled", true);
pref("netcaster.castanet.profileEnabled", true);
pref("netcaster.admin.startTime", "9");
pref("netcaster.admin.endTime", "17");
pref("netcaster.admin.times", "0");
pref("netcaster.defaultChannel", "netscape_channel");
pref("SpellChecker.DefaultLanguage", 0);
pref("SpellChecker.DefaultDialect", 0);
pref("li.enabled", false);
pref("li.protocol","ldap");
pref("li.client.bookmarks", true);
pref("li.client.cookies", true);
pref("li.client.filters", true);
pref("li.client.addressbook", true);
pref("li.client.globalhistory", true);
pref("li.client.navcntr", true);
pref("li.client.liprefs", true);
pref("li.client.security", true);
pref("li.client.javasecurity", true);
pref("li.client.news", true);
pref("li.client.mail", true);
pref("li.login.name", "");
pref("li.login.password", "");
pref("li.server.http.baseURL", "");
pref("li.server.ldap.url", "");
pref("li.server.ldap.userbase", "");
pref("li.sync.enabled", false);
pref("li.sync.time", 30);
pref("mime.table.allow_add", true);
pref("mime.table.allow_edit", true);
pref("mime.table.allow_remove", true);

View File

@@ -0,0 +1,105 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// Default configuration information for the client
//
config("startup.homepage_override_url","http://home.netscape.com/home/first.html");
config("autoadmin.append_emailaddr",false);
config("autoadmin.failover_to_cached",true);
config("toolbar.logo.url","http://home.netscape.com/");
config("toolbar.logo.win_small_file","");
config("toolbar.logo.win_large_file","");
config("toolbar.logo.frames",-1);
config("toolbar.places.default_url","http://guide.netscape.com");
config("toolbar.places.item_0.label","The Internet");
config("toolbar.places.item_0.url","http://guide.netscape.com");
config("toolbar.places.item_1.label","People");
config("toolbar.places.item_1.url","http://guide.netscape.com/guide/people.html");
config("toolbar.places.item_2.label","Yellow Pages");
config("toolbar.places.item_2.url","http://guide.netscape.com/guide/yellow_pages.html");
config("toolbar.places.item_3.label","What's New");
config("toolbar.places.item_3.url","http://guide.netscape.com/guide/whats_new.html");
config("toolbar.places.item_4.label","What's Cool");
config("toolbar.places.item_4.url","http://guide.netscape.com/guide/whats_cool.html");
config("internal_url.net_search.url","http://home.netscape.com/home/internet-search.html");
config("internal_url.more_info_plugin.url","http://cgi.netscape.com/eng/mozilla/2.0/extensions/info.cgi");
config("internal_url.default_template.url","http://home.netscape.com/home/gold3.0_templates.html");
config("internal_url.page_from_wizard.url", "http://home.netscape.com/home/gold4.0_wizard.html");
config("menu.places.item_0.label","The &Internet");
config("menu.places.item_0.url","http://guide.netscape.com");
config("menu.places.item_1.label","&People");
config("menu.places.item_1.url","http://guide.netscape.com/guide/people.html");
config("menu.places.item_2.label","&Yellow Pages");
config("menu.places.item_2.url","http://guide.netscape.com/guide/yellow_pages.html");
config("menu.places.item_3.label","What's &New");
config("menu.places.item_3.url","http://guide.netscape.com/guide/whats_new.html");
config("menu.places.item_4.label","What's &Cool");
config("menu.places.item_4.url","http://guide.netscape.com/guide/whats_cool.html");
config("menu.help.item_0.label","&Help Contents");
config("menu.help.item_0.url","nethelp:netscape/home:start_here");
config("menu.help.item_1.label","&Release Notes");
config("menu.help.item_1.url","http://home.netscape.com/eng/mozilla/4.0/relnotes/windows-4.02.html");
config("menu.help.item_2.label","&Product Information and Support");
config("menu.help.item_2.url","http://home.netscape.com/menu/prodsupp/client/");
config("menu.help.item_3.label","-");
config("menu.help.item_4.label","&Software Updates");
config("menu.help.item_4.url","http://home.netscape.com/home/update.html");
config("menu.help.item_5.label","Register No&w");
config("menu.help.item_5.url","http://home.netscape.com/home/register.html");
config("menu.help.item_6.label","&Member Services");
config("menu.help.item_6.url","http://home.netscape.com/home/services.html");
config("menu.help.item_7.label","-");
config("menu.help.item_8.label","&International Users");
config("menu.help.item_8.url","http://home.netscape.com/menu/intl/");
config("menu.help.item_9.label","S&ecurity");
config("menu.help.item_9.url","http://home.netscape.com/info/security-doc.html");
config("menu.help.item_10.label","Net Etiq&uette");
config("menu.help.item_10.url","http://home.netscape.com/menu/netet/");
config("menu.help.item_11.label","-");
config("menu.help.item_12.label","Abou&t Plug-ins");
config("menu.help.item_12.url","about:plugins");
config("menu.help.item_13.label","About Font &Displayers");
config("menu.help.item_13.url","about:fonts");
config("personal_toolbar.item_0.label","Internet");
config("personal_toolbar.item_0.url","http://guide.netscape.com/?t");
config("personal_toolbar.item_1.label","Lookup");
config("personal_toolbar.item_1.url","FOLDER");
config("personal_toolbar.item_1.item_0.label","People");
config("personal_toolbar.item_1.item_0.url","http://guide.netscape.com/guide/people.html?t");
config("personal_toolbar.item_1.item_1.label","Yellow Pages");
config("personal_toolbar.item_1.item_1.url","http://guide.netscape.com/guide/yellow_pages.html?t");
config("personal_toolbar.item_2.label","New&Cool");
config("personal_toolbar.item_2.url","FOLDER");
config("personal_toolbar.item_2.item_0.label","What's New");
config("personal_toolbar.item_2.item_0.url","http://guide.netscape.com/guide/whats_new.html?t");
config("personal_toolbar.item_2.item_1.label","What's Cool");
config("personal_toolbar.item_2.item_1.url","http://guide.netscape.com/guide/whats_cool.html?t");
config("personal_toolbar.CreateNewToolbar", false);
config("personal_toolbar.NewToolbarFolderName", "");
config("personal_toolbar.ToolbarFolderVersion", "");

View File

@@ -0,0 +1,101 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// Default configuration information for the client
//
// config("startup.homepage_override_url","http://home.netscape.com/home/first.html");
config("autoadmin.append_emailaddr",false);
config("autoadmin.failover_to_cached",true);
config("toolbar.logo.url","http://home.netscape.com/");
config("toolbar.logo.win_small_file","");
config("toolbar.logo.win_large_file","");
config("toolbar.logo.frames",-1);
config("toolbar.places.default_url","http://guide.netscape.com");
config("toolbar.places.item_0.label","The Internet");
config("toolbar.places.item_0.url","http://guide.netscape.com");
config("toolbar.places.item_1.label","People");
config("toolbar.places.item_1.url","http://guide.netscape.com/guide/people.html");
config("toolbar.places.item_2.label","Yellow Pages");
config("toolbar.places.item_2.url","http://guide.netscape.com/guide/yellow_pages.html");
config("toolbar.places.item_3.label","What's New");
config("toolbar.places.item_3.url","http://guide.netscape.com/guide/whats_new.html");
config("toolbar.places.item_4.label","What's Cool");
config("toolbar.places.item_4.url","http://guide.netscape.com/guide/whats_cool.html");
config("internal_url.net_search.url","http://home.netscape.com/home/internet-search.html");
config("internal_url.more_info_plugin.url","http://cgi.netscape.com/eng/mozilla/2.0/extensions/info.cgi");
config("internal_url.default_template.url","http://home.netscape.com/home/gold3.0_templates.html");
config("internal_url.page_from_wizard.url", "http://home.netscape.com/home/gold4.0_wizard.html");
config("menu.places.item_0.label","The &Internet");
config("menu.places.item_0.url","http://guide.netscape.com");
config("menu.places.item_1.label","&People");
config("menu.places.item_1.url","http://guide.netscape.com/guide/people.html");
config("menu.places.item_2.label","&Yellow Pages");
config("menu.places.item_2.url","http://guide.netscape.com/guide/yellow_pages.html");
config("menu.places.item_3.label","What's &New");
config("menu.places.item_3.url","http://guide.netscape.com/guide/whats_new.html");
config("menu.places.item_4.label","What's &Cool");
config("menu.places.item_4.url","http://guide.netscape.com/guide/whats_cool.html");
config("menu.help.item_0.label","&Help Contents");
config("menu.help.item_0.url","nethelp:netscape/home:start_here");
config("menu.help.item_1.label","&Release Notes");
config("menu.help.item_1.url","http://home.netscape.com/eng/mozilla/4.0/relnotes/windows-nav-4.0.html");
config("menu.help.item_2.label","&Product Information and Support");
config("menu.help.item_2.url","http://home.netscape.com/menu/prodsupp/client/");
config("menu.help.item_3.label","-");
config("menu.help.item_4.label","&Software Updates");
config("menu.help.item_4.url","http://home.netscape.com/home/update.html");
config("menu.help.item_5.label","Register No&w");
config("menu.help.item_5.url","http://home.netscape.com/home/register.html");
config("menu.help.item_6.label","&Member Services");
config("menu.help.item_6.url","http://home.netscape.com/home/services.html");
config("menu.help.item_7.label","-");
config("menu.help.item_8.label","&International Users");
config("menu.help.item_8.url","http://home.netscape.com/menu/intl/");
config("menu.help.item_9.label","S&ecurity");
config("menu.help.item_9.url","http://home.netscape.com/info/security-doc.html");
config("menu.help.item_10.label","-");
config("menu.help.item_11.label","Abou&t Plug-ins");
config("menu.help.item_11.url","about:plugins");
config("menu.help.item_12.label","About Font &Displayers");
config("menu.help.item_12.url","about:fonts");
config("personal_toolbar.item_0.label","Internet");
config("personal_toolbar.item_0.url","http://guide.netscape.com/?t");
config("personal_toolbar.item_1.label","Lookup");
config("personal_toolbar.item_1.url","FOLDER");
config("personal_toolbar.item_1.item_0.label","People");
config("personal_toolbar.item_1.item_0.url","http://guide.netscape.com/guide/people.html?t");
config("personal_toolbar.item_1.item_1.label","Yellow Pages");
config("personal_toolbar.item_1.item_1.url","http://guide.netscape.com/guide/yellow_pages.html?t");
config("personal_toolbar.item_2.label","New&Cool");
config("personal_toolbar.item_2.url","FOLDER");
config("personal_toolbar.item_2.item_0.label","What's New");
config("personal_toolbar.item_2.item_0.url","http://guide.netscape.com/guide/whats_new.html?t");
config("personal_toolbar.item_2.item_1.label","What's Cool");
config("personal_toolbar.item_2.item_1.url","http://guide.netscape.com/guide/whats_cool.html?t");
config("personal_toolbar.CreateNewToolbar", false);
config("personal_toolbar.NewToolbarFolderName", "");
config("personal_toolbar.ToolbarFolderVersion", "");

View File

@@ -0,0 +1,169 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
pref("editor.html_editor", "");
pref("editor.image_editor", "");
pref("editor.author", "");
pref("editor.auto_save_delay", 10); // minutes
pref("editor.html_editor", "");
pref("editor.image_editor", "");
pref("editor.fontsize_mode", 0);
pref("editor.template_location", "http://home.netscape.com/home/gold3.0_templates.html");
pref("editor.default_template_location", "http://home.netscape.com/home/gold3.0_templates.html");
pref("editor.template_last_loc", "");
pref("editor.template_history_0", "");
pref("editor.template_history_1", "");
pref("editor.template_history_2", "");
pref("editor.template_history_3", "");
pref("editor.template_history_4", "");
pref("editor.template_history_5", "");
pref("editor.template_history_6", "");
pref("editor.template_history_7", "");
pref("editor.template_history_8", "");
pref("editor.template_history_9", "");
pref("editor.template_history_10", "");
pref("editor.template_history_11", "");
pref("editor.template_history_12", "");
pref("editor.template_history_13", "");
pref("editor.template_history_14", "");
pref("editor.template_history_15", "");
pref("editor.template_history_16", "");
pref("editor.template_history_17", "");
pref("editor.template_history_18", "");
pref("editor.template_history_19", "");
pref("editor.url_history.TITLE_0", "");
pref("editor.url_history.TITLE_1", "");
pref("editor.url_history.TITLE_2", "");
pref("editor.url_history.TITLE_3", "");
pref("editor.url_history.TITLE_4", "");
pref("editor.url_history.TITLE_5", "");
pref("editor.url_history.TITLE_6", "");
pref("editor.url_history.TITLE_7", "");
pref("editor.url_history.TITLE_8", "");
pref("editor.url_history.TITLE_9", "");
pref("editor.url_history.URL_0", "");
pref("editor.url_history.URL_1", "");
pref("editor.url_history.URL_2", "");
pref("editor.url_history.URL_3", "");
pref("editor.url_history.URL_4", "");
pref("editor.url_history.URL_5", "");
pref("editor.url_history.URL_6", "");
pref("editor.url_history.URL_7", "");
pref("editor.url_history.URL_8", "");
pref("editor.url_history.URL_9", "");
localDefPref("editor.html_directory", "C:\\My Documents");
localDefPref("editor.image_directory", "C:\\My Documents");
localDefPref("editor.background_image", "");
pref("editor.last_pref_page", 0);
pref("editor.last_text_page", 0);
pref("editor.last_doc_page", 0);
pref("editor.last_table_page", 0);
pref("editor.use_custom_colors", false);
pref("editor.use_background_image", true);
pref("editor.publish_keep_links", true);
pref("editor.publish_keep_images", true);
pref("editor.show_copyright", true);
pref("editor.show_character_toolbar", true);
pref("editor.show_paragraph_toolbar", true);
pref("editor.text_color", "#000000");
pref("editor.link_color", "#0000FF");
pref("editor.active_link_color", "#000088");
pref("editor.followed_link_color", "#FF0000");
pref("editor.background_color", "#FFFFFF");
pref("editor.auto_save", false);
pref("editor.javascript_color", "#FF0000");
pref("editor.color_scheme", "Netscape Default Colors");
pref("editor.hints.bookmark", true);
pref("editor.hints.image", true);
pref("editor.hints.sitemanager", true);
pref("editor.hints.copyright", true);
pref("editor.hints.removelinks", true);
localDefPref("editor.hrule.height", 2);
localDefPref("editor.hrule.width", 100);
pref("editor.hrule.width_percent", true);
pref("editor.hrule.shading", true);
pref("editor.hrule.align", 0); // match types in edttypes.h ED_ALIGN_CENTER
pref("editor.publish_username", "");
pref("editor.publish_password", "");
pref("editor.publish_save_password", false);
pref("editor.publish_location", "");
pref("editor.publish_browse_location", "");
pref("editor.publish_last_loc", "");
pref("editor.publish_last_pass", "");
pref("editor.publish_history_0", "");
pref("editor.publish_history_1", "");
pref("editor.publish_history_2", "");
pref("editor.publish_history_3", "");
pref("editor.publish_history_4", "");
pref("editor.publish_history_5", "");
pref("editor.publish_history_6", "");
pref("editor.publish_history_7", "");
pref("editor.publish_history_8", "");
pref("editor.publish_history_9", "");
pref("editor.publish_history_10", "");
pref("editor.publish_history_11", "");
pref("editor.publish_history_12", "");
pref("editor.publish_history_13", "");
pref("editor.publish_history_14", "");
pref("editor.publish_history_15", "");
pref("editor.publish_history_16", "");
pref("editor.publish_history_17", "");
pref("editor.publish_history_18", "");
pref("editor.publish_history_19", "");
pref("editor.publish_password_0", "");
pref("editor.publish_password_1", "");
pref("editor.publish_password_2", "");
pref("editor.publish_password_3", "");
pref("editor.publish_password_4", "");
pref("editor.publish_password_5", "");
pref("editor.publish_password_6", "");
pref("editor.publish_password_7", "");
pref("editor.publish_password_8", "");
pref("editor.publish_password_9", "");
pref("editor.publish_password_10", "");
pref("editor.publish_password_11", "");
pref("editor.publish_password_12", "");
pref("editor.publish_password_13", "");
pref("editor.publish_password_14", "");
pref("editor.publish_password_15", "");
pref("editor.publish_password_16", "");
pref("editor.publish_password_17", "");
pref("editor.publish_password_18", "");
pref("editor.publish_password_19", "");
pref("editor.custom_color_0", "0,0,0");
pref("editor.custom_color_1", "99,0,0");
pref("editor.custom_color_2", "CC,0,0");
pref("editor.custom_color_3", "FF,0,0");
pref("editor.custom_color_4", "0,99,0");
pref("editor.custom_color_5", "0,CC,0");
pref("editor.custom_color_6", "0,FF,0");
pref("editor.custom_color_7", "0,0,99");
pref("editor.custom_color_8", "0,0,CC");
pref("editor.custom_color_9", "0,0,FF");
pref("editor.last_color_picked", "0,0,0");
pref("editor.last_background_color_picked", "255,255,255");
pref("editor.new_cell_has_space", true);

View File

@@ -0,0 +1,266 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// Added by mwelch 97 Feb
pref("news.show_pretty_names", false);
pref("mail.wrap_long_lines", false);
pref("news.wrap_long_lines", false);
pref("mail.inline_attachments", true);
// Mail server preferences, pop by default
pref("mail.server_type", 0); // 0 pop, 1 imap,
// (Unix only:)
// 2 movemail, 3 inbox
pref("mail.auth_login", true);
pref("mail.use_drafts", true);
pref("mail.default_drafts", ""); // empty string use default Drafts name;
pref("mail.use_templates", true);
pref("mail.default_templates", ""); // empty string use default Templates name
pref("mail.use_x_sender", false);
pref("mail.imap.local_copies", false);
pref("mail.imap.cache_fetch_responses", true);
pref("mail.imap.server_sub_directory", "");
pref("mail.imap.delete_is_move_to_trash", false);
pref("mail.imap.server_ssl", false);
pref("mail.imap.ssl_port", 993);
pref("mail.imap.hard.mailbox.depth", 0);
pref("mail.imap.max_cached_connections", 10);
pref("mail.imap.fetch_by_chunks", true);
pref("mail.imap.auto_subscribe_on_open", true);
pref("mail.imap.chunk_size", 10240);
pref("mail.imap.min_chunk_size_threshold", 15360);
pref("mail.imap.max_chunk_size", 40960);
pref("mail.imap.chunk_fast", 2);
pref("mail.imap.chunk_ideal", 4);
pref("mail.imap.chunk_add", 2048);
pref("mail.imap.auto_subscribe", true);
pref("mail.imap.auto_unsubscrube", true);
pref("mail.imap.new_mail_get_headers", true);
pref("mail.imap.strip_personal_namespace", true);
pref("mail.imap.upgrade.leave_subscriptions_alone", false);
pref("mail.imap.upgrade.auto_subscribe_to_all", false);
pref("mail.imap.auto_unsubscribe_from_noselect_folders", true);
pref("mail.imap.allow_multiple_folder_connections", false);
pref("mail.imap.cleanup_inbox_on_exit", false);
pref("mail.imap.mime_parts_on_demand", false);
pref("mail.imap.mime_parts_on_demand_threshold", 15000);
pref("mail.imap.optimize_header_dl", false);
pref("mail.use_altmail", false);
pref("mail.altmail_dll", "postal32.dll");
pref("mail.use_altmail_for_news", true);
pref("mail.thread_mail", false);
pref("mail.sort_mail", false);
pref("mail.ascend_mail", false);
pref("mail.leave_on_server", false);
pref("mail.default_cc", "");
pref("mail.default_fcc", ""); // maibox:URL or Imap://Host/OnLineFolderName
pref("mail.check_new_mail", false);
pref("mail.pop3_gets_new_mail", false);
pref("mail.check_time", 10);
pref("mail.pop_name", "");
pref("mail.remember_password", false);
pref("mail.support_skey", false);
pref("mail.pop_password", "");
pref("mail.auto_quote", true);
pref("mail.fixed_width_messages", true);
pref("mail.quoted_style", 2); // 0=plain, 1=bold, 2=italic, 3=bolditalic
pref("mail.quoted_size", 0); // 0=normal, 1=bigger, 2=smaller
pref("mail.citation_color", "#000000"); // quoted color
pref("mail.identity.organization", "");
pref("mail.identity.reply_to", "");
pref("mail.identity.username", "");
pref("mail.identity.useremail", "");
pref("mail.identity.defaultdomain", "");
pref("mail.use_fcc", true);
pref("mail.cc_self", false);
pref("mail.limit_message_size", false);
pref("mail.max_size", 50); // download message size limit
pref("mail.deliver_immediately", true);
pref("mail.strictly_mime", false);
pref("mail.strictly_mime_headers", true);
pref("mail.file_attach_binary", false);
pref("mail.use_signature_file", false);
pref("mail.show_headers", 1); // some
pref("mail.pane_config", 0);
pref("mail.sort_by", 1); // by date
localDefPref("mail.window_rect", "-1,-1,-1,-1");
localDefPref("mail.compose_window_rect", "-1,-1,-1,-1");
pref("mail.addr_book.ldap.disabled", false);
localDefPref("mail.addr_book_window_rect", "-1,-1,-1,-1");
pref("mail.wfe.addr_book.show_value", 0);
pref("mail.addr_book.lastnamefirst", false);
pref("mail.addr_book.sortby", 2);
pref("mail.addr_book.sort_ascending", true);
localDefPref("mail.addr_book.name.width", 0);
localDefPref("mail.addr_book.email.width", 0);
localDefPref("mail.addr_book.nickname.width", 0);
localDefPref("mail.addr_book.locality.width", 0);
localDefPref("mail.addr_book.company.width", 0);
localDefPref("mail.addr_book.type.pos", -1);
localDefPref("mail.addr_book.name.pos", -1);
localDefPref("mail.addr_book.email.pos", -1);
localDefPref("mail.addr_book.nickname.pos", -1);
localDefPref("mail.addr_book.locality.pos", -1);
localDefPref("mail.addr_book.company.pos", -1);
pref("mail.attach_vcard", false);
pref("mail.html_compose", true);
pref("mail.htmldomains", "netscape.com,mcom.com");
pref("mail.play_sound", true);
pref("mail.send_html", true);
pref("mail.directory_names.first_first", true);
pref("mail.attach_address_card", false);
localDefPref("mail.fcc_folder", "");
pref("mail.purge_threshhold", 100);
pref("mail.prompt_purge_threshhold", false); //Ask about compacting folders
pref("mail.encrypt_outgoing_mail", false);
pref("mail.crypto_sign_outgoing_mail", false);
pref("mail.crypto_sign_outgoing_news", false);
pref("mail.warn_forward_encrypted", true); // forward encrypted message to another warning
pref("mail.warn_reply_unencrypted", true); // clear reply to encrypted message warning
pref("mail.use_mapi_server", false);
pref("mail.match_nickname", false);
pref("mail.default_html_action", 0); // 0=ask, 1=plain, 2=html, 3=both
pref("mail.selection.count",0); //default - 0 mail folders selected for download
pref("mail.smtp.ssl", 0); // 0 = no, 1 = try, 2 = must use SSL
pref("mail.allow_at_sign_in_user_name", false); //strip off chars following the @ sign in mail user name
pref("mail.mdn.report.enabled", false); // enable sending MDN report
// no denial mdns for not_in_to_cc, forward and outside_domain cases
// this could eliminate potential mail traffics
pref("mail.mdn.report.not_in_to_cc", 0); // 0: Never 1: Always 2: Ask me
pref("mail.mdn.report.outside_domain", 2); // 0: Never 1: Always 2: Ask me
pref("mail.mdn.report.other", 2); // 0: Never 1: Always 2: Ask me 3: Denial
pref("mail.incorporate.return_receipt", 1); // 0: inbox/filter 1: Sent folder
pref("mail.request.return_receipt", 2); // 1: DSN 2: MDN 3: Both
pref("mail.receipt.request_header_type", 0); // 0: MDN-DNT header 1: RRT header 2: Both (MC)
pref("news.enabled", true);
pref("news.default_cc", "");
pref("news.default_fcc", ""); // mailbox:URL or Imap://Host/OnlineFolderName
pref("news.thread_news", true);
pref("news.use_fcc", true);
pref("news.cc_self", false);
pref("news.show_headers", 2); // some
pref("news.pane_config", 0);
pref("news.sort_by", 1); // by date
localDefPref("news.window_rect", "-1,-1,-1,-1");
pref("news.fcc_folder", "");
pref("news.notify.on", true);
pref("news.notify.size", 1000);
pref("news.max_articles", 500);
pref("news.mark_old_read", false);
pref("news.server_is_secure", false);
pref("news.server_port", 119); //default non-secure port number
localDefPref("news.subscribe.name_width", -1); // Subscribe UI cols width
localDefPref("news.subscribe.join_width", -1);
localDefPref("news.subscribe.post_width", -1);
localDefPref("news.subscribe.name_pos", 0); // Subscribe UI cols pos
localDefPref("news.subscribe.join_pos", 1);
localDefPref("news.subscribe.post_pos", 2);
// the next pref's value is irrelevant; it gets tweaked when back end needs to be called
// regarding any change to network.hosts.nntp_server, news.server_port,
// and/or news.server_is_secure.
pref("news.server_change_xaction", 0);
pref("news.send.fake_sender", "");
pref("mailnews.profile_age", 0);
pref("mailnews.profile_age.default_install", 13);
localDefPref("mailnews.folder_window_rect", "-1,-1,-1,-1");
localDefPref("mailnews.thread_window_rect", "-1,-1,-1,-1");
localDefPref("mailnews.message_window_rect", "-1,-1,-1,-1");
localDefPref("mailnews.thread_pane_height", -1);
localDefPref("mailnews.category_pane_width", -1);
pref("mailnews.reuse_thread_window", true);
pref("mailnews.reuse_message_window", true);
pref("mailnews.message_in_thread_window", true);
pref("mailnews.javascript_enabled", true);
pref("mailnews.wraplength", 72);
pref("mailnews.nicknames_only", false);
pref("mailnews.nav_crosses_folders", 1); // 0=do it, don't prompt 1=prompt, 2=don't do it, don't prompt
pref("mailnews.reply_on_top", 1); // 0=bottom 1=top 2=select+bottom 3=select+top
pref("mailnews.reply_with_extra_lines", 2);
pref("mailnews.force_ascii_search", true);
pref("mailnews.autolookup_unknown_mime_types", true);
pref("mailnews.customHeaders", "");
pref("mailnews.searchSubFolders", true);
pref("mailnews.searchServer", true);
pref("mailnews.sort_by_date_received", false);
pref("offline.startup_mode", 0); // 0 online work, 1 offline work, 2 ask me
pref("offline.download.size_limit", 50); // K
pref("offline.news.download.unread_only", true);
pref("offline.news.download.by_date", true);
pref("offline.news.download.use_days", false);
pref("offline.news.download.days", 30); // days
pref("offline.news.download.increments", 3); // 0-yesterday, 1-1 wk ago, 2-2 wk ago,
// 3-1 month ago, 4-6 month ago, 5-1 year ago
pref("offline.news.discussions_count", 0); // select discussion count
pref("offline.download_discussions", true); //default for offline usage is TRUE
pref("offline.download_mail", true); //default for offline usage is TRUE
pref("offline.download_messages", true); //default for offline usage is TRUE
pref("offline.download_directories", true); //default for offline usage is TRUE
pref("news.keep.method", 0); // 0 = all, 1 = by age, 2 = by message count
pref("news.keep.days", 30); // days
pref("news.keep.count", 30); //keep x newest messages
pref("news.keep.only_unread", false);
pref("news.remove_bodies.by_age", false);
pref("news.remove_bodies.days", 20);
pref("ldap_1.autoComplete.interval", 1250);
pref("ldap_1.autoComplete.useAddressBooks", true);
pref("ldap_1.autoComplete.useDirectory", false);
pref("ldap_1.autoComplete.showDialogForMultipleMatches", true);
pref("ldap_1.autoComplete.skipDirectoryIfLocalMatchFound", false);
pref("ldap_1.number_of_directories", 6);
pref("ldap_1.directory1.description", "Personal Address Book");
pref("ldap_1.directory1.dirType", 2);
pref("ldap_1.directory1.isOffline", false);
pref("ldap_1.directory2.description", "Four11 Directory");
pref("ldap_1.directory2.serverName", "ldap.four11.com");
pref("ldap_1.directory3.description", "InfoSpace Directory");
pref("ldap_1.directory3.serverName", "ldap.infospace.com");
pref("ldap_1.directory4.description", "WhoWhere Directory");
pref("ldap_1.directory4.serverName", "ldap.whowhere.com");
pref("ldap_1.directory5.description", "Bigfoot Directory");
pref("ldap_1.directory5.serverName", "ldap.bigfoot.com");
pref("ldap_1.directory6.description", "Switchboard Directory");
pref("ldap_1.directory6.serverName", "ldap.switchboard.com");
pref("ldap_1.directory6.searchBase", "c=US");
pref("ldap_1.directory6.attributes.telephoneNumber", "Phone Number:homephone");
pref("ldap_1.directory6.attributes.street", "State:st");
pref("ldap_1.directory6.filter1.repeatFilterForWords", false);
pref("ldapList.version", 0);

View File

@@ -0,0 +1 @@
66'9k'?:'<@'7:'h;'jj'7:'8m'=;':h'j@'@7'?i'=9'm<'jh

View File

@@ -0,0 +1,109 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
pref("security.ask_for_fortezza", 0);
pref("security.ask_for_password", 0);
pref("security.ciphers", "");
pref("security.default_mail_cert", "");
pref("security.default_personal_cert", "");
pref("security.email_as_ftp_password", false);
pref("security.enable_java", true);
pref("security.lower_java_network_security_by_trusting_proxies", false);
pref("security.enable_ssl2", true);
pref("security.enable_ssl3", true);
pref("security.fortezza_lifetime", 30);
pref("security.password_lifetime", 30);
pref("security.submit_email_forms", true);
pref("security.use_password", true);
pref("security.warn_accept_cookie", false); // ML obsolete
pref("security.warn_entering_secure", true);
pref("security.warn_leaving_secure", true);
pref("security.warn_submit_insecure", true);
pref("security.warn_viewing_mixed", true);
pref("security.ssl2.des_ede3_192", true); // Domestic
pref("security.ssl2.des_64", true); // Domestic
pref("security.ssl2.rc2_128", true); // Domestic
pref("security.ssl2.rc2_40", true); // Export
pref("security.ssl2.rc4_40", true); // Export
pref("security.ssl2.rc4_128", true); // Domestic
pref("security.ssl3.fortezza_fortezza_sha", true); // Fortezza
pref("security.ssl3.fortezza_null_sha", false); // Fortezza
pref("security.ssl3.fortezza_rc4_sha", true); // Fortezza
pref("security.ssl3.rsa_des_ede3_sha", true); // Domestic
pref("security.ssl3.rsa_des_sha", true); // Domestic
pref("security.ssl3.rsa_null_md5", false); // Export
pref("security.ssl3.rsa_rc2_40_md5", true); // Export
pref("security.ssl3.rsa_rc4_40_md5", true); // Export
pref("security.ssl3.rsa_rc4_128_md5", true); // Domestic
pref("security.ssl3.rsa_fips_des_ede3_sha", true); // Domestic
pref("security.ssl3.rsa_fips_des_sha", true); // Domestic
pref("security.smime.des_ede3", true); // Domestic
pref("security.smime.des", true); // Domestic
pref("security.smime.rc2_40", true); // Export
pref("security.smime.rc2_64", true); // Domestic
pref("security.smime.rc2_128", true); // Domestic
pref("security.smime.rc5.b64r16k40", true);
pref("security.smime.rc5.b64r16k64", true);
pref("security.smime.rc5.b64r16k128", true);
pref("security.smime.fortezza", true); // Fortezza
pref("security.canotices.VeriSignInc.notice1",
"This certificate incorporates the VeriSign Certification Practice Statement "+
"(CPS) by reference. Use of this certificate is governed by the CPS.\n\n"+
"The CPS is available in the VeriSign repository at "+
"https://www.verisign.com/repository/CPS and "+
"ftp://ftp.verisign.com/repository/CPS; by E-mail at "+
"CPS-requests@verisign.com; and by mail at VeriSign, Inc., 2593 Coast Ave., "+
"Mountain View, CA 94043 USA, Attn: Certification Services.\n\n"+
"THE CPS DISCLAIMS AND LIMITS CERTAIN LIABILITIES, INCLUDING CONSEQUENTIAL "+
"AND PUNITIVE DAMAGES. THE CPS ALSO INCLUDES CAPS ON LIABILITY RELATED TO "+
"THIS CERTIFICATE. SEE THE CPS FOR DETAILS.\n\n"+
"The CPS and this certificate are copyrighted: Copyright (c) 1997 VeriSign, "+
"Inc. All Rights Reserved.");
pref("security.canotices.VeriSignInc.notice2",
"The subject name (i.e., user name) in this VeriSign Class 1 "+
"certificate contains nonverified subscriber information.");
pref("security.canotices.VeriSignInc.notice3",
"This certificate incorporates by reference, and its use is strictly subject "+
"to, the VeriSign Certification Practice Statement (CPS), available in the "+
"VeriSign repository at: https://www.verisign.co.jp; by E-mail at "+
"CPS-requests@verisign.co.jp; or by mail at VeriSign Japan K.K, 580-16 "+
"Horikawacho, Saiwai-ku, Kawasaki 210 Japan\n\n"+
"Copyright (c)1996, 1997 VeriSign, Inc. All Rights Reserved. CERTAIN "+
"WARRANTIES DISCLAIMED AND LIABILITY LIMITED.\n\n"+
"WARNING: THE USE OF THIS CERTIFICATE IS STRICTLY SUBJECT TO THE VERISIGN "+
"CERTIFICATION PRACTICE STATEMENT. THE ISSUING AUTHORITY DISCLAIMS CERTAIN "+
"IMPLIED AND EXPRESS WARRANTIES, INCLUDING WARRANTIES OF MERCHANTABILITY OR "+
"FITNESS FOR A PARTICULAR PURPOSE, AND WILL NOT BE LIABLE FOR CONSEQUENTIAL, "+
"PUNITIVE, AND CERTAIN OTHER DAMAGES. SEE THE CPS FOR DETAILS.\n\n"+
"Contents of the VeriSign registered nonverifiedSubjectAttributes extension "+
"value shall not be considered as accurate information validated by the IA.");
pref("signed.applets.DefaultTo30Security", false);
pref("signed.applets.securityIsOn", true);
pref("signed.applets.codebase_principal_support", true);
pref("signed.applets.local_classes_have_30_powers", false);
pref("signed.applets.capabilitiesDB.lock_to_current", false);
pref("signed.applets.low_security_for_local_classes", false);
pref("signed.applets.simulate_signatures_on_system_classes", true);
pref("signed.applets.verbose_security_exception", false);

View File

@@ -0,0 +1,96 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// Style note 3/3:
// internal objects & functions are in under_score form.
// public functions are in interCaps.
// Remove this -- but called in winpref.js :
// platform.windows = true;
function plat() {
this.windows=false;
this.mac=false;
this.unix=false;
};
platform = new plat();
/* --- Preference initialization functions ---
Moved to native functions:
pref -> pref_NativeDefaultPref
defaultPref -> "
userPref -> pref_NativeUserPref
lockPref -> pref_NativeLockPref
unlockPref -> pref_NativeUnlockPref
getPref -> pref_NativeGetPref
config -> pref_NativeDefaultPref (?)
*/
// stubs for compatability
var default_pref = defaultPref;
var lock_pref = lockPref;
var unlock_pref = unlockPref;
var userPref = user_pref;
// -------------------------
function mime_type(root, mimetype, extension, load_action, appname, appsig, filetype)
{
// changed for prefbert
pref(root + ".mimetype", mimetype);
pref(root + ".extension", extension);
pref(root + ".load_action", load_action);
pref(root + ".mac_appname", appname);
pref(root + ".mac_appsig", appsig);
pref(root + ".mac_filetype", filetype);
pref(root + ".description", "");
pref(root + ".latent_plug_in", false);
}
// LDAP
// Searches for "key=value" in the given string and returns value.
function getLDAPValue(str, key)
{
if (str == null || key == null)
return null;
var search_key = "\n" + key + "=";
var start_pos = str.indexOf(search_key);
if (start_pos == -1)
return null;
start_pos += search_key.length;
var end_pos = str.indexOf("\n", start_pos);
if (end_pos == -1)
end_pos = str.length;
return str.substring(start_pos, end_pos);
}
function begin_mime_def()
{
}
function end_mime_def()
{
var now = new Date();
pref("mime.types.all_defined", now.toString());
}

View File

@@ -0,0 +1,163 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "xp_core.h"
#include "prefapi.h"
#include "jsapi.h"
#include "prlink.h"
#include "ufilemgr.h"
#include "uprefd.h"
#include "LString.h"
#include <Types.h>
#include <Resources.h>
#include <Memory.h>
/*
* Mac-specific libpref routines
*/
extern "C" {
JSBool pref_InitInitialObjects();
}
Boolean pref_FindAutoAdminLib(FSSpec& spec);
static JSBool pref_ReadResource(short id)
{
JSBool ok = JS_FALSE;
Handle data;
UInt32 datasize;
data = GetResource('TEXT', id);
if (data) {
DetachResource( data );
HNoPurge( data );
MoveHHi( data );
datasize = GetHandleSize(data);
HLock(data);
ok = (JSBool) PREF_QuietEvaluateJSBuffer((char*) *data, datasize);
HUnlock(data);
DisposeHandle(data);
}
return ok;
}
/*
* Initialize default preference JavaScript buffers from
* appropriate TEXT resources
*/
JSBool pref_InitInitialObjects()
{
JSBool ok = pref_ReadResource(3000); // initprefs
if (ok)
ok = pref_ReadResource(3010); // all.js
if (ok)
ok = pref_ReadResource(3016); // mailnews.js
if (ok)
ok = pref_ReadResource(3017); // editor.js
if (ok)
ok = pref_ReadResource(3018); // security.js
if (ok)
ok = pref_ReadResource(3011); // config.js
if (ok)
ok = pref_ReadResource(3015); // macprefs.js
return ok;
}
/*
* Convert between cross-platform file/folder pathname strings
* and Mac aliases flattened into binary strings
*/
PR_IMPLEMENT(int)
PREF_CopyPathPref(const char *pref_name, char ** return_buffer)
{
int dirSize, result;
AliasHandle aliasH = NULL;
char *dirAliasBuf = NULL;
OSErr err;
FSSpec fileSpec;
Boolean changed;
result = PREF_CopyBinaryPref(pref_name, &dirAliasBuf, &dirSize);
if (result != PREF_NOERROR)
return result;
// Cast to an alias record and resolve.
err = PtrToHand(dirAliasBuf, &(Handle) aliasH, dirSize);
free(dirAliasBuf);
if (err != noErr)
return PREF_ERROR; // not enough memory?
err = ::ResolveAlias(NULL, aliasH, &fileSpec, &changed);
DisposeHandle((Handle) aliasH);
if (err != noErr)
return PREF_ERROR; // bad alias
*return_buffer = CFileMgr::EncodedPathNameFromFSSpec(fileSpec, TRUE);
return PREF_NOERROR;
}
PR_IMPLEMENT(int)
PREF_SetPathPref(const char *pref_name, const char *path, PRBool set_default)
{
FSSpec fileSpec;
AliasHandle aliasH;
OSErr err = CFileMgr::FSSpecFromLocalUnixPath(path, &fileSpec);
if (err != noErr)
return PREF_ERROR;
err = NewAlias(nil, &fileSpec, &aliasH);
if (err != noErr)
return PREF_ERROR;
int result;
Size bytes = GetHandleSize((Handle) aliasH);
HLock((Handle) aliasH);
if (set_default)
result = PREF_SetDefaultBinaryPref(pref_name, *aliasH, bytes);
else
result = PREF_SetBinaryPref(pref_name, *aliasH, bytes);
DisposeHandle((Handle) aliasH);
return result;
}
/* Looks for AutoAdminLib in Essential Files and returns FSSpec */
Boolean
pref_FindAutoAdminLib(FSSpec& spec)
{
spec = CPrefs::GetFilePrototype(CPrefs::RequiredGutsFolder);
LString::CopyPStr("\pAutoAdminLib", spec.name, 32);
if (!CFileMgr::FileExists(spec))
LString::CopyPStr("\pAutoAdminPPCLib", spec.name, 32);
return CFileMgr::FileExists(spec);
}
PR_IMPLEMENT(PRBool)
PREF_IsAutoAdminEnabled()
{
FSSpec spec;
return (XP_Bool) pref_FindAutoAdminLib(spec);
}

View File

@@ -0,0 +1,47 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "Types.r"
/* When editing this file, make sure to match your changes on macpref.cp */
read 'TEXT' ( 3000, "initprefs", purgeable ) "initpref.js";
read 'TEXT' ( 3010, "allprefs", purgeable ) "all.js";
read 'TEXT' ( 3016, "mailnews.js", purgeable ) "mailnews.js";
read 'TEXT' ( 3017, "editor.js", purgeable ) "editor.js";
read 'TEXT' ( 3018, "security.js", purgeable ) "security.js";
#if defined(MOZ_MAIL_NEWS) || defined (EDITOR)
read 'TEXT' ( 3011, "config", purgeable ) "config.js";
read 'TEXT' ( 3015, "macprefs", purgeable ) "macprefs.js";
#else
read 'TEXT' ( 3011, "config", purgeable ) "configr.js";
read 'TEXT' ( 3015, "macprefs", purgeable ) "macprefsNav.js";
#endif // MOZ_MAIL_NEWS || EDITOR

View File

@@ -0,0 +1,100 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// Mac specific preference defaults
// TBD: Move Mac-specific Mime fields here?
platform.mac = true;
pref("browser.mac.show_tool_tips", true);
pref("browser.mac.use_internet_config", false);
pref("browser.mac.active_scrolling", true);
pref("browser.mac.use_utility_pattern", false);
pref("browser.mac.use_grayscale_form_controls", true);
pref("editor.use_html_editor", false);
pref("editor.use_image_editor", false);
//print header/footer
pref("browser.mac.print_header_topleft", 3);
pref("browser.mac.print_header_topmid", 5);
pref("browser.mac.print_header_topright", 2);
pref("browser.mac.print_header_botleft", 0);
pref("browser.mac.print_header_botmid", 4);
pref("browser.mac.print_header_botright", 0);
pref("browser.mac.print_background", false); // checkbox
pref("mail.notification.sound", "");
pref("mail.close_message_window.on_delete", true);
pref("mail.close_message_window.on_file", true);
pref("taskbar.mac.is_open", true);
pref("taskbar.mac.is_vertical", true);
pref("mail.server_type_on_restart", -1);
// This overrides the setting in config.js (which points to the Windows page)
config("menu.help.item_0.label","Help Contents");
config("menu.help.item_1.url","http://home.netscape.com/eng/mozilla/4.0/relnotes/mac-4.02.html");
mime_type("mime.image_gif", "image/gif", "gif", 2, "JPEGView", "JVWR", "GIFf");
mime_type("mime.image_jpeg", "image/jpeg", "jpg,jpeg,jpe", 2, "JPEGView", "JVWR", "JPEG");
mime_type("mime.image_pict", "image/pict", "pic,pict", 1, "SimpleText", "ttxt", "PICT");
mime_type("mime.image_tiff", "image/tiff", "tif,tiff", 1, "JPEGView", "JVWR", "TIFF");
mime_type("mime.image_x_xbitmap", "image/x-xbitmap", "xbm", 2, "Unknown", "ttxt", "????");
mime_type("mime.audio_basic", "audio/basic", "au,snd", 1, "Sound Machine", "SNDM", "ULAW");
mime_type("mime.audio_aiff", "audio/aiff", "aiff,aif", 1, "Sound Machine", "SNDM", "AIFF");
mime_type("mime.audio_x_wav", "audio/x-wav", "wav", 1, "Sound Machine", "SNDM", "WAVE");
mime_type("mime.video_quicktime", "video/quicktime", "qt,mov", 1, "Simple Player", "TVOD", "MooV");
mime_type("mime.video_mpeg", "video/mpeg", "mpg,mpeg,mpe", 1, "Sparkle", "mMPG", "MPEG");
mime_type("mime.video_x_msvideo", "video/x-msvideo", "avi", 1, "AVI to QT Utility", "AVIC", "????");
mime_type("mime.video_x_qtc", "video/x-qtc", "qtc", 1, "Conferencing Helper Application", "mtwh", ".qtc");
mime_type("mime.application_mac_binhex40", "application/mac-binhex40", "hqx", 1, "Stuffit Expander", "SITx", "TEXT");
mime_type("mime.application_x_stuffit", "application/x-stuffit", "sit", 1, "Stuffit Expander", "SITx", "SITD");
mime_type("mime.application_x_macbinary", "application/x-macbinary", "bin", 1, "Stuffit Expander", "SITx", "TEXT");
mime_type("mime.application_x_conference", "application/x-conference", "nsc", 1, "Netscape Conference", "Ncq¹", "TEXT");
mime_type("mime.application_zip", "application/zip", "z,zip", 1, "ZipIt", "ZIP ", "ZIP ");
mime_type("mime.application_gzip", "application/gzip", "gz", 1, "MacGzip", "Gzip", "Gzip");
mime_type("mime.application_msword", "application/msword", "doc", 0, "MS Word", "MSWD", "W6BN");
mime_type("mime.application_x_excel", "application/x-excel", "xls", 0, "MS Excel", "XCEL", "XLS5");
mime_type("mime.application_octet_stream", "application/octet-stream", "exe", 3, "", "", "");
mime_type("mime.application_postscript", "application/postscript", "ai,eps,ps", 3, "SimpleText", "ttxt", "TEXT");
mime_type("mime.application_rtf", "application/rtf", "rtf", 0, "MS Word", "MSWD", "TEXT");
mime_type("mime.application_x_compressed", "application/x-compressed", ".Z", 1, "MacCompress", "LZIV", "ZIVM");
mime_type("mime.application_x_tar", "application/x-tar", "tar", 1, "tar", "TAR ", "TARF");
mime_type("mime.Netscape_Source", "Netscape/Source", "", 2, "SimpleText", "ttxt", "TEXT");
pref("mime.Netscape_Source.description", "View Source");
mime_type("mime.Netscape_Telnet", "Netscape/Telnet", "", 1, "NCSA Telnet", "NCSA", "CONF");
mime_type("mime.Netscape_tn3270", "Netscape/tn3270", "", 1, "tn3270", "GFTM", "GFTS");
mime_type("mime.image_x_cmu_raster", "image/x-cmu-raster", "ras", 3, "Unknown", "ttxt", "????");
mime_type("mime.image_x_portable_anymap", "image/x-portable-anymap", "pnm", 3, "Unknown", "ttxt", "????");
mime_type("mime.image_x_portable_bitmap", "image/x-portable-bitmap", "pbm", 3, "Unknown", "ttxt", "????");
mime_type("mime.image_x_portable_graymap", "image/x-portable-graymap", "pgm", 3, "Unknown", "ttxt", "????");
mime_type("mime.image_x_rgb", "image/x-rgb", "rgb", 3, "Unknown", "ttxt", "????");
mime_type("mime.image_x_xpixmap", "image/x-xpixmap", "xpm", 2, "Unknown", "ttxt", "????");
// Add mime type for SimpleText read only files
mime_type("mime.SimpleText_ReadOnly", "text/plain", "", 2, "SimpleText", "ttxt", "ttro");

View File

@@ -0,0 +1,87 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// Mac specific preference defaults
// TBD: Move Mac-specific Mime fields here?
platform.mac = true;
pref("browser.mac.show_tool_tips", true);
pref("browser.mac.use_internet_config", false);
pref("browser.mac.active_scrolling", true);
pref("browser.mac.use_utility_pattern", false);
pref("browser.mac.use_grayscale_form_controls", true);
//print header/footer
pref("browser.mac.print_header_topleft", 3);
pref("browser.mac.print_header_topmid", 5);
pref("browser.mac.print_header_topright", 2);
pref("browser.mac.print_header_botleft", 0);
pref("browser.mac.print_header_botmid", 4);
pref("browser.mac.print_header_botright", 0);
pref("browser.mac.print_background", false); // checkbox
// This overrides the setting in config.js (which points to the Windows page)
config("menu.help.item_0.label","Help Contents");
config("menu.help.item_1.url","http://home.netscape.com/eng/mozilla/4.0/relnotes/mac-4.0-nav.html");
mime_type("mime.image_gif", "image/gif", "gif", 2, "JPEGView", "JVWR", "GIFf");
mime_type("mime.image_jpeg", "image/jpeg", "jpg,jpeg,jpe", 2, "JPEGView", "JVWR", "JPEG");
mime_type("mime.image_pict", "image/pict", "pic,pict", 1, "SimpleText", "ttxt", "PICT");
mime_type("mime.image_tiff", "image/tiff", "tif,tiff", 1, "JPEGView", "JVWR", "TIFF");
mime_type("mime.image_x_xbitmap", "image/x-xbitmap", "xbm", 2, "Unknown", "ttxt", "????");
mime_type("mime.audio_basic", "audio/basic", "au,snd", 1, "Sound Machine", "SNDM", "ULAW");
mime_type("mime.audio_aiff", "audio/aiff", "aiff,aif", 1, "Sound Machine", "SNDM", "AIFF");
mime_type("mime.audio_x_wav", "audio/x-wav", "wav", 1, "Sound Machine", "SNDM", "WAVE");
mime_type("mime.video_quicktime", "video/quicktime", "qt,mov", 1, "Simple Player", "TVOD", "MooV");
mime_type("mime.video_mpeg", "video/mpeg", "mpg,mpeg,mpe", 1, "Sparkle", "mMPG", "MPEG");
mime_type("mime.video_x_msvideo", "video/x-msvideo", "avi", 1, "AVI to QT Utility", "AVIC", "????");
mime_type("mime.video_x_qtc", "video/x-qtc", "qtc", 1, "Conferencing Helper Application", "mtwh", ".qtc");
mime_type("mime.application_mac_binhex40", "application/mac-binhex40", "hqx", 1, "Stuffit Expander", "SITx", "TEXT");
mime_type("mime.application_x_stuffit", "application/x-stuffit", "sit", 1, "Stuffit Expander", "SITx", "SITD");
mime_type("mime.application_x_macbinary", "application/x-macbinary", "bin", 1, "Stuffit Expander", "SITx", "TEXT");
mime_type("mime.application_x_conference", "application/x-conference", "nsc", 1, "Netscape Conference", "Ncq¹", "TEXT");
mime_type("mime.application_zip", "application/zip", "z,zip", 1, "ZipIt", "ZIP ", "ZIP ");
mime_type("mime.application_gzip", "application/gzip", "gz", 1, "MacGzip", "Gzip", "Gzip");
mime_type("mime.application_msword", "application/msword", "doc", 0, "MS Word", "MSWD", "W6BN");
mime_type("mime.application_x_excel", "application/x-excel", "xls", 0, "MS Excel", "XCEL", "XLS5");
mime_type("mime.application_octet_stream", "application/octet-stream", "exe", 3, "", "", "");
mime_type("mime.application_postscript", "application/postscript", "ai,eps,ps", 3, "SimpleText", "ttxt", "TEXT");
mime_type("mime.application_rtf", "application/rtf", "rtf", 0, "MS Word", "MSWD", "TEXT");
mime_type("mime.application_x_compressed", "application/x-compressed", ".Z", 1, "MacCompress", "LZIV", "ZIVM");
mime_type("mime.application_x_tar", "application/x-tar", "tar", 1, "tar", "TAR ", "TARF");
mime_type("mime.Netscape_Source", "Netscape/Source", "", 2, "SimpleText", "ttxt", "TEXT");
pref("mime.Netscape_Source.description", "View Source");
mime_type("mime.Netscape_Telnet", "Netscape/Telnet", "", 1, "NCSA Telnet", "NCSA", "CONF");
mime_type("mime.Netscape_tn3270", "Netscape/tn3270", "", 1, "tn3270", "GFTM", "GFTS");
mime_type("mime.image_x_cmu_raster", "image/x-cmu-raster", "ras", 3, "Unknown", "ttxt", "????");
mime_type("mime.image_x_portable_anymap", "image/x-portable-anymap", "pnm", 3, "Unknown", "ttxt", "????");
mime_type("mime.image_x_portable_bitmap", "image/x-portable-bitmap", "pbm", 3, "Unknown", "ttxt", "????");
mime_type("mime.image_x_portable_graymap", "image/x-portable-graymap", "pgm", 3, "Unknown", "ttxt", "????");
mime_type("mime.image_x_rgb", "image/x-rgb", "rgb", 3, "Unknown", "ttxt", "????");
mime_type("mime.image_x_xpixmap", "image/x-xpixmap", "xpm", 2, "Unknown", "ttxt", "????");
// Add mime type for SimpleText read only files
mime_type("mime.SimpleText_ReadOnly", "text/plain", "", 2, "SimpleText", "ttxt", "ttro");

View File

@@ -0,0 +1,113 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
IGNORE_MANIFEST=1
#//------------------------------------------------------------------------
#//
#// Specify the depth of the current directory relative to the
#// root of NS
#//
#//------------------------------------------------------------------------
DEPTH = ..\..\..
#//------------------------------------------------------------------------
#//
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
#//
#//------------------------------------------------------------------------
DLLNAME = xppref$(MOZ_BITS)
DLL1NAME = xpref$(MOZ_BITS)
PDBFILE = $(DLLNAME).pdb
MAPFILE = $(DLLNAME).map
RESFILE = $(DLLNAME).res
DLL =.\$(OBJDIR)\$(DLLNAME).dll
MAKE_OBJ_TYPE = DLL
LINCS = -I$(PUBLIC)/js \
-I$(PUBLIC)/pref \
-I$(PUBLIC)/java \
-I$(PUBLIC)/ldap \
-I$(PUBLIC)/dbm \
-I$(PUBLIC)/security \
-I$(PUBLIC)/xpcom \
-I$(DEPTH)\include \
LCFLAGS = -DMOZILLA_CLIENT
# I'm hardcoding the directory name here to fix MOZ_LITE
# it was $(DIST_PREFIX) instead of WIN, which is the same
# in communicator, but breaks when MOZ_LITE sets $DIST to NAV
# This will need to be fixed in a better way, but it depends
# on the Security team to fix stuff in what is being passed here.
# the same change was made in \ns\cmd\winfe\mkfiles32\mozilla.mak
!if ("$(MOZ_BITS)" == "16" )
BINREL_DIST = $(DIST)
!else
!ifndef MOZ_DEBUG
BINREL_DIST=$(XPDIST)\WIN954.0_OPT.OBJ
!else
BINREL_DIST=$(XPDIST)\WIN954.0_DBG.OBJD
!endif
!endif
!ifndef MOZ_SECURITY
HASHLIBS=$(DIST)\lib\secfreenav32.lib
!else
HASHLIBS=$(BINREL_DIST)\lib\hash.lib $(BINREL_DIST)\lib\secutil.lib
!endif
# DEFFILE = $(DLLNAME).def
LLIBS = \
$(DIST)\lib\libplc21.lib \
$(LIBNSPR) \
$(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib \
$(DIST)\lib\xpcom32.lib \
$(HASHLIBS)
#//------------------------------------------------------------------------
#//
#// Define the files necessary to build the target (ie. OBJS)
#//
#//------------------------------------------------------------------------
OBJS = \
.\$(OBJDIR)\prefapi.obj \
.\$(OBJDIR)\nsPref.obj \
$(NULL)
#//------------------------------------------------------------------------
#//
#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
#// (these must be defined before the common makefiles are included)
#//
#//------------------------------------------------------------------------
LIBRARY=.\$(OBJDIR)\$(LIBNAME).lib
#//------------------------------------------------------------------------
#//
#// Include the common makefile rules
#//
#//------------------------------------------------------------------------
include <$(DEPTH)\config\rules.mak>
libs:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
$(MAKE_INSTALL) .\init\netscape.cfg $(DIST)\bin

View File

@@ -0,0 +1,629 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "pratom.h"
#include "prefapi.h"
#define NS_IMPL_IDS
#include "nsIFactory.h"
#include "nsRepository.h"
#include "nsIPref.h"
#ifdef XP_MAC
#include "nsINetSupport.h"
#include "nsIStreamListener.h"
#endif
class nsPref: public nsIPref {
NS_DECL_ISUPPORTS
private:
nsPref();
~nsPref();
static nsPref *mInstance;
public:
static nsPref *GetInstance();
// Initialize/shutdown
NS_IMETHOD Startup(char *filename);
NS_IMETHOD Shutdown();
// Config file input
NS_IMETHOD ReadUserJSFile(char *filename);
NS_IMETHOD ReadLIJSFile(char *filename);
// JS stuff
NS_IMETHOD GetConfigContext(JSContext **js_context);
NS_IMETHOD GetGlobalConfigObject(JSObject **js_object);
NS_IMETHOD GetPrefConfigObject(JSObject **js_object);
NS_IMETHOD EvaluateConfigScript(const char * js_buffer, size_t length,
const char* filename,
PRBool bGlobalContext,
PRBool bCallbacks);
// Getters
NS_IMETHOD GetCharPref(const char *pref,
char * return_buf, int * buf_length);
NS_IMETHOD GetIntPref(const char *pref, int32 * return_int);
NS_IMETHOD GetBoolPref(const char *pref, XP_Bool * return_val);
NS_IMETHOD GetBinaryPref(const char *pref,
void * return_val, int * buf_length);
NS_IMETHOD GetColorPref(const char *pref,
uint8 *red, uint8 *green, uint8 *blue);
NS_IMETHOD GetColorPrefDWord(const char *pref, uint32 *colorref);
NS_IMETHOD GetRectPref(const char *pref,
int16 *left, int16 *top,
int16 *right, int16 *bottom);
// Setters
NS_IMETHOD SetCharPref(const char *pref,const char* value);
NS_IMETHOD SetIntPref(const char *pref,int32 value);
NS_IMETHOD SetBoolPref(const char *pref,PRBool value);
NS_IMETHOD SetBinaryPref(const char *pref,void * value, long size);
NS_IMETHOD SetColorPref(const char *pref,
uint8 red, uint8 green, uint8 blue);
NS_IMETHOD SetColorPrefDWord(const char *pref, uint32 colorref);
NS_IMETHOD SetRectPref(const char *pref,
int16 left, int16 top, int16 right, int16 bottom);
// Get Defaults
NS_IMETHOD GetDefaultCharPref(const char *pref,
char * return_buf, int * buf_length);
NS_IMETHOD GetDefaultIntPref(const char *pref, int32 * return_int);
NS_IMETHOD GetDefaultBoolPref(const char *pref, XP_Bool * return_val);
NS_IMETHOD GetDefaultBinaryPref(const char *pref,
void * return_val, int * buf_length);
NS_IMETHOD GetDefaultColorPref(const char *pref,
uint8 *red, uint8 *green, uint8 *blue);
NS_IMETHOD GetDefaultColorPrefDWord(const char *pref,
uint32 *colorref);
NS_IMETHOD GetDefaultRectPref(const char *pref,
int16 *left, int16 *top,
int16 *right, int16 *bottom);
// Set defaults
NS_IMETHOD SetDefaultCharPref(const char *pref,const char* value);
NS_IMETHOD SetDefaultIntPref(const char *pref,int32 value);
NS_IMETHOD SetDefaultBoolPref(const char *pref,PRBool value);
NS_IMETHOD SetDefaultBinaryPref(const char *pref,
void * value, long size);
NS_IMETHOD SetDefaultColorPref(const char *pref,
uint8 red, uint8 green, uint8 blue);
NS_IMETHOD SetDefaultRectPref(const char *pref,
int16 left, int16 top,
int16 right, int16 bottom);
// Copy prefs
NS_IMETHOD CopyCharPref(const char *pref, char ** return_buf);
NS_IMETHOD CopyBinaryPref(const char *pref,
void ** return_value, int *size);
NS_IMETHOD CopyDefaultCharPref( const char
*pref, char ** return_buffer );
NS_IMETHOD CopyDefaultBinaryPref(const char *pref,
void ** return_val, int * size);
// Path prefs
NS_IMETHOD CopyPathPref(const char *pref, char ** return_buf);
NS_IMETHOD SetPathPref(const char *pref,
const char *path, PRBool set_default);
// Pref info
NS_IMETHOD PrefIsLocked(const char *pref, XP_Bool *res);
// Save pref files
NS_IMETHOD SavePrefFile(void);
NS_IMETHOD SavePrefFileAs(const char *filename);
NS_IMETHOD SaveLIPrefFile(const char *filename);
// Callbacks
NS_IMETHOD RegisterCallback( const char* domain,
PrefChangedFunc callback,
void* instance_data );
NS_IMETHOD UnregisterCallback( const char* domain,
PrefChangedFunc callback,
void* instance_data );
};
nsPref* nsPref::mInstance = NULL;
static PRInt32 g_InstanceCount = 0;
static PRInt32 g_LockCount = 0;
static nsresult _convertRes(int res)
{
nsresult nsres = NS_OK;
switch (res) {
case PREF_OUT_OF_MEMORY:
nsres = NS_ERROR_OUT_OF_MEMORY;
break;
case PREF_NOT_INITIALIZED:
nsres = NS_ERROR_NOT_INITIALIZED;
break;
case PREF_TYPE_CHANGE_ERR:
case PREF_ERROR:
case PREF_BAD_LOCKFILE:
nsres = NS_ERROR_UNEXPECTED;
break;
case PREF_VALUECHANGED:
nsres = NS_PREF_VALUE_CHANGED;
break;
};
return nsres;
}
/*
* Constructor/Destructor
*/
nsPref::nsPref() {
PR_AtomicIncrement(&g_InstanceCount);
NS_INIT_REFCNT();
}
nsPref::~nsPref() {
PR_AtomicDecrement(&g_InstanceCount);
mInstance = NULL;
}
nsPref *nsPref::GetInstance()
{
if (mInstance == NULL) {
mInstance = new nsPref();
}
return mInstance;
}
/*
* nsISupports Implementation
*/
NS_IMPL_ISUPPORTS(nsPref, kIPrefIID);
/*
* nsIPref Implementation
*/
NS_IMETHODIMP nsPref::Startup(char *filename)
{
return _convertRes(PREF_Init(filename));
}
NS_IMETHODIMP nsPref::Shutdown()
{
PREF_Cleanup();
return NS_OK;
}
/*
* Config file input
*/
NS_IMETHODIMP nsPref::ReadUserJSFile(char *filename)
{
return _convertRes(PREF_ReadUserJSFile(filename));
}
NS_IMETHODIMP nsPref::ReadLIJSFile(char *filename)
{
return _convertRes(PREF_ReadLIJSFile(filename));
}
/*
* JS stuff
*/
NS_IMETHODIMP nsPref::GetConfigContext(JSContext **js_context)
{
return _convertRes(PREF_GetConfigContext(js_context));
}
NS_IMETHODIMP nsPref::GetGlobalConfigObject(JSObject **js_object)
{
return _convertRes(PREF_GetGlobalConfigObject(js_object));
}
NS_IMETHODIMP nsPref::GetPrefConfigObject(JSObject **js_object)
{
return _convertRes(PREF_GetPrefConfigObject(js_object));
}
NS_IMETHODIMP nsPref::EvaluateConfigScript(const char * js_buffer,
size_t length,
const char* filename,
PRBool bGlobalContext,
PRBool bCallbacks)
{
return _convertRes(PREF_EvaluateConfigScript(js_buffer,
length,
filename,
bGlobalContext,
bCallbacks));
}
/*
* Getters
*/
NS_IMETHODIMP nsPref::GetCharPref(const char *pref,
char * return_buf, int * buf_length)
{
return _convertRes(PREF_GetCharPref(pref, return_buf, buf_length));
}
NS_IMETHODIMP nsPref::GetIntPref(const char *pref, int32 * return_int)
{
return _convertRes(PREF_GetIntPref(pref, return_int));
}
NS_IMETHODIMP nsPref::GetBoolPref(const char *pref, XP_Bool * return_val)
{
return _convertRes(PREF_GetBoolPref(pref, return_val));
}
NS_IMETHODIMP nsPref::GetBinaryPref(const char *pref,
void * return_val, int * buf_length)
{
return _convertRes(PREF_GetBinaryPref(pref, return_val, buf_length));
}
NS_IMETHODIMP nsPref::GetColorPref(const char *pref,
uint8 *red, uint8 *green, uint8 *blue)
{
return _convertRes(PREF_GetColorPref(pref, red, green, blue));
}
NS_IMETHODIMP nsPref::GetColorPrefDWord(const char *pref,
uint32 *colorref)
{
return _convertRes(PREF_GetColorPrefDWord(pref, colorref));
}
NS_IMETHODIMP nsPref::GetRectPref(const char *pref,
int16 *left, int16 *top,
int16 *right, int16 *bottom)
{
return _convertRes(PREF_GetRectPref(pref, left, top, right, bottom));
}
/*
* Setters
*/
NS_IMETHODIMP nsPref::SetCharPref(const char *pref,const char* value)
{
return _convertRes(PREF_SetCharPref(pref, value));
}
NS_IMETHODIMP nsPref::SetIntPref(const char *pref,int32 value)
{
return _convertRes(PREF_SetIntPref(pref, value));
}
NS_IMETHODIMP nsPref::SetBoolPref(const char *pref,PRBool value)
{
return _convertRes(PREF_SetBoolPref(pref, value));
}
NS_IMETHODIMP nsPref::SetBinaryPref(const char *pref,void * value, long size)
{
return _convertRes(PREF_SetBinaryPref(pref, value, size));
}
NS_IMETHODIMP nsPref::SetColorPref(const char *pref,
uint8 red, uint8 green, uint8 blue)
{
return _convertRes(PREF_SetColorPref(pref, red, green, blue));
}
NS_IMETHODIMP nsPref::SetColorPrefDWord(const char *pref,
uint32 value)
{
return _convertRes(PREF_SetColorPrefDWord(pref, value));
}
NS_IMETHODIMP nsPref::SetRectPref(const char *pref,
int16 left, int16 top,
int16 right, int16 bottom)
{
return _convertRes(PREF_SetRectPref(pref, left, top, right, bottom));
}
/*
* Get Defaults
*/
NS_IMETHODIMP nsPref::GetDefaultCharPref(const char *pref,
char * return_buf,
int * buf_length)
{
return _convertRes(PREF_GetDefaultCharPref(pref, return_buf, buf_length));
}
NS_IMETHODIMP nsPref::GetDefaultIntPref(const char *pref,
int32 * return_int)
{
return _convertRes(PREF_GetDefaultIntPref(pref, return_int));
}
NS_IMETHODIMP nsPref::GetDefaultBoolPref(const char *pref,
XP_Bool * return_val)
{
return _convertRes(PREF_GetDefaultBoolPref(pref, return_val));
}
NS_IMETHODIMP nsPref::GetDefaultBinaryPref(const char *pref,
void * return_val,
int * buf_length)
{
return _convertRes(PREF_GetDefaultBinaryPref(pref, return_val, buf_length));
}
NS_IMETHODIMP nsPref::GetDefaultColorPref(const char *pref,
uint8 *red, uint8 *green,
uint8 *blue)
{
return _convertRes(PREF_GetDefaultColorPref(pref, red, green, blue));
}
NS_IMETHODIMP nsPref::GetDefaultColorPrefDWord(const char *pref,
uint32 *colorref)
{
return _convertRes(PREF_GetDefaultColorPrefDWord(pref, colorref));
}
NS_IMETHODIMP nsPref::GetDefaultRectPref(const char *pref,
int16 *left, int16 *top,
int16 *right, int16 *bottom)
{
return _convertRes(PREF_GetDefaultRectPref(pref,
left, top, right, bottom));
}
/*
* Set defaults
*/
NS_IMETHODIMP nsPref::SetDefaultCharPref(const char *pref,const char* value)
{
return _convertRes(PREF_SetDefaultCharPref(pref, value));
}
NS_IMETHODIMP nsPref::SetDefaultIntPref(const char *pref,int32 value)
{
return _convertRes(PREF_SetDefaultIntPref(pref, value));
}
NS_IMETHODIMP nsPref::SetDefaultBoolPref(const char *pref, PRBool value)
{
return _convertRes(PREF_SetDefaultBoolPref(pref, value));
}
NS_IMETHODIMP nsPref::SetDefaultBinaryPref(const char *pref,
void * value, long size)
{
return _convertRes(PREF_SetDefaultBinaryPref(pref, value, size));
}
NS_IMETHODIMP nsPref::SetDefaultColorPref(const char *pref,
uint8 red, uint8 green, uint8 blue)
{
return _convertRes(PREF_SetDefaultColorPref(pref, red, green, blue));
}
NS_IMETHODIMP nsPref::SetDefaultRectPref(const char *pref,
int16 left, int16 top,
int16 right, int16 bottom)
{
return _convertRes(PREF_SetDefaultRectPref(pref, left, top, right, bottom));
}
/*
* Copy prefs
*/
NS_IMETHODIMP nsPref::CopyCharPref(const char *pref, char ** return_buf)
{
return _convertRes(PREF_CopyCharPref(pref, return_buf));
}
NS_IMETHODIMP nsPref::CopyBinaryPref(const char *pref,
void ** return_value, int *size)
{
return _convertRes(PREF_CopyBinaryPref(pref, return_value, size));
}
NS_IMETHODIMP nsPref::CopyDefaultCharPref( const char *pref,
char ** return_buffer )
{
return _convertRes(PREF_CopyDefaultCharPref(pref, return_buffer));
}
NS_IMETHODIMP nsPref::CopyDefaultBinaryPref(const char *pref,
void ** return_val, int * size)
{
return _convertRes(PREF_CopyDefaultBinaryPref(pref, return_val, size));
}
/*
* Path prefs
*/
NS_IMETHODIMP nsPref::CopyPathPref(const char *pref, char ** return_buf)
{
#ifndef XP_MAC
return _convertRes(PREF_CopyPathPref(pref, return_buf));
#endif
}
NS_IMETHODIMP nsPref::SetPathPref(const char *pref,
const char *path, PRBool set_default)
{
#ifndef XP_MAC
return _convertRes(PREF_SetPathPref(pref, path, set_default));
#endif
}
/*
* Pref info
*/
NS_IMETHODIMP nsPref::PrefIsLocked(const char *pref, XP_Bool *res)
{
if (res == NULL) {
return NS_ERROR_INVALID_POINTER;
}
*res = PREF_PrefIsLocked(pref);
return NS_OK;
}
/*
* Save pref files
*/
NS_IMETHODIMP nsPref::SavePrefFile(void)
{
return _convertRes(PREF_SavePrefFile());
}
NS_IMETHODIMP nsPref::SavePrefFileAs(const char *filename)
{
return _convertRes(PREF_SavePrefFileAs(filename));
}
NS_IMETHODIMP nsPref::SaveLIPrefFile(const char *filename)
{
return _convertRes(PREF_SaveLIPrefFile(filename));
}
/*
* Callbacks
*/
NS_IMETHODIMP nsPref::RegisterCallback( const char* domain,
PrefChangedFunc callback,
void* instance_data )
{
PREF_RegisterCallback(domain, callback, instance_data);
return NS_OK;
}
NS_IMETHODIMP nsPref::UnregisterCallback( const char* domain,
PrefChangedFunc callback,
void* instance_data )
{
return _convertRes(PREF_UnregisterCallback(domain, callback, instance_data));
}
class nsPrefFactory: public nsIFactory {
NS_DECL_ISUPPORTS
nsPrefFactory() {
NS_INIT_REFCNT();
PR_AtomicIncrement(&g_InstanceCount);
}
~nsPrefFactory() {
PR_AtomicDecrement(&g_InstanceCount);
}
NS_IMETHOD CreateInstance(nsISupports *aDelegate,
const nsIID &aIID,
void **aResult);
NS_IMETHOD LockFactory(PRBool aLock) {
if (aLock) {
PR_AtomicIncrement(&g_LockCount);
} else {
PR_AtomicDecrement(&g_LockCount);
}
return NS_OK;
};
};
NS_DEFINE_IID(kFactoryIID, NS_IFACTORY_IID);
NS_IMPL_ISUPPORTS(nsPrefFactory, kFactoryIID);
nsresult nsPrefFactory::CreateInstance(nsISupports *aDelegate,
const nsIID &aIID,
void **aResult)
{
if (aDelegate != NULL) {
return NS_ERROR_NO_AGGREGATION;
}
nsPref *t = nsPref::GetInstance();
if (t == NULL) {
return NS_ERROR_OUT_OF_MEMORY;
}
nsresult res = t->QueryInterface(aIID, aResult);
if (NS_FAILED(res)) {
*aResult = NULL;
}
return res;
}
#ifdef XP_MAC
extern "C" NS_EXPORT nsresult NSGetFactory_PREF_DLL(const nsCID &aCID, nsIFactory **aFactory)
#else
extern "C" NS_EXPORT nsresult NSGetFactory(const nsCID &aCID, nsIFactory **aFactory)
#endif
{
if (aFactory == NULL) {
return NS_ERROR_NULL_POINTER;
}
if (aCID.Equals(kPrefCID)) {
nsPrefFactory *factory = new nsPrefFactory();
nsresult res = factory->QueryInterface(kFactoryIID, (void **) aFactory);
if (NS_FAILED(res)) {
*aFactory = NULL;
delete factory;
}
return res;
}
return NS_NOINTERFACE;
}
#ifdef XP_MAC
extern "C" NS_EXPORT PRBool NSCanUnload_PREF_DLL()
#else
extern "C" NS_EXPORT PRBool NSCanUnload()
#endif
{
return PRBool(g_InstanceCount == 0 && g_LockCount == 0);
}
extern "C" NS_EXPORT nsresult NSRegisterSelf(const char *path)
{
return nsRepository::RegisterFactory(kPrefCID, path,
PR_TRUE, PR_TRUE);
}
extern "C" NS_EXPORT nsresult NSUnregisterSelf(const char *path)
{
return nsRepository::UnregisterFactory(kPrefCID, path);
}

View File

@@ -0,0 +1,92 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
pref("intl.font2.win.prop_font", "Tms Rmn");
pref("intl.font2.win.prop_size", 12);
pref("intl.font2.win.fixed_font", "Courier");
pref("intl.font2.win.fixed_size", 10);
pref("intl.font260.win.prop_font", "Tms Rmn");
pref("intl.font260.win.prop_size", 10);
pref("intl.font260.win.fixed_font", "Courier");
pref("intl.font260.win.fixed_size", 10);
pref("intl.font263.win.prop_font", "Tms Rmn");
pref("intl.font263.win.prop_size", 12);
pref("intl.font263.win.fixed_font", "Courier");
pref("intl.font263.win.fixed_size", 10);
pref("intl.font1292.win.prop_font", "Tms Rmn");
pref("intl.font1292.win.prop_size", 12);
pref("intl.font1292.win.fixed_font", "Courier");
pref("intl.font1292.win.fixed_size", 10);
pref("intl.font264.win.prop_font", "Tms Rmn");
pref("intl.font264.win.prop_size", 12);
pref("intl.font264.win.fixed_font", "Courier");
pref("intl.font264.win.fixed_size", 10);
pref("intl.font44.win.prop_font", "Tms Rmn");
pref("intl.font44.win.prop_size", 12);
pref("intl.font44.win.fixed_font", "Courier");
pref("intl.font44.win.fixed_size", 10);
pref("intl.font41.win.prop_font", "Tms Rmn");
pref("intl.font41.win.prop_size", 12);
pref("intl.font41.win.fixed_font", "Courier");
pref("intl.font41.win.fixed_size", 10);
pref("intl.font43.win.prop_font", "Tms Rmn");
pref("intl.font43.win.prop_size", 12);
pref("intl.font43.win.fixed_font", "Courier");
pref("intl.font43.win.fixed_size", 10);
pref("intl.font20.win.prop_font", "Tms Rmn");
pref("intl.font20.win.prop_size", 12);
pref("intl.font20.win.fixed_font", "Courier");
pref("intl.font20.win.fixed_size", 10);
pref("intl.font290.win.prop_font", "Tms Rmn");
pref("intl.font290.win.prop_size", 12);
pref("intl.font290.win.fixed_font", "Courier");
pref("intl.font290.win.fixed_size", 10);
pref("intl.font254.win.prop_font", "Tms Rmn");
pref("intl.font254.win.prop_size", 12);
pref("intl.font254.win.fixed_font", "Courier");
pref("intl.font254.win.fixed_size", 10);
pref("intl.font58.win.mimecharset", "ibm864");
pref("intl.font58.win.prop_font", "Tms Rmn");
pref("intl.font58.win.prop_size", 12);
pref("intl.font58.win.fixed_font", "Courier");
pref("intl.font58.win.fixed_size", 10);
pref("intl.font57.win.mimecharset", "ibm862");
pref("intl.font57.win.prop_font", "Tms Rmn");
pref("intl.font57.win.prop_size", 12);
pref("intl.font57.win.fixed_font", "Courier");
pref("intl.font57.win.fixed_size", 10);
pref("intl.font60.win.mimecharset", "ibm874");
pref("intl.font60.win.prop_font", "Tms Rmn");
pref("intl.font60.win.prop_size", 12);
pref("intl.font60.win.fixed_font", "Courier");
pref("intl.font60.win.fixed_size", 10);
pref("security.enable_java", false);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
#!/usr/local/bin/perl
# usually you just run $(PERL) this file though
while (<ARGV>) {
if (/(config|pref|localDefPref)\s*\(\"([^\"]*)\"/) {
# $2 now contains the pref name
$define = $pref_name = $2;
$define =~ tr/a-z/A-Z/;
$define =~ s/\./_/g;
# uniqify the list by dumping everything into a hash
$preftable{"PREF_$define"} = "\"$pref_name\""
}
}
# print out the final table
foreach $pref (sort keys %preftable) {
print "#define $pref $preftable{$pref}\n";
}

View File

@@ -0,0 +1,102 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* LDAP functions callable from JavaScript */
#include "ldap.h"
#include "prefldap.h"
/*
* Creates an LDAP search URL given a comma-separated list of attributes.
* Returns a list of key=values separated by '\n'
*/
char * pref_get_ldap_attributes(char* host, char* base, char* filter, char* attrs,
char** return_error)
{
char *value = NULL;
LDAP* ld;
int err, i;
char *url;
LDAPMessage *result;
LDAPMessage *e;
char *a;
BerElement *ber;
char **vals;
ld = ldap_init(host, LDAP_PORT);
if (!ld)
return value;
url = (char*) malloc(sizeof(char) *
(strlen(host) + strlen(base) + strlen(filter) + strlen(attrs) + 20));
if (!url)
return value;
XP_SPRINTF(url, "ldap://%s/%s?%s?sub?%s", host, base, attrs, filter);
err = ldap_url_search_s( ld, url, 0, &result );
XP_FREE(url);
if (err != LDAP_SUCCESS) {
*return_error = ldap_err2string(err);
return value;
}
e = ldap_first_entry( ld, result );
if (e) {
a = ldap_first_attribute( ld, e, &ber );
if (a) {
int total_buf_size = 200;
int remaining_buf_size = total_buf_size;
value = (char*) malloc(sizeof(char*) * total_buf_size);
if (!value)
return NULL;
value[0] = '\0';
for ( ; a != NULL; a = ldap_next_attribute( ld, e, ber )) {
vals = ldap_get_values( ld, e, a );
if (vals && vals[0]) {
remaining_buf_size -= (strlen(a) + strlen(vals[0]) + 2);
if (remaining_buf_size < 1) {
remaining_buf_size += 2 * total_buf_size;
total_buf_size += 2 * total_buf_size;
value = (char*) realloc(value, sizeof(char*) * total_buf_size);
if (!value)
return NULL;
}
strcat(value, "\n");
strcat(value, a);
strcat(value, "=");
strcat(value, vals[0]);
ldap_value_free( vals );
}
}
ldap_memfree(a);
}
if (ber)
ber_free(ber, 0);
}
ldap_msgfree(result);
ldap_unbind(ld);
return value;
}

View File

@@ -0,0 +1,22 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*
* Needed by icondata.h
* An empty file is ok.
*/

View File

@@ -0,0 +1,158 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// The other platforms roll this all into "toolbar mode".
pref("browser.chrome.toolbar_tips", true);
pref("browser.chrome.show_menubar", true);
pref("mail.empty_trash", false);
// Handled differently under Mac/Windows
pref("network.hosts.smtp_server", "localhost");
pref("network.hosts.pop_server", "pop");
pref("mail.check_new_mail", true);
pref("mail.sort_by", 0);
pref("news.sort_by", 0);
pref("browser.startup.license_accepted", "");
pref("browser.cache.memory_cache_size", 3000);
pref("browser.cache.disk_cache_size", 5000);
pref("mail.directory", "~/nsmail/");
pref("mail.imap.root_dir", "~/ns_imap/");
pref("mail.signature_file", "~/.signature");
pref("mail.default_fcc", "~/nsmail/Sent");
pref("news.directory", "~");
pref("news.default_fcc", "~/nsmail/Sent");
pref("mailnews.reply_on_top", 0);
pref("mailnews.reply_with_extra_lines", 0);
pref("browser.startup.default_window", 0);
pref("security.warn_accept_cookie", false);
pref("editor.disable_spell_checker", false);
pref("editor.dont_lock_spell_files", true);
// Instead of "delay_images"
pref("browser.autoload_images", true);
// Unix only
pref("mail.use_movemail", true);
pref("mail.use_builtin_movemail", true);
pref("mail.movemail_program", "");
pref("mail.movemail_warn", false);
pref("mail.sash_geometry", "");
pref("news.cache_xover", false);
pref("news.show_first_unread", false);
pref("news.sash_geometry", "");
pref("helpers.global_mime_types_file", "/usr/local/lib/netscape/mime.types");
pref("helpers.global_mailcap_file", "/usr/local/lib/netscape/mailcap");
pref("helpers.private_mime_types_file", "~/.mime.types");
pref("helpers.private_mailcap_file", "~/.mailcap");
pref("applications.telnet", "xterm -e telnet %h %p");
pref("applications.tn3270", "xterm -e tn3270 %h");
pref("applications.rlogin", "xterm -e rlogin %h");
pref("applications.rlogin_with_user", "xterm -e rlogin %h -l %u");
pref("applications.tmp_dir", "/tmp");
// On Solaris/IRIX, this should be "lp"
pref("print.print_command", "lpr");
pref("print.print_reversed", false);
pref("print.print_color", true);
pref("print.print_landscape", false);
pref("print.print_paper_size", 0);
// Not sure what this one does...
pref("browser.fancy_ftp", true);
// Fortezza stuff
pref("fortezza.toggle", 1);
pref("fortezza.timeout", 30);
pref("intl.font_charset", "");
pref("intl.font_spec_list", "");
pref("mail.signature_date", 0);
// Outliner column defaults
pref("addressbook.searchpane.outliner_geometry", "");
pref("addressbook.addresseepane.outliner_geometry", "");
pref("addressbook.listpane.outliner_geometry", "");
pref("addressbook.outliner_geometry", "");
pref("mail.composition.addresspane.outliner_geometry", "");
pref("bookmarks.outliner_geometry", "");
pref("mail.categorypane.outliner_geometry", "");
pref("mail.folderpane.outliner_geometry", "");
pref("history.outliner_geometry", "");
pref("mail.ldapsearchpane.outliner_geometry", "");
pref("mail.searchpane.outliner_geometry", "");
pref("mail.mailfilter.outliner_geometry", "");
pref("preferences.lang.outliner_geometry", "");
pref("preferences.dir.outliner_geometry", "");
pref("preferences.font.outliner_geometry", "");
pref("mail.subscribepane.all_groups.outliner_geometry", "");
pref("mail.subscribepane.new_groups.outliner_geometry", "");
pref("mail.subscribepane.search_groups.outliner_geometry", "");
pref("mail.threadpane.outliner_geometry", "");
pref("mail.threadpane.messagepane_height", 400);
// Customizable toolbar stuff
pref("custtoolbar.personal_toolbar_folder", "Personal Toolbar Folder");
pref("custtoolbar.has_toolbar_folder", true);
pref("custtoolbar.Browser.Navigation_Toolbar.position", 0);
pref("custtoolbar.Browser.Navigation_Toolbar.showing", true);
pref("custtoolbar.Browser.Navigation_Toolbar.open", true);
pref("custtoolbar.Browser.Location_Toolbar.position", 1);
pref("custtoolbar.Browser.Location_Toolbar.showing", true);
pref("custtoolbar.Browser.Location_Toolbar.open", true);
pref("custtoolbar.Browser.Personal_Toolbar.position", 2);
pref("custtoolbar.Browser.Personal_Toolbar.showing", true);
pref("custtoolbar.Browser.Personal_Toolbar.open", true);
pref("custtoolbar.Messenger.Navigation_Toolbar.position", 0);
pref("custtoolbar.Messenger.Navigation_Toolbar.showing", true);
pref("custtoolbar.Messenger.Navigation_Toolbar.open", true);
pref("custtoolbar.Messenger.Location_Toolbar.position", 1);
pref("custtoolbar.Messenger.Location_Toolbar.showing", true);
pref("custtoolbar.Messenger.Location_Toolbar.open", true);
pref("custtoolbar.Messages.Navigation_Toolbar.position", 0);
pref("custtoolbar.Messages.Navigation_Toolbar.showing", true);
pref("custtoolbar.Messages.Navigation_Toolbar.open", true);
pref("custtoolbar.Messages.Location_Toolbar.position", 1);
pref("custtoolbar.Messages.Location_Toolbar.showing", true);
pref("custtoolbar.Messages.Location_Toolbar.open", true);
pref("custtoolbar.Folders.Navigation_Toolbar.position", 0);
pref("custtoolbar.Folders.Navigation_Toolbar.showing", true);
pref("custtoolbar.Folders.Navigation_Toolbar.open", true);
pref("custtoolbar.Folders.Location_Toolbar.position", 1);
pref("custtoolbar.Folders.Location_Toolbar.showing", true);
pref("custtoolbar.Folders.Location_Toolbar.open", true);
pref("custtoolbar.Address_Book.Address_Book_Toolbar.position", 0);
pref("custtoolbar.Address_Book.Address_Book_Toolbar.showing", true);
pref("custtoolbar.Address_Book.Address_Book_Toolbar.open", true);
pref("custtoolbar.Compose_Message.Message_Toolbar.position", 0);
pref("custtoolbar.Compose_Message.Message_Toolbar.showing", true);
pref("custtoolbar.Compose_Message.Message_Toolbar.open", true);
pref("custtoolbar.Composer.Composition_Toolbar.position", 0);
pref("custtoolbar.Composer.Composition_Toolbar.showing", true);
pref("custtoolbar.Composer.Composition_Toolbar.open", true);
pref("custtoolbar.Composer.Formatting_Toolbar.position", 1);
pref("custtoolbar.Composer.Formatting_Toolbar.showing", true);
pref("custtoolbar.Composer.Formatting_Toolbar.open", true);
pref("taskbar.x", -1);
pref("taskbar.y", -1);
pref("taskbar.floating", false);
pref("taskbar.horizontal", false);
pref("taskbar.ontop", false);
pref("taskbar.button_style", -1);
config("menu.help.item_1.url", "http://home.netscape.com/eng/mozilla/5.0/relnotes/unix-5.0.html");

View File

@@ -0,0 +1,115 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/**********************************************************************
unixpref.c
**********************************************************************/
#include <stdio.h>
#include <assert.h>
#include "prefapi.h"
#include "prlink.h"
#include "prlog.h"
#include "jsapi.h"
#include "jsbuffer.h"
#include "xpassert.h"
#include "fe_proto.h"
#include "icondata.h"
static struct fe_icon_type* splash_screen = NULL;
/*
* pref_InitInitialObjects
* Needed by PREF_Init.
* Sets the default preferences.
*/
extern char *fe_GetConfigDirFilename(char *filename);
XP_Bool
FE_GetLabelAndMnemonic(char* name, char** str, void* v_xm_str, void* v_mnemonic);
char *fe_GetConfigDirFilename(char *filename);
JSBool
pref_InitInitialObjects(void)
{
JSBool status;
PR_ASSERT(pref_init_buffer);
status = PREF_EvaluateJSBuffer(pref_init_buffer, strlen(pref_init_buffer));
/* these strings never get freed, but that's probably the way it should be */
PREF_SetDefaultCharPref("browser.cache.directory",
fe_GetConfigDirFilename("cache"));
PREF_SetDefaultCharPref("browser.sarcache.directory",
fe_GetConfigDirFilename("sarcache"));
PREF_SetDefaultCharPref("browser.bookmark_file",
fe_GetConfigDirFilename("bookmarks.html"));
PREF_SetDefaultCharPref("browser.history_file",
fe_GetConfigDirFilename("history.db"));
PREF_SetDefaultCharPref("browser.user_history_file",
fe_GetConfigDirFilename("history.list"));
#if defined(__sgi) || (defined(__sun) && defined(__svr4__))
PREF_SetDefaultCharPref("print.print_command", "lp");
#endif
return status;
}
/*
* PREF_GetLabelAndMnemonic
*/
PRBool
PREF_GetLabelAndMnemonic(char* name, char** str, void* v_xm_str, void* v_mnemonic)
{
/* Code moved to where it should have been. */
return FE_GetLabelAndMnemonic(name, str, v_xm_str, v_mnemonic);
}
/*
* PREF_GetUrl
*/
PRBool
PREF_GetUrl(char* name, char** url)
{
char buf[256];
PR_ASSERT(name);
if ( name == NULL || url == NULL ) return PR_FALSE;
strncpy(buf, name, 200);
strcat(buf, ".url");
*url = NULL;
PREF_CopyConfigString(buf, url);
return ( url != NULL && *url != NULL && **url != '\0' );
}
XP_Bool
FE_GetLabelAndMnemonic(char* name, char** str, void* v_xm_str, void* v_mnemonic)
{
}
char *fe_GetConfigDirFilename(char *filename)
{
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
; -*- Mode: Fundamental; tab-width: 4; indent-tabs-mode: nil -*-
;
; The contents of this file are subject to the Netscape Public License
; Version 1.0 (the "NPL"); you may not use this file except in
; compliance with the NPL. You may obtain a copy of the NPL at
; http://www.mozilla.org/NPL/
;
; Software distributed under the NPL is distributed on an "AS IS" basis,
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
; for the specific language governing rights and limitations under the
; NPL.
;
; The Initial Developer of this code under the NPL is Netscape
; Communications Corporation. Portions created by Netscape are
; Copyright (C) 1998 Netscape Communications Corporation. All Rights
; Reserved.
; prefdll.def : Declares the module parameters for the DLL.
LIBRARY "NSPREF"
DESCRIPTION 'NSPREF Windows Dynamic Link Library'
EXPORTS
; Explicit exports can go here
PREF_Init @1
PREF_EvaluateJSBuffer
PREF_SetCharPref
PREF_SetIntPref
PREF_SetBoolPref
PREF_SetBinaryPref
PREF_SetColorPref
PREF_SetRectPref
PREF_SetDefaultCharPref
PREF_SetDefaultIntPref
PREF_SetDefaultBoolPref
PREF_SetDefaultBinaryPref
PREF_SetDefaultColorPref
PREF_SetDefaultRectPref
PREF_CopyCharPref
PREF_GetCharPref
PREF_GetIntPref
PREF_GetBoolPref
PREF_GetBinaryPref
PREF_GetColorPref
PREF_GetRectPref
PREF_GetDefaultCharPref
PREF_GetDefaultIntPref
PREF_GetDefaultBoolPref
PREF_GetDefaultBinaryPref
PREF_GetDefaultColorPref
PREF_GetDefaultRectPref
PREF_PrefIsLocked
PREF_SavePrefFile
PREF_RegisterCallback

View File

@@ -0,0 +1,140 @@
! -*- Mode: Fundamental; tab-width: 4; indent-tabs-mode: nil -*-
!
! The contents of this file are subject to the Netscape Public License
! Version 1.0 (the "NPL"); you may not use this file except in
! compliance with the NPL. You may obtain a copy of the NPL at
! http://www.mozilla.org/NPL/
!
! Software distributed under the NPL is distributed on an "AS IS" basis,
! WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
! for the specific language governing rights and limitations under the
! NPL.
!
! The Initial Developer of this code under the NPL is Netscape
! Communications Corporation. Portions created by Netscape are
! Copyright (C) 1998 Netscape Communications Corporation. All Rights
! Reserved.
init_prefs RCDATA
BEGIN
"function isNumber(inputVal) {",
" oneDecimal = false;",
" inputStr = """" + inputVal;",
" for (var i=0; i < inputStr.length; i++) {",
" var oneChar = inputStr.charAt(i);",
" if (i == 0 && oneChar == ""-"") {",
" continue;",
" };",
" if (oneChar == ""."" && !oneDecimal) {",
" oneDecimal = true; ",
" continue;",
" };",
" if (oneChar < ""0"" || oneChar > ""9"") {",
" return false;",
" };",
" };",
" return true;",
"}",
"function isBoolean(inputVal) {",
" inputStr = """" + inputVal;",
" if ((inputStr == ""true"") || (inputStr == ""false""))",
" return true;",
" return false;",
"}",
"function preference(default_value) {",
" this.default_value = default_value;",
" this.user_value = null;",
" this.locked = false;",
"};",
"",
"function pref_array(parent) {",
" this.parent = parent;",
"};",
"",
"prefs = new pref_array(null);",
"prefs.browser = new pref_array(""prefs"");",
"prefs.browser.startup = new pref_array(""prefs.browser"");",
"prefs.browser.startup.homepage = new preference(""http://home.netscape.com"");",
"prefs.browser.startup.autoload_homepage = new preference(true);",
"prefs.browser.cache = new pref_array(""prefs.browser"");",
"prefs.browser.cache.disk_cache_size = new preference(5000);",
"prefs.browser.cache.memory_cache_size = new preference(1024);",
"prefs.browser.cache.disk_cache_ssl = new preference(false);",
"prefs.browser.cache.wfe = new pref_array(""prefs.browser.cache"");",
"prefs.browser.cache.wfe.directory = new preference(null);",
"prefs.browser.main_window = new pref_array(""prefs.browser"");",
"prefs.browser.main_window.bottom = new preference(-1);",
"prefs.browser.main_window.left = new preference(-1);",
"prefs.browser.main_window.right = new preference(-1);",
"prefs.browser.main_window.top = new preference(-1);",
"prefs.browser.main_window.show = new preference(1);",
"prefs.network = new pref_array(""prefs"");",
"prefs.network.tcpbufsize = new preference(32768);",
"prefs.network.tcpbufsize2 = new preference(true);",
"prefs.network.tcpbufsize2.user_value = true;",
"prefs.network.use_async_dns = new preference(true);",
"prefs.network.max_connections = new preference(4);",
"prefs.network.speed_over_ui = new preference(true);",
"prefs.network.hosts = new pref_array(""prefs.network"");",
"prefs.network.hosts.smtp_server = new preference(""mail"");",
"prefs.network.hosts.pop_server = new preference(""mail"");",
"prefs.network.hosts.nntp_server = new preference(""news"");",
"prefs.network.hosts.socks_server = new preference(null);",
"prefs.network.hosts.socks_serverport = new preference(1080);",
"prefs.network.hosts.socks_conf = new preference(null);",
"prefs.security = new pref_array(""prefs"");",
"prefs.security.enable_java = new preference(true);",
"prefs.security.enable_javascript = new preference(true);",
"prefs.security.password_lifetime = new preference(10);",
"prefs.security.ask_for_password = new preference(false);",
"prefs.security.use_password = new preference(true);",
"prefs.security.enable_ssl2 = new preference(true);",
"prefs.security.enable_ssl3 = new preference(true);",
"prefs.mail = new pref_array(""prefs"");",
"prefs.mail.use_imap = new preference(false);",
"prefs.mail.use_exchange = new preference(false);",
"prefs.mail.thread_mail = new preference(false);",
"prefs.mail.sort_mail = new preference(false);",
"prefs.mail.ascend_mail = new preference(false);",
"prefs.mail.leave_on_server = new preference(false);",
"prefs.mail.default_cc = new preference(null);",
"prefs.mail.show_headers = new preference(false);",
"prefs.mail.max_size = new preference(-1);",
"prefs.mail.check_time = new preference(10);",
"prefs.mail.pop_name = new preference(null);",
"prefs.mail.remember_password = new preference(false);",
"prefs.mail.pop_password = new preference(null);",
"prefs.mail.auto_quote = new preference(true);",
"prefs.mail.fixed_width_messages = new preference(true);",
"prefs.mail.quoted_style = new preference(2);",
"prefs.mail.quoted_size = new preference(0);",
"",
"function str_escape(inputVal) {",
" strRet = """";",
" for (i = 0 ; i < inputVal.length; i++) {",
" if (inputVal.charAt(i) == '\\\\') {",
" strRet = strRet + ""\\\\\\\\"";",
" }",
" else strRet = strRet + inputVal.charAt(i);",
" }",
" return strRet;",
"}",
"function save_uservals(obj, obj_name) { ",
" var result = """"; ",
" var bGroup = false; ",
" for (var i in obj) {",
" if (i == ""parent"") bGroup = true; ",
" if (i != ""parent"") {",
" if ((i == ""user_value"")) {",
" if ((isNumber(obj[i])) || (isBoolean(obj[i])))",
" result += obj_name + ""."" + i + "" = "" + obj[i] + "";\\n"";",
" else if (obj[i])",
" result += obj_name + ""."" + i + "" = \\"""" + str_escape(obj[i]) + ""\\"";\\n"";",
" }",
" if (bGroup) result += save_uservals(obj[i],obj_name + ""."" + i); ",
" }",
" }",
" return result; ",
"}"
END

View File

@@ -0,0 +1,520 @@
//* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
//*
//* The contents of this file are subject to the Netscape Public License
//* Version 1.0 (the "NPL"); you may not use this file except in
//* compliance with the NPL. You may obtain a copy of the NPL at
//* http://www.mozilla.org/NPL/
//*
//* Software distributed under the NPL is distributed on an "AS IS" basis,
//* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
//* for the specific language governing rights and limitations under the
//* NPL.
//*
//* The Initial Developer of this code under the NPL is Netscape
//* Communications Corporation. Portions created by Netscape are
//* Copyright (C) 1998 Netscape Communications Corporation. All Rights
//* Reserved.
//*
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "XP Preferences reflected via JavaScript\0"
VALUE "CompanyName", "Netscape Communications Corp. \0"
VALUE "FileDescription", "prefdll\0"
VALUE "FileVersion", "1.0.0.1\0"
VALUE "InternalName", "prefdll\0"
VALUE "LegalCopyright", "Copyright © 1996\0"
VALUE "OriginalFilename", "prefdll.dll\0"
VALUE "ProductName", "Netscape Communications Corp. prefdll\0"
VALUE "ProductVersion", "4.05\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_LOGIN_DIALOG DIALOG DISCARDABLE 0, 0, 270, 156
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Profile Manager"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "Start Communicator",IDOK,123,135,86,14
COMBOBOX IDC_PROFILES,101,83,138,80,CBS_DROPDOWNLIST |
CBS_OWNERDRAWVARIABLE | CBS_HASSTRINGS | WS_VSCROLL |
WS_GROUP | WS_TABSTOP
EDITTEXT IDC_PASSWORD,101,104,138,12,ES_PASSWORD | ES_AUTOHSCROLL |
WS_GROUP
PUSHBUTTON "Edit Profiles...",IDC_PROFILE_EDIT,7,135,71,14
PUSHBUTTON "Exit",IDCANCEL,213,135,50,14,WS_GROUP
LTEXT "If your personal profile doesn't exist on this machine, choosing\nGuest will prompt you for the name of your roaming server.",
IDC_STATIC,48,47,215,26
CONTROL "",IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,7,7,32,
32
CONTROL "Welcome to Communicator",IDC_STATIC,"Static",
SS_LEFTNOWORDWRAP | WS_GROUP,48,7,215,8
LTEXT "To access your personal profile, passwords, and certificates\nplease enter your profile name and password.",
IDC_STATIC,48,23,215,21
LTEXT "Profile Name",IDC_PROFILE_NAME,48,85,49,8
LTEXT "Password",IDC_PASSWORD_TEXT,48,106,32,8
END
IDD_NEWPROF_INTRO DIALOG DISCARDABLE 0, 0, 268, 154
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Creating a New Profile"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "CREATING A NEW PROFILE",IDC_INTRO_TITLE,7,7,173,10,NOT
WS_GROUP
LTEXT "Communicator stores information about your settings, preferences, bookmarks, and stored messages in your personal profile.",
IDC_INTRO1,7,22,254,17
LTEXT "If you are sharing this copy of Communicator with other users, you can use profiles to keep each user's information separate. To do this, each user should create his or her own profile and optionally protect it with a password.",
IDC_INTRO2,7,43,254,27
LTEXT "If you are the only person using this copy of Communicator, you must create at least one profile. If you would like, you can create multiple profiles for yourself to store different sets of settings and preferences.",
IDC_INTRO3,7,73,254,26
LTEXT "For example, you may want to have separate profiles for business and personal use.",
IDC_INTRO4,7,104,254,26
LTEXT "To begin creating your profile, click Next.",IDC_INTRO5,
7,136,254,11,NOT WS_GROUP
END
IDD_NEWPROF_NAME DIALOG DISCARDABLE 0, 0, 235, 156
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Name and Email"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "To begin creating a new profile, enter the name and email address for the person whose profile is being created.",
IDC_NAME_INTRO,7,7,221,21
LTEXT "This information will be saved in the preferences of the new profile.",
IDC_NAME_INTRO2,7,33,221,15
LTEXT "Full Name:",IDC_STATIC,7,54,34,8
EDITTEXT IDC_EDIT_NAME,7,66,120,14,ES_AUTOHSCROLL
LTEXT "(e.g. John Smith)",IDC_STATIC,134,68,54,8
LTEXT "Email Address (if available):",IDC_STATIC,7,94,86,8
EDITTEXT IDC_EDIT_ADDRESS,7,107,120,14,ES_AUTOHSCROLL
LTEXT "(e.g. jsmith@company.com)",IDC_STATIC,134,109,88,8
LTEXT "Please click Next to continue",IDC_STATIC,7,141,93,8
END
IDD_NEWPROF_DIRS DIALOG DISCARDABLE 0, 0, 235, 156
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Directory Setup"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "If you create several profiles, you will be able to tell them apart by their names. You may use the name provided here or enter a different one.",
IDC_NAME_INTRO,7,7,221,21
LTEXT "Profile Name:",IDC_STATIC,7,37,43,8
EDITTEXT IDC_EDIT_PROFILE,7,49,120,14,ES_AUTOHSCROLL
LTEXT "Your user settings, preferences, bookmarks, and stored messages will be kept in the directory given below. We recommend that you use the default directory already listed.",
IDC_STATIC,7,74,221,28
EDITTEXT IDC_EDIT_PROFILE_DIR,7,107,120,14,ES_AUTOHSCROLL
LTEXT "Please click Next to continue",IDC_STATIC,7,141,93,8
END
IDD_NEWPROF_SMTP DIALOG DISCARDABLE 0, 0, 235, 156
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Outgoing Mail Server Setup"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Communicator now has enough information to set up your basic profile. However, Communicator needs additional information if you want to send or receive email or use discussion groups.",
IDC_MAIL_INTRO1,7,7,221,29
LTEXT "If you do not know the information requested, please contact your system administrator or Internet Service Provider.",
IDC_STATIC,7,35,221,19
LTEXT "Click Finish if you want to start Communicator and continue entering your mail and discussion group information later.",
IDC_STATIC,7,131,221,18
LTEXT "Click Next to continue entering information.",
IDC_STATIC,7,120,221,8
EDITTEXT IDC_EDIT_SMTP_HOST,7,81,142,14,ES_AUTOHSCROLL
LTEXT "Outgoing mail (SMTP) server:",IDC_STATIC,7,68,93,8
END
IDD_NEWPROF_MSERVER DIALOG DISCARDABLE 0, 0, 235, 170
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Incoming Mail Server Setup"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "The information below is needed before you can receive mail. If you do not know the information requested, please contact your system administrator or Internet Service Provider.",
IDC_STATIC,7,7,221,26
LTEXT "Click Finish if you want to start Communicator and continue entering your mail and discussion group information later.",
IDC_STATIC,7,145,221,18
LTEXT "Click Next to continue entering information.",
IDC_STATIC,7,135,221,8
LTEXT "Incoming Mail Server:",IDC_STATIC,7,66,69,8
EDITTEXT IDC_EDIT_MAIL_SERVER,7,75,120,14,ES_AUTOHSCROLL
LTEXT "Mail server user name:",IDC_STATIC,7,37,72,8
EDITTEXT IDC_EDIT_MAIL_USER,7,46,120,14,ES_AUTOHSCROLL
LTEXT "(e.g. jsmith)",IDC_STATIC,134,48,36,8
LTEXT "Mail Server type:",IDC_STATIC,7,97,54,8
CONTROL "&POP3",IDC_RADIO_POP,"Button",BS_AUTORADIOBUTTON,7,107,
35,10
CONTROL "&IMAP",IDC_RADIO_IMAP,"Button",BS_AUTORADIOBUTTON,7,119,
33,10
END
IDD_NEWPROF_NNTP DIALOG DISCARDABLE 0, 0, 234, 170
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Discussion Groups Server"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "The information below is needed before you can read discussion groups. If you do not know the information requested, please contact your system administrator or Internet Service Provider.",
IDC_STATIC,7,7,220,26
LTEXT "Click Finish to start Communicator using your new profile.",
IDC_STATIC,7,154,220,9
LTEXT "&Port:",IDC_STATIC,7,67,16,8
EDITTEXT IDC_EDIT_NEWS_PORT,26,64,38,14,ES_AUTOHSCROLL |
ES_NUMBER
LTEXT "&News (NNTP) server:",IDC_STATIC,7,37,68,8
EDITTEXT IDC_EDIT_NEWS_SERVER,7,46,110,14,ES_AUTOHSCROLL
CONTROL "&Secure",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,74,66,41,10
END
IDD_NEWPROF_NETNAME DIALOG DISCARDABLE 0, 0, 235, 156
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Name and Email"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "To create a new profile, enter your name and email address. This information will be saved in the preferences of the new profile.",
IDC_NAME_INTRO,7,7,221,19
LTEXT "Your profile will be called ""[profname]"".",
IDC_NAME_INTRO2,7,30,221,15
LTEXT "Full Name:",IDC_STATIC,7,54,34,8
EDITTEXT IDC_EDIT_NAME,7,66,120,14,ES_AUTOHSCROLL
LTEXT "(e.g. John Smith)",IDC_STATIC,134,68,54,8
LTEXT "Email Address (if available):",IDC_STATIC,7,94,86,8
EDITTEXT IDC_EDIT_ADDRESS,7,107,120,14,ES_AUTOHSCROLL
LTEXT "(e.g. jsmith@company.com)",IDC_STATIC,134,109,88,8
LTEXT "Please click Finish to create your profile and start Communicator.",
IDC_STATIC,7,141,221,8
END
IDD_NEWPROF_NETINTRO DIALOG DISCARDABLE 0, 0, 250, 186
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Creating a New Profile"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "CREATING A NEW PROFILE",IDC_INTRO_TITLE,7,7,173,10,NOT
WS_GROUP
LTEXT "Communicator stores information about your settings, preferences, bookmarks, and stored messages in your personal profile.",
IDC_INTRO1,7,22,236,22
LTEXT "If you like, you can create multiple profiles to store different sets of settings and preferences; for example, you may want to have separate profiles for business and personal use, or a profile for use while you are travelling.",
IDC_INTRO2,7,44,236,35,NOT WS_VISIBLE
LTEXT "To begin creating your profile, click Next.",IDC_INTRO4,
7,168,196,11,NOT WS_GROUP
END
IDD_LOGIN_GUEST DIALOG DISCARDABLE 0, 0, 241, 318
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Guest Login"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "Login",IDOK,131,298,50,14
PUSHBUTTON "Cancel",IDCANCEL,186,298,50,14
EDITTEXT IDC_EDIT_NAME,67,56,153,13,ES_AUTOHSCROLL | WS_GROUP
EDITTEXT IDC_PASSWORD,67,72,153,13,ES_PASSWORD | ES_AUTOHSCROLL
LTEXT "Please enter your login information to retrieve your networked profile. You may also choose to store your remote profile information on this computer for easy access the next time you log in.",
IDC_GUEST_INTRO,7,7,227,28
GROUPBOX "User Information",IDC_STATIC,7,40,227,71
LTEXT "User Name:",IDC_STATIC,14,59,43,8
LTEXT "Password:",IDC_STATIC,14,75,34,8
PUSHBUTTON "Advanced >>",IDC_ADVANCED,7,117,50,14
CONTROL "Remember my login information",IDC_STORE_LOCAL,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,68,92,113,10
CONTROL "LDAP Server (Netscape Directory Server)",
IDC_LDAP_SERVER,"Button",BS_AUTORADIOBUTTON | NOT
WS_VISIBLE | WS_GROUP | WS_TABSTOP,17,130,165,10
CONTROL "HTTP Server (Netscape Enterprise Server)",
IDC_HTTP_SERVER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,
17,180,165,10
EDITTEXT IDC_LDAP_ADDRESS,89,144,114,13,ES_AUTOHSCROLL | WS_GROUP
EDITTEXT IDC_LDAP_SEARCHBASE,89,160,114,13,ES_AUTOHSCROLL |
WS_GROUP
EDITTEXT IDC_HTTP_ADDRESS,89,195,114,13,ES_AUTOHSCROLL
GROUPBOX "Server information",IDC_SERVER_INFO,7,114,227,101,NOT
WS_VISIBLE
LTEXT "Address:",IDC_STATIC,35,146,43,8
LTEXT "Search Base:",IDC_STATIC,35,162,45,8
LTEXT "Base URL:",IDC_STATIC,35,196,43,8
GROUPBOX "Files/File Groups",IDC_STATIC,7,220,227,72
CONTROL "Bookmarks",IDC_BOOKMARKS,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,27,235,81,10
CONTROL "Cookies",IDC_COOKIES,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,27,248,81,10
CONTROL "Mail Filters",IDC_FILTERS,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,27,261,81,10
CONTROL "Address Book",IDC_ADDBOOK,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,27,274,81,10
CONTROL "User Preferences",IDC_SUGGESTIONS,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,127,235,81,10
CONTROL "History",IDC_HISTORY,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,127,248,81,10
CONTROL "Java Security",IDC_JAVA,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,127,261,81,10
CONTROL "Certificates",IDC_SECURITY_TYPE,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,127,274,81,10
END
IDD_NEWPROF_REMOTEINTRO DIALOG DISCARDABLE 0, 0, 268, 188
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Creating a New Profile"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "CREATING A NEW PROFILE",IDC_INTRO_TITLE,7,7,173,10,NOT
WS_GROUP
LTEXT "Communicator stores information about your settings, preferences, bookmarks, and stored messages in your personal profile.",
IDC_INTRO1,7,22,254,17
LTEXT "Because you are using a remote profile, your can access your profile information from other computers. However, if you use this computer often, Communicator can store some of your profile information on this computer.",
IDC_INTRO2,7,43,254,27
LTEXT "Storing your profile information on this computer will make it more convenient to log in to your remote profile and will allow you to access your remote profile while your are offline or not connected to a network.",
IDC_INTRO3,7,73,254,26
LTEXT "To begin creating your profile, click Next.",IDC_INTRO5,
7,170,254,11,NOT WS_GROUP
END
IDD_UPDATE_STATUS DIALOG DISCARDABLE 0, 0, 250, 74
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Updating files to new profile directory..."
FONT 8, "MS Sans Serif"
BEGIN
CTEXT "",IDC_FILENAME_AREA,11,17,230,13
RTEXT "Category",IDC_CATEGORY,167,6,66,9
CTEXT "Note: If you have large mail or news folders, some of these operations may take a while. Please be patient.",
IDC_TEXT1,19,54,208,19
END
IDD_NEWPROF_COUNTRY DIALOG DISCARDABLE 0, 0, 235, 156
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Country Selection"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Click Finish to start Communicator using your new profile.",
IDC_STATIC,7,140,220,9
LTEXT "Communicator can preset content depending on what country you live in. Please chose your country from the choices below:",
IDC_STATIC,7,7,215,24
COMBOBOX IDC_COUNTRY,50,47,155,30,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Country:",IDC_STATIC,7,51,27,8
END
IDD_PROF_PWONLY DIALOG DISCARDABLE 0, 0, 188, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Profile Password"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,77,74,50,14
PUSHBUTTON "Exit",IDCANCEL,131,74,50,14
EDITTEXT IDC_PASSWORD,48,39,132,14,ES_PASSWORD | ES_AUTOHSCROLL
LTEXT "Password:",IDC_STATIC,7,41,34,8
LTEXT "Please enter the password for this profile or choose Exit to exit Communicator.",
IDC_STATIC,7,7,174,18
END
IDD_LOGIN_PROFMGR DIALOG DISCARDABLE 0, 0, 247, 185
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Profile Manager"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "Return to Communicator",IDOK,99,164,86,14
PUSHBUTTON "Cancel",IDCANCEL,190,164,50,14
LISTBOX IDC_LIST1,7,78,162,73,LBS_SORT | LBS_OWNERDRAWVARIABLE |
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_TABSTOP
PUSHBUTTON "New...",IDC_NEW,179,79,61,14
PUSHBUTTON "Rename...",IDC_RENAME,179,96,61,14,WS_DISABLED
PUSHBUTTON "Delete...",IDC_DELETE,179,130,61,14
PUSHBUTTON "Change Password",IDC_EDIT_PW,179,113,61,14,WS_DISABLED
LTEXT "Communicator stores information about your settings, preferences, bookmarks, and stored messages in your personal profile.",
IDC_STATIC,7,7,233,16
LTEXT "Click New to create a new profile, or select a profile and click the appropriate button to rename, delete, or change its pasword.",
IDC_STATIC,7,26,233,17
LTEXT "When you are finished, click Return to Communicator to select a profile and start Communicator.",
IDC_STATIC,7,49,233,19
END
IDD_NEWPROF_UPGRADE DIALOG DISCARDABLE 0, 0, 237, 157
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Creating a New Profile"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "An older version of Netscape Navigator was found on your machine. Would you like to move or copy your existing user files into your profile directory, or would you like to ignore your existing files?",
IDC_STATIC,7,7,220,30
CONTROL "Move my existing user files to the new profile directory.",
IDC_RADIO_MOVE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,32,
40,195,11
CONTROL "Copy my existing user files to the new profile directory.",
IDC_RADIO_COPY,"Button",BS_AUTORADIOBUTTON,32,73,179,12
CONTROL "Ignore my existing files. Create a new profile from scratch.",
IDC_RADIO_NEWPROFILE,"Button",BS_AUTORADIOBUTTON,31,111,
199,11
LTEXT "This will allow both Netscape Communicator and any older versions of the software to share the files. ",
IDC_STATIC,46,53,176,18
LTEXT "Requires additonal disk space and changes will diverge between the two copies.",
IDC_STATIC,46,87,161,18
LTEXT "Click Finish to move/copy files and start Communicator.",
IDC_FINISHTEXT,7,142,223,8,NOT WS_VISIBLE
LTEXT "Click Next to create a new profile.",IDC_NEXTTEXT,7,142,
223,8,NOT WS_VISIBLE
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_HEAD_BITMAP BITMAP DISCARDABLE "head.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_PROF_PWONLY, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 181
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
IDD_LOGIN_PROFMGR, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 240
TOPMARGIN, 7
BOTTOMMARGIN, 178
END
IDD_NEWPROF_UPGRADE, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 230
TOPMARGIN, 7
BOTTOMMARGIN, 150
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_INSUFFICIENT_DISKSPACE_COPY
"Insufficient disk space!\n\nUnable to copy %s:\n %s\nto directory:\n %s\n\nPlease free up %s MB of disk space and then press O.K.\n\nIf you press Cancel, this directory will not get copied and you will not be able to access your old data files."
IDS_INSUFFICIENT_DISKSPACE_MOVE
"Insufficient disk space!\n\nUnable to move %s:\n %s\nto directory:\n %s\n\nPlease free up %s MB of disk space and then press O.K.\n\nIf you press Cancel, this directory will not get moved and you will not be able to access your old data files."
IDS_UNABLETRANSFER_SUBDIR
"""Unable to copy %s.\n\nDestination directory is a subdirectory of the source directory."""
IDS_MAIL_DIR "Mail directory"
IDS_NEWS_DIR "News directory"
IDS_CACHE_DIR "Cache directory"
IDS_COPYING_FILE "Copying file: "
IDS_MOVING_FILE "Moving file: "
IDS_GENERAL_FILES "General Files"
IDS_SECURITY_FILES "Security Files"
IDS_NETWORK_FILES "Network Files"
IDS_DEFAULT_FILES "Default Files"
IDS_DELETING_PROFILE "Deleting a profile will remove the item from your Communicator login and can not be undone. If you proceed with the deletion, you may also choose to have Communicator delete your data files, including your saved mail and certificates. Would you like to delete your profile? (For now, choose Yes to delete the profile and files, no for the profile but to leave the files, and Cancel to not delete)."
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,123 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by prefdll.rc
//
#define IDS_INSUFFICIENT_DISKSPACE_COPY 1
#define IDS_INSUFFICIENT_DISKSPACE_MOVE 2
#define IDS_UNABLETRANSFER_SUBDIR 3
#define IDS_MAIL_DIR 4
#define IDS_NEWS_DIR 5
#define IDS_CACHE_DIR 6
#define IDS_COPYING_FILE 7
#define IDS_MOVING_FILE 8
#define IDS_GENERAL_FILES 9
#define IDS_SECURITY_FILES 10
#define IDS_NETWORK_FILES 11
#define IDS_DEFAULT_FILES 12
#define IDS_DELETING_PROFILE 13
#define IDB_HEAD_BITMAP 102
#define IDC_PROFILE_EDIT 1000
#define IDC_PASSWORD 1001
#define IDC_PROFILES 1002
#define IDC_PROFILE_NAME 1003
#define IDC_COMBO1 1004
#define IDC_PASSWORD_TEXT 1004
#define IDC_INTRO_TITLE 1007
#define IDC_INTRO1 1008
#define IDC_INTRO2 1009
#define IDC_INTRO3 1010
#define IDC_INTRO4 1011
#define IDC_INTRO5 1012
#define IDC_NAME_INTRO 1013
#define IDC_NAME_INTRO2 1014
#define IDC_EDIT_NAME 1015
#define IDC_EDIT_ADDRESS 1016
#define IDC_EDIT_PROFILE 1017
#define IDC_EDIT_PROFILE_DIR 1018
#define IDC_MAIL_INTRO1 1019
#define IDC_EDIT_MAIL_USER 1020
#define IDC_EDIT_SMTP_HOST 1021
#define IDC_EDIT_MAIL_SERVER 1022
#define IDC_RADIO_POP 1023
#define IDC_RADIO_IMAP 1024
#define IDC_EDIT_NEWS_SERVER 1025
#define IDC_EDIT_NEWS_PORT 1026
#define IDC_CHECK1 1027
#define IDC_GUEST_INTRO 1028
#define IDC_STORE_LOCAL 1029
#define IDC_SERVER_INFO 1030
#define IDC_LDAP_SERVER 1031
#define IDC_LDAP_ADDRESS 1032
#define IDC_LDAP_SEARCHBASE 1033
#define IDC_HTTP_SERVER 1034
#define IDC_LIST1 1034
#define IDC_HTTP_ADDRESS 1035
#define IDC_NEW 1035
#define IDC_BOOKMARKS 1036
#define IDC_RENAME 1036
#define IDC_COOKIES 1037
#define IDC_DELETE 1037
#define IDC_FILTERS 1038
#define IDC_EDIT_PW 1038
#define IDC_ADDBOOK 1039
#define IDC_SELECTEDBOOKMARKS 1040
#define IDC_SUGGESTIONS 1041
#define IDC_JAVA 1042
#define IDC_SECURITY_TYPE 1043
#define IDC_ADVANCED 1044
#define IDC_FILENAME_AREA 1045
#define IDC_CATEGORY 1046
#define IDC_TEXT1 1048
#define IDC_COUNTRY 1049
#define IDC_NEXTTEXT 1050
#define IDC_FINISHTEXT 1051
#define IDC_HISTORY 1052
#define IDC_RADIO_COPY 1450
#define IDC_RADIO_NEWPROFILE 1451
#define IDC_RADIO_MOVE 1452
#define IDD_LOGIN_DIALOG 3101
#define IDD_NEWPROF_INTRO 3106
#define IDD_NEWPROF_NAME 3107
#define IDD_NEWPROF_DIRS 3108
#define IDD_NEWPROF_SMTP 3109
#define IDD_NEWPROF_MSERVER 3110
#define IDD_NEWPROF_NNTP 3111
#define IDD_NEWPROF_NETINTRO 3112
#define IDD_NEWPROF_NETNAME 3113
#define IDD_LOGIN_GUEST 3114
#define IDD_NEWPROF_REMOTEINTRO 3115
#define IDD_PROFILE_UPGRADE_STATUS 3116
#define IDD_UPDATE_STATUS 3116
#define IDD_NEWPROF_COUNTRY 3117
#define IDD_PROF_PWONLY 3118
#define IDD_LOGIN_PROFMGR 3119
#define IDD_NEWPROF_UPGRADE 3120
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 3121
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 109
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,72 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "mochaapi.h"
#include "mochalib.h"
#include "xp_core.h"
#include "xp_mcom.h"
#include "prefapi.h"
extern MochaContext * m_mochaContext;
extern MochaObject * m_mochaPrefObject;
int pref_InitInitialObjects() {
MochaBoolean ok;
MochaDatum result;
HRSRC hFound;
HGLOBAL hRes;
char * lpBuff = NULL;
XP_File fp;
XP_StatStruct stats;
long fileLength;
#ifdef FROM_RES
hFound = FindResource(m_hInstance, "init_prefs", RT_RCDATA);
hRes = LoadResource(m_hInstance, hFound);
lpBuff = (char *)LockResource(hRes);
ok = MOCHA_EvaluateBuffer(m_mochaContext,m_mochaPrefObject,
lpBuff, strlen(lpBuff), NULL, 0,
&result);
#else
_stat("c:\\dog\\initprefs", &stats);
fileLength = stats.st_size;
fp = fopen("c:\\dog\\initprefs", "r");
if (fp) {
char* readBuf = (char *) malloc(fileLength * sizeof(char));
if (readBuf) {
fileLength = XP_FileRead(readBuf, fileLength, fp);
ok = MOCHA_EvaluateBuffer(m_mochaContext,m_mochaPrefObject,
readBuf, fileLength, NULL, 0, &result);
free(readBuf);
XP_FileClose(fp);
}
}
#endif
return TRUE;
}
char *EncodeBase64Buffer(char *subject, long size) {
return NULL;
}
char *DecodeBase64Buffer(char *subject) {
return NULL;
}

View File

@@ -0,0 +1,154 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
platform.windows = true;
pref("browser.bookmark_window_showwindow", 1); // SW_NORMAL
pref("mailnews.folder_window_showwindow", 1); // SW_NORMAL
pref("mailnews.thread_window_showwindow", 1); // SW_NORMAL
pref("mailnews.message_window_showwindow", 1); // SW_NORMAL
pref("browser.bookmark_columns_win", "");
pref("mailnews.folder_columns_win", "");
pref("mail.thread_columns_win", "");
pref("news.thread_columns_win", "");
pref("category.thread_columns_win", "");
pref("news.category_columns_win", "");
pref("custtoolbar.personal_toolbar_folder", "x234htz7");
pref("custtoolbar.has_toolbar_folder", true);
pref("custtoolbar.personal_toolbar.Version", "");
pref("custtoolbar.Browser.Navigation_Toolbar.position", 0);
pref("custtoolbar.Browser.Navigation_Toolbar.showing", true);
pref("custtoolbar.Browser.Navigation_Toolbar.open", true);
pref("custtoolbar.Browser.Location_Toolbar.position", 1);
pref("custtoolbar.Browser.Location_Toolbar.showing", true);
pref("custtoolbar.Browser.Location_Toolbar.open", true);
pref("custtoolbar.Browser.Personal_Toolbar.position", 2);
pref("custtoolbar.Browser.Personal_Toolbar.showing", true);
pref("custtoolbar.Browser.Personal_Toolbar.open", true);
pref("custtoolbar.Messenger.Navigation_Toolbar.position", 0);
pref("custtoolbar.Messenger.Navigation_Toolbar.showing", true);
pref("custtoolbar.Messenger.Navigation_Toolbar.open", true);
pref("custtoolbar.Messenger.Location_Toolbar.position", 1);
pref("custtoolbar.Messenger.Location_Toolbar.showing", true);
pref("custtoolbar.Messenger.Location_Toolbar.open", true);
pref("custtoolbar.Messages.Navigation_Toolbar.position", 0);
pref("custtoolbar.Messages.Navigation_Toolbar.showing", true);
pref("custtoolbar.Messages.Navigation_Toolbar.open", true);
pref("custtoolbar.Messages.Location_Toolbar.position", 1);
pref("custtoolbar.Messages.Location_Toolbar.showing", true);
pref("custtoolbar.Messages.Location_Toolbar.open", true);
pref("custtoolbar.Folders.Navigation_Toolbar.position", 0);
pref("custtoolbar.Folders.Navigation_Toolbar.showing", true);
pref("custtoolbar.Folders.Navigation_Toolbar.open", true);
pref("custtoolbar.Folders.Location_Toolbar.position", 1);
pref("custtoolbar.Folders.Location_Toolbar.showing", true);
pref("custtoolbar.Folders.Location_Toolbar.open", true);
pref("custtoolbar.Address_Book.Address_Book_Toolbar.position", 0);
pref("custtoolbar.Address_Book.Address_Book_Toolbar.showing", true);
pref("custtoolbar.Address_Book.Address_Book_Toolbar.open", true);
pref("custtoolbar.Compose_Message.Message_Toolbar.position", 0);
pref("custtoolbar.Compose_Message.Message_Toolbar.showing", true);
pref("custtoolbar.Compose_Message.Message_Toolbar.open", true);
pref("custtoolbar.Composer.Composition_Toolbar.position", 0);
pref("custtoolbar.Composer.Composition_Toolbar.showing", true);
pref("custtoolbar.Composer.Composition_Toolbar.open", true);
pref("custtoolbar.Composer.Formatting_Toolbar.position", 1);
pref("custtoolbar.Composer.Formatting_Toolbar.showing", true);
pref("custtoolbar.Composer.Formatting_Toolbar.open", true);
pref("intl.font2.win.mimecharset", "iso-8859-1");
pref("intl.font2.win.prop_font", "Times New Roman");
pref("intl.font2.win.prop_size", 12);
pref("intl.font2.win.fixed_font", "Courier New");
pref("intl.font2.win.fixed_size", 10);
pref("intl.font260.win.mimecharset", "Shift_JIS");
pref("intl.font260.win.prop_font", "Times New Roman");
pref("intl.font260.win.prop_size", 10);
pref("intl.font260.win.fixed_font", "Courier New");
pref("intl.font260.win.fixed_size", 10);
pref("intl.font263.win.mimecharset", "big5");
pref("intl.font263.win.prop_font", "Times New Roman");
pref("intl.font263.win.prop_size", 12);
pref("intl.font263.win.fixed_font", "Courier New");
pref("intl.font263.win.fixed_size", 10);
pref("intl.font1292.win.mimecharset", "euc-kr");
pref("intl.font1292.win.prop_font", "Times New Roman");
pref("intl.font1292.win.prop_size", 12);
pref("intl.font1292.win.fixed_font", "Courier New");
pref("intl.font1292.win.fixed_size", 10);
pref("intl.font264.win.mimecharset", "gb2312");
pref("intl.font264.win.prop_font", "Times New Roman");
pref("intl.font264.win.prop_size", 12);
pref("intl.font264.win.fixed_font", "Courier New");
pref("intl.font264.win.fixed_size", 10);
pref("intl.font44.win.mimecharset", "windows-1250");
pref("intl.font44.win.prop_font", "Times New Roman");
pref("intl.font44.win.prop_size", 12);
pref("intl.font44.win.fixed_font", "Courier New");
pref("intl.font44.win.fixed_size", 10);
pref("intl.font41.win.mimecharset", "windows-1251");
pref("intl.font41.win.prop_font", "Times New Roman");
pref("intl.font41.win.prop_size", 12);
pref("intl.font41.win.fixed_font", "Courier New");
pref("intl.font41.win.fixed_size", 10);
pref("intl.font43.win.mimecharset", "windows-1253");
pref("intl.font43.win.prop_font", "Times New Roman");
pref("intl.font43.win.prop_size", 12);
pref("intl.font43.win.fixed_font", "Courier New");
pref("intl.font43.win.fixed_size", 10);
pref("intl.font20.win.mimecharset", "iso-8859-9");
pref("intl.font20.win.prop_font", "Times New Roman");
pref("intl.font20.win.prop_size", 12);
pref("intl.font20.win.fixed_font", "Courier New");
pref("intl.font20.win.fixed_size", 10);
pref("intl.font290.win.mimecharset", "utf-8");
pref("intl.font290.win.prop_font", "Times New Roman");
pref("intl.font290.win.prop_size", 12);
pref("intl.font290.win.fixed_font", "Courier New");
pref("intl.font290.win.fixed_size", 10);
pref("intl.font254.win.mimecharset", "x-user-defined");
pref("intl.font254.win.prop_font", "Times New Roman");
pref("intl.font254.win.prop_size", 12);
pref("intl.font254.win.fixed_font", "Courier New");
pref("intl.font254.win.fixed_size", 10);
pref("taskbar.x", -1);
pref("taskbar.y", -1);
pref("taskbar.floating", true);
pref("taskbar.horizontal", false);
pref("taskbar.ontop", true);
pref("taskbar.button_style", -1);
pref("netinst.profile.show_profile_wizard", true);
//The following pref is internal to Communicator. Please
//do *not* place it in the docs...
pref("netinst.profile.show_dir_overwrite_msg", true);

View File

@@ -0,0 +1,97 @@
; -*- Mode: Fundamental; tab-width: 4; indent-tabs-mode: nil -*-
;
; The contents of this file are subject to the Netscape Public License
; Version 1.0 (the "NPL"); you may not use this file except in
; compliance with the NPL. You may obtain a copy of the NPL at
; http://www.mozilla.org/NPL/
;
; Software distributed under the NPL is distributed on an "AS IS" basis,
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
; for the specific language governing rights and limitations under the
; NPL.
;
; The Initial Developer of this code under the NPL is Netscape
; Communications Corporation. Portions created by Netscape are
; Copyright (C) 1998 Netscape Communications Corporation. All Rights
; Reserved.
LIBRARY XPPREF32 INITINSTANCE TERMINSTANCE
PROTMODE
DESCRIPTION 'Netscape 32-bit XP Preferences Library'
CODE LOADONCALL MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE SINGLE NONSHARED
EXPORTS
PREF_ReadUserJSFile
PREF_Init
PREF_GetConfigContext
PREF_GetGlobalConfigObject
PREF_GetPrefConfigObject
PREF_Cleanup
PREF_ReadLockFile
PREF_EvaluateJSBuffer
PREF_QuietEvaluateJSBuffer
PREF_QuietEvaluateJSBufferWithGlobalScope
PREF_SetCharPref
PREF_SetIntPref
PREF_SetBoolPref
PREF_SetBinaryPref
PREF_SetColorPref
PREF_SetColorPrefDWord
PREF_SetRectPref
PREF_SetDefaultCharPref
PREF_SetDefaultIntPref
PREF_SetDefaultBoolPref
PREF_SetDefaultBinaryPref
PREF_SetDefaultColorPref
PREF_SetDefaultRectPref
PREF_SavePrefFile
PREF_SavePrefFileAs
PREF_GetCharPref
PREF_CopyCharPref
PREF_GetIntPref
PREF_GetBoolPref
PREF_GetColorPref
PREF_GetColorPrefDWord
PREF_GetRectPref
PREF_GetBinaryPref
PREF_CopyBinaryPref
PREF_CopyPathPref
PREF_SetPathPref
PREF_GetDefaultCharPref
PREF_CopyDefaultCharPref
PREF_GetDefaultIntPref
PREF_GetDefaultBoolPref
PREF_GetDefaultBinaryPref
PREF_GetDefaultColorPref
PREF_GetDefaultColorPrefDWord
PREF_GetDefaultRectPref
PREF_DeleteBranch
PREF_GetConfigString
PREF_CopyConfigString
PREF_CopyIndexConfigString
PREF_GetConfigInt
PREF_GetConfigBool
PREF_PrefIsLocked
PREF_AboutConfig
PREF_CreateChildList
PREF_NextChild
PREF_RegisterCallback
PREF_UnregisterCallback
PREF_IsAutoAdminEnabled
;new GA added routines DSR070297
PREF_EvaluateConfigScript

View File

@@ -0,0 +1,107 @@
; -*- Mode: Fundamental; tab-width: 4; indent-tabs-mode: nil -*-
;
; The contents of this file are subject to the Netscape Public License
; Version 1.0 (the "NPL"); you may not use this file except in
; compliance with the NPL. You may obtain a copy of the NPL at
; http://www.mozilla.org/NPL/
;
; Software distributed under the NPL is distributed on an "AS IS" basis,
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
; for the specific language governing rights and limitations under the
; NPL.
;
; The Initial Developer of this code under the NPL is Netscape
; Communications Corporation. Portions created by Netscape are
; Copyright (C) 1998 Netscape Communications Corporation. All Rights
; Reserved.
LIBRARY XPPREF16.DLL
EXETYPE WINDOWS
PROTMODE
DESCRIPTION 'Netscape 16-bit XP Preferences Library'
CODE LOADONCALL MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE SINGLE
HEAPSIZE 8192
IMPORTS
_sscanf = nspr21.33
EXPORTS
_PREF_Init = _PREF_Init
_PREF_ReadLockFile
_PREF_EvaluateJSBuffer
_PREF_QuietEvaluateJSBuffer
_PREF_SetCharPref
_PREF_SetIntPref
_PREF_SetBoolPref
_PREF_SetBinaryPref
_PREF_SetColorPref
_PREF_SetColorPrefDWord
_PREF_SetRectPref
_PREF_SetDefaultCharPref
_PREF_SetDefaultIntPref
_PREF_SetDefaultBoolPref
_PREF_SetDefaultBinaryPref
_PREF_SetDefaultColorPref
_PREF_SetDefaultRectPref
_PREF_SavePrefFile
_PREF_SavePrefFileAs
_PREF_GetCharPref
_PREF_CopyCharPref
_PREF_GetIntPref
_PREF_GetBoolPref
_PREF_GetColorPref
_PREF_GetColorPrefDWord
_PREF_GetRectPref
_PREF_GetBinaryPref
_PREF_CopyBinaryPref
_PREF_GetDefaultCharPref
_PREF_CopyDefaultCharPref
_PREF_GetDefaultIntPref
_PREF_GetDefaultBoolPref
_PREF_GetDefaultBinaryPref
_PREF_GetDefaultColorPref
_PREF_GetDefaultColorPrefDWord
_PREF_GetDefaultRectPref
_PREF_DeleteBranch
_PREF_GetConfigString
_PREF_CopyConfigString
_PREF_CopyIndexConfigString
_PREF_GetConfigInt
_PREF_PrefIsLocked
_PREF_AboutConfig
_PREF_CreateChildList
_PREF_NextChild
_PREF_RegisterCallback
_PREF_GetGlobalConfigObject
_PREF_GetConfigContext
_PREF_Cleanup
_PREF_GetConfigBool
_PREF_ReadUserJSFile
_PREF_QuietEvaluateJSBufferWithGlobalScope
_PREF_GetPrefConfigObject
_PREF_GetPrefType
_pref_savePref

View File

@@ -0,0 +1,80 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/////////////////////////////////////////////////////////////////////////////
// Version stamp for this .DLL
#include <windows.h>
#include <ver.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4 // major, minor, release (alpha 1), build #
PRODUCTVERSION 4
FILEFLAGSMASK 0
FILEFLAGS 0 // final version
FILEOS VOS_DOS_WINDOWS16
FILETYPE VFT_DLL
FILESUBTYPE 0 // not used
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilingual
BEGIN
VALUE "CompanyName", "Netscape Communications Corporation\0"
VALUE "FileDescription", "Netscape 16-bit JavaScript Module\0"
VALUE "FileVersion", "4.0\0"
VALUE "InternalName", "JS1640\0"
VALUE "LegalCopyright", "Copyright Netscape Communications. 1994-96\0"
VALUE "LegalTrademarks", "Netscape, Mozilla\0"
VALUE "OriginalFilename","JS1640.DLL\0"
VALUE "ProductName", "NETSCAPE\0"
VALUE "ProductVersion", "4.0\0"
END
END
END

View File

@@ -0,0 +1,98 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
//Microsoft Developer Studio generated resource script.
//
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winver.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,0,0,0
PRODUCTVERSION 4,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x10004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "Netscape Communications Corporation\0"
VALUE "FileDescription", "Netscape 32-bit JavaScript Module\0"
VALUE "FileVersion", "4.0\0"
VALUE "InternalName", "JS3240\0"
VALUE "LegalCopyright", "Copyright Netscape Communications. 1994-96\0"
VALUE "LegalTrademarks", "Netscape, Mozilla\0"
VALUE "OriginalFilename", "js3240.dll\0"
VALUE "ProductName", "NETSCAPE\0"
VALUE "ProductVersion", "4.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""winver.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,107 @@
; -*- Mode: Fundamental; tab-width: 4; indent-tabs-mode: nil -*-
;
; The contents of this file are subject to the Netscape Public License
; Version 1.0 (the "NPL"); you may not use this file except in
; compliance with the NPL. You may obtain a copy of the NPL at
; http://www.mozilla.org/NPL/
;
; Software distributed under the NPL is distributed on an "AS IS" basis,
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
; for the specific language governing rights and limitations under the
; NPL.
;
; The Initial Developer of this code under the NPL is Netscape
; Communications Corporation. Portions created by Netscape are
; Copyright (C) 1998 Netscape Communications Corporation. All Rights
; Reserved.
LIBRARY XPPREF16.DLL
EXETYPE WINDOWS
PROTMODE
DESCRIPTION 'Netscape 16-bit XP Preferences Library'
CODE LOADONCALL MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE SINGLE
HEAPSIZE 8192
IMPORTS
_sscanf = nspr21.33
EXPORTS
_PREF_Init = _PREF_Init
_PREF_ReadLockFile
_PREF_EvaluateJSBuffer
_PREF_QuietEvaluateJSBuffer
_PREF_SetCharPref
_PREF_SetIntPref
_PREF_SetBoolPref
_PREF_SetBinaryPref
_PREF_SetColorPref
_PREF_SetColorPrefDWord
_PREF_SetRectPref
_PREF_SetDefaultCharPref
_PREF_SetDefaultIntPref
_PREF_SetDefaultBoolPref
_PREF_SetDefaultBinaryPref
_PREF_SetDefaultColorPref
_PREF_SetDefaultRectPref
_PREF_SavePrefFile
_PREF_SavePrefFileAs
_PREF_GetCharPref
_PREF_CopyCharPref
_PREF_GetIntPref
_PREF_GetBoolPref
_PREF_GetColorPref
_PREF_GetColorPrefDWord
_PREF_GetRectPref
_PREF_GetBinaryPref
_PREF_CopyBinaryPref
_PREF_GetDefaultCharPref
_PREF_CopyDefaultCharPref
_PREF_GetDefaultIntPref
_PREF_GetDefaultBoolPref
_PREF_GetDefaultBinaryPref
_PREF_GetDefaultColorPref
_PREF_GetDefaultColorPrefDWord
_PREF_GetDefaultRectPref
_PREF_DeleteBranch
_PREF_GetConfigString
_PREF_CopyConfigString
_PREF_CopyIndexConfigString
_PREF_GetConfigInt
_PREF_PrefIsLocked
_PREF_AboutConfig
_PREF_CreateChildList
_PREF_NextChild
_PREF_RegisterCallback
_PREF_GetGlobalConfigObject
_PREF_GetConfigContext
_PREF_Cleanup
_PREF_GetConfigBool
_PREF_ReadUserJSFile
_PREF_QuietEvaluateJSBufferWithGlobalScope
_PREF_GetPrefConfigObject
_PREF_GetPrefType
_pref_savePref

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

View File

@@ -1,97 +0,0 @@
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Myk Melez <myk@mozilla.org>
############################################################################
# Module Initialization
############################################################################
use diagnostics;
use strict;
package Attachment;
# This module requires that its caller have said "require CGI.pl" to import
# relevant functions from that script and its companion globals.pl.
############################################################################
# Functions
############################################################################
sub query
{
# Retrieves and returns an array of attachment records for a given bug.
# This data should be given to attachment/list.atml in an
# "attachments" variable.
my ($bugid) = @_;
my $in_editbugs = &::UserInGroup($::userid, "editbugs");
# Retrieve a list of attachments for this bug and write them into an array
# of hashes in which each hash represents a single attachment.
&::SendSQL("
SELECT attach_id, creation_ts, mimetype, description, ispatch,
isobsolete, submitter_id
FROM attachments WHERE bug_id = $bugid ORDER BY attach_id
");
my @attachments = ();
while (&::MoreSQLData()) {
my %a;
my $submitter_id;
($a{'attachid'}, $a{'date'}, $a{'contenttype'}, $a{'description'},
$a{'ispatch'}, $a{'isobsolete'}, $submitter_id) = &::FetchSQLData();
# Format the attachment's creation/modification date into a standard
# format (YYYY-MM-DD HH:MM)
if ($a{'date'} =~ /^(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) {
$a{'date'} = "$1-$2-$3 $4:$5";
}
# Retrieve a list of status flags that have been set on the attachment.
&::PushGlobalSQLState();
&::SendSQL("
SELECT name
FROM attachstatuses, attachstatusdefs
WHERE attach_id = $a{'attachid'}
AND attachstatuses.statusid = attachstatusdefs.id
ORDER BY sortkey
");
my @statuses = ();
while (&::MoreSQLData()) {
my ($status) = &::FetchSQLData();
push @statuses , $status;
}
$a{'statuses'} = \@statuses;
&::PopGlobalSQLState();
# We will display the edit link if the user can edit the attachment;
# ie the are the submitter, or they have canedit.
# Also show the link if the user is not logged in - in that cae,
# They'll be prompted later
$a{'canedit'} = ($::userid == 0 || $submitter_id == $::userid ||
$in_editbugs);
push @attachments, \%a;
}
return \@attachments;
}
1;

View File

@@ -1,525 +0,0 @@
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Dawn Endico <endico@mozilla.org>
# Terry Weissman <terry@mozilla.org>
# Chris Yeh <cyeh@bluemartini.com>
use diagnostics;
use strict;
use DBI;
use RelationSet;
use vars qw($unconfirmedstate $legal_keywords);
require "globals.pl";
require "CGI.pl";
package Bug;
use CGI::Carp qw(fatalsToBrowser);
my %ok_field;
for my $key (qw (bug_id product version rep_platform op_sys bug_status
resolution priority bug_severity component assigned_to
reporter bug_file_loc short_desc target_milestone
qa_contact status_whiteboard creation_ts
delta_ts votes whoid comment query error) ){
$ok_field{$key}++;
}
# create a new empty bug
#
sub new {
my $type = shift();
my %bug;
# create a ref to an empty hash and bless it
#
my $self = {%bug};
bless $self, $type;
# construct from a hash containing a bug's info
#
if ($#_ == 1) {
$self->initBug(@_);
} else {
confess("invalid number of arguments \($#_\)($_)");
}
# bless as a Bug
#
return $self;
}
# dump info about bug into hash unless user doesn't have permission
# user_id 0 is used when person is not logged in.
#
sub initBug {
my $self = shift();
my ($bug_id, $user_id) = (@_);
my $old_bug_id = $bug_id;
if ((! defined $bug_id) || (!$bug_id) || (!&::detaint_natural($bug_id))) {
# no bug number given
$self->{'bug_id'} = $old_bug_id;
$self->{'error'} = "InvalidBugId";
return $self;
}
# default userid 0, or get DBID if you used an email address
unless (defined $user_id) {
$user_id = 0;
}
else {
if ($user_id =~ /^\@/) {
$user_id = &::DBname_to_id($user_id);
}
}
&::ConnectToDatabase();
&::GetVersionTable();
# this verification should already have been done by caller
# my $loginok = quietly_check_login();
$self->{'whoid'} = $user_id;
# First check that we can see it
if (!&::CanSeeBug($bug_id, $user_id)) {
# is it not there, or are we just forbidden to see it?
&::SendSQL("SELECT bug_id FROM bugs WHERE bug_id = $bug_id");
if (&::FetchSQLData()) {
$self->{'error'} = "NotPermitted";
} else {
$self->{'error'} = "NotFound";
}
$self->{'bug_id'} = $bug_id;
return $self;
}
my $query = "";
if ($::driver eq 'mysql') {
$query = "
select
bugs.bug_id, product, version, rep_platform, op_sys, bug_status,
resolution, priority, bug_severity, component, assigned_to, reporter,
bug_file_loc, short_desc, target_milestone, qa_contact,
status_whiteboard, date_format(creation_ts,'%Y-%m-%d %H:%i'),
delta_ts, sum(votes.count)
from bugs left join votes using(bug_id)
where bugs.bug_id = $bug_id
group by bugs.bug_id";
} elsif ($::driver eq 'Pg') {
$query = "
select
bugs.bug_id, product, version, rep_platform, op_sys, bug_status,
resolution, priority, bug_severity, component, assigned_to, reporter,
bug_file_loc, short_desc, target_milestone, qa_contact,
status_whiteboard, creation_ts,
delta_ts, sum(votes.count)
from bugs left join votes using(bug_id)
where bugs.bug_id = $bug_id
group by bugs.bug_id, product, version, rep_platform, op_sys, bug_status,
resolution, priority, bug_severity, component, assigned_to, reporter,
bug_file_loc, short_desc, target_milestone, qa_contact, status_whiteboard,
creation_ts, delta_ts";
}
&::SendSQL($query);
my @row;
@row = &::FetchSQLData();
my $count = 0;
my %fields;
foreach my $field ("bug_id", "product", "version", "rep_platform",
"op_sys", "bug_status", "resolution", "priority",
"bug_severity", "component", "assigned_to", "reporter",
"bug_file_loc", "short_desc", "target_milestone",
"qa_contact", "status_whiteboard", "creation_ts",
"delta_ts", "votes") {
$fields{$field} = shift @row;
if ($fields{$field}) {
$self->{$field} = $fields{$field};
}
$count++;
}
$self->{'assigned_to'} = &::DBID_to_name($self->{'assigned_to'});
$self->{'reporter'} = &::DBID_to_name($self->{'reporter'});
my $ccSet = new RelationSet;
$ccSet->mergeFromDB("select who from cc where bug_id=$bug_id");
my @cc = $ccSet->toArrayOfStrings();
if (@cc) {
$self->{'cc'} = \@cc;
}
if (&::Param("useqacontact") && (defined $self->{'qa_contact'}) ) {
my $name = $self->{'qa_contact'} > 0 ? &::DBID_to_name($self->{'qa_contact'}) :"";
if ($name) {
$self->{'qa_contact'} = $name;
}
}
if (@::legal_keywords) {
&::SendSQL("SELECT keyworddefs.name
FROM keyworddefs, keywords
WHERE keywords.bug_id = $bug_id
AND keyworddefs.id = keywords.keywordid
ORDER BY keyworddefs.name");
my @list;
while (&::MoreSQLData()) {
push(@list, &::FetchOneColumn());
}
if (@list) {
$self->{'keywords'} = join(', ', @list);
}
}
&::SendSQL("select attach_id, creation_ts, description
from attachments
where bug_id = $bug_id");
my @attachments;
while (&::MoreSQLData()) {
my ($attachid, $date, $desc) = (&::FetchSQLData());
if ($date =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) {
$date = "$3/$4/$2 $5:$6";
my %attach;
$attach{'attachid'} = $attachid;
$attach{'date'} = $date;
$attach{'desc'} = $desc;
push @attachments, \%attach;
}
}
if (@attachments) {
$self->{'attachments'} = \@attachments;
}
&::SendSQL("select bug_id, who, bug_when, thetext
from longdescs
where bug_id = $bug_id");
my @longdescs;
while (&::MoreSQLData()) {
my ($bug_id, $who, $bug_when, $thetext) = (&::FetchSQLData());
my %longdesc;
$longdesc{'who'} = $who;
$longdesc{'bug_when'} = $bug_when;
$longdesc{'thetext'} = $thetext;
push @longdescs, \%longdesc;
}
if (@longdescs) {
$self->{'longdescs'} = \@longdescs;
}
if (&::Param("usedependencies")) {
my @depends = EmitDependList("blocked", "dependson", $bug_id);
if ( @depends ) {
$self->{'dependson'} = \@depends;
}
my @blocks = EmitDependList("dependson", "blocked", $bug_id);
if ( @blocks ) {
$self->{'blocks'} = \@blocks;
}
}
return $self;
}
# given a bug hash, emit xml for it. with file header provided by caller
#
sub emitXML {
( $#_ == 0 ) || confess("invalid number of arguments");
my $self = shift();
my $xml;
if (exists $self->{'error'}) {
$xml .= "<bug error=\"$self->{'error'}\">\n";
$xml .= " <bug_id>$self->{'bug_id'}</bug_id>\n";
$xml .= "</bug>\n";
return $xml;
}
$xml .= "<bug>\n";
foreach my $field ("bug_id", "bug_status", "product",
"priority", "version", "rep_platform", "assigned_to", "delta_ts",
"component", "reporter", "target_milestone", "bug_severity",
"creation_ts", "qa_contact", "op_sys", "resolution", "bug_file_loc",
"short_desc", "keywords", "status_whiteboard") {
if ($self->{$field}) {
$xml .= " <$field>" . QuoteXMLChars($self->{$field}) . "</$field>\n";
}
}
foreach my $field ("dependson", "blocks", "cc") {
if (defined $self->{$field}) {
for (my $i=0 ; $i < @{$self->{$field}} ; $i++) {
$xml .= " <$field>" . $self->{$field}[$i] . "</$field>\n";
}
}
}
if (defined $self->{'longdescs'}) {
for (my $i=0 ; $i < @{$self->{'longdescs'}} ; $i++) {
$xml .= " <long_desc>\n";
$xml .= " <who>" . &::DBID_to_name($self->{'longdescs'}[$i]->{'who'})
. "</who>\n";
$xml .= " <bug_when>" . $self->{'longdescs'}[$i]->{'bug_when'}
. "</bug_when>\n";
$xml .= " <thetext>" . QuoteXMLChars($self->{'longdescs'}[$i]->{'thetext'})
. "</thetext>\n";
$xml .= " </long_desc>\n";
}
}
if (defined $self->{'attachments'}) {
for (my $i=0 ; $i < @{$self->{'attachments'}} ; $i++) {
$xml .= " <attachment>\n";
$xml .= " <attachid>" . $self->{'attachments'}[$i]->{'attachid'}
. "</attachid>\n";
$xml .= " <date>" . $self->{'attachments'}[$i]->{'date'} . "</date>\n";
$xml .= " <desc>" . QuoteXMLChars($self->{'attachments'}[$i]->{'desc'}) . "</desc>\n";
# $xml .= " <type>" . $self->{'attachments'}[$i]->{'type'} . "</type>\n";
# $xml .= " <data>" . $self->{'attachments'}[$i]->{'data'} . "</data>\n";
$xml .= " </attachment>\n";
}
}
$xml .= "</bug>\n";
return $xml;
}
sub EmitDependList {
my ($myfield, $targetfield, $bug_id) = (@_);
my @list;
&::SendSQL("select dependencies.$targetfield, bugs.bug_status
from dependencies, bugs
where dependencies.$myfield = $bug_id
and bugs.bug_id = dependencies.$targetfield
order by dependencies.$targetfield");
while (&::MoreSQLData()) {
my ($i, $stat) = (&::FetchSQLData());
push @list, $i;
}
return @list;
}
sub QuoteXMLChars {
$_[0] =~ s/&/&amp;/g;
$_[0] =~ s/</&lt;/g;
$_[0] =~ s/>/&gt;/g;
$_[0] =~ s/'/&apos;/g;
$_[0] =~ s/"/&quot;/g;
# $_[0] =~ s/([\x80-\xFF])/&XmlUtf8Encode(ord($1))/ge;
return($_[0]);
}
sub XML_Header {
my ($urlbase, $version, $maintainer, $exporter) = (@_);
my $xml;
$xml = "<?xml version=\"1.0\" standalone=\"yes\"?>\n";
$xml .= "<!DOCTYPE bugzilla SYSTEM \"$urlbase";
if (! ($urlbase =~ /.+\/$/)) {
$xml .= "/";
}
$xml .= "bugzilla.dtd\">\n";
$xml .= "<bugzilla";
if (defined $exporter) {
$xml .= " exporter=\"$exporter\"";
}
$xml .= " version=\"$version\"";
$xml .= " urlbase=\"$urlbase\"";
$xml .= " maintainer=\"$maintainer\">\n";
return ($xml);
}
sub XML_Footer {
return ("</bugzilla>\n");
}
sub UserInGroup {
my $self = shift();
my ($groupname) = (@_);
return &::UserInGroup($self->{'whoid'}, $groupname);
}
sub CanChangeField {
my $self = shift();
my ($f, $oldvalue, $newvalue) = (@_);
my $UserInEditGroup = -1;
my $UserInCanConfirmGroup = -1;
my $ownerid;
my $reporterid;
my $qacontactid;
if ($f eq "assigned_to" || $f eq "reporter" || $f eq "qa_contact") {
if ($oldvalue =~ /^\d+$/) {
if ($oldvalue == 0) {
$oldvalue = "";
} else {
$oldvalue = &::DBID_to_name($oldvalue);
}
}
}
if ($oldvalue eq $newvalue) {
return 1;
}
if (&::trim($oldvalue) eq &::trim($newvalue)) {
return 1;
}
if ($f =~ /^longdesc/) {
return 1;
}
if ($UserInEditGroup < 0) {
$UserInEditGroup = UserInGroup($self, "editbugs");
}
if ($UserInEditGroup) {
return 1;
}
&::SendSQL("SELECT reporter, assigned_to, qa_contact FROM bugs " .
"WHERE bug_id = $self->{'bug_id'}");
($reporterid, $ownerid, $qacontactid) = (&::FetchSQLData());
# Let reporter change bug status, even if they can't edit bugs.
# If reporter can't re-open their bug they will just file a duplicate.
# While we're at it, let them close their own bugs as well.
if ( ($f eq "bug_status") && ($self->{'whoid'} eq $reporterid) ) {
return 1;
}
if ($f eq "bug_status" && $newvalue ne $::unconfirmedstate &&
&::IsOpenedState($newvalue)) {
# Hmm. They are trying to set this bug to some opened state
# that isn't the UNCONFIRMED state. Are they in the right
# group? Or, has it ever been confirmed? If not, then this
# isn't legal.
if ($UserInCanConfirmGroup < 0) {
$UserInCanConfirmGroup = &::UserInGroup($self->{'whoid'},"canconfirm");
}
if ($UserInCanConfirmGroup) {
return 1;
}
&::SendSQL("SELECT everconfirmed FROM bugs WHERE bug_id = $self->{'bug_id'}");
my $everconfirmed = FetchOneColumn();
if ($everconfirmed) {
return 1;
}
} elsif ($reporterid eq $self->{'whoid'} || $ownerid eq $self->{'whoid'} ||
$qacontactid eq $self->{'whoid'}) {
return 1;
}
$self->{'error'} = "
Only the owner or submitter of the bug, or a sufficiently
empowered user, may make that change to the $f field."
}
sub Collision {
my $self = shift();
my $write = "WRITE"; # Might want to make a param to control
# whether we do LOW_PRIORITY ...
if ($::driver eq 'mysql') {
&::SendSQL("LOCK TABLES bugs $write, bugs_activity $write, cc $write, " .
"cc AS selectVisible_cc $write, " .
"profiles $write, dependencies $write, votes $write, " .
"keywords $write, longdescs $write, fielddefs $write, " .
"keyworddefs READ, groups READ, attachments READ, products READ");
}
&::SendSQL("SELECT delta_ts FROM bugs where bug_id=$self->{'bug_id'}");
my $delta_ts = &::FetchOneColumn();
if ($::driver eq 'mysql') {
&::SendSQL("unlock tables");
}
if ($self->{'delta_ts'} ne $delta_ts) {
return 1;
}
else {
return 0;
}
}
sub AppendComment {
my $self = shift();
my ($comment) = (@_);
$comment =~ s/\r\n/\n/g; # Get rid of windows-style line endings.
$comment =~ s/\r/\n/g; # Get rid of mac-style line endings.
if ($comment =~ /^\s*$/) { # Nothin' but whitespace.
return;
}
&::SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext) " .
"VALUES($self->{'bug_id'}, $self->{'whoid'}, now(), " . &::SqlQuote($comment) . ")");
&::SendSQL("UPDATE bugs SET delta_ts = now() WHERE bug_id = $self->{'bug_id'}");
}
#from o'reilley's Programming Perl
sub display {
my $self = shift;
my @keys;
if (@_ == 0) { # no further arguments
@keys = sort keys(%$self);
} else {
@keys = @_; # use the ones given
}
foreach my $key (@keys) {
print "\t$key => $self->{$key}\n";
}
}
sub CommitChanges {
#snapshot bug
#snapshot dependencies
#check can change fields
#check collision
#lock and change fields
#notify through mail
}
sub AUTOLOAD {
use vars qw($AUTOLOAD);
my $self = shift;
my $type = ref($self) || $self;
my $attr = $AUTOLOAD;
$attr =~ s/.*:://;
return unless $attr=~ /[^A-Z]/;
if (@_) {
$self->{$attr} = shift;
return;
}
confess ("invalid bug attribute $attr") unless $ok_field{$attr};
if (defined $self->{$attr}) {
return $self->{$attr};
} else {
return '';
}
}
1;

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +0,0 @@
* This README is no longer used to house installation instructions. Instead,
it contains pointers to where you may find the information you need.
* Installation instructions are now found in docs/, with a variety of document
types available. Please refer to these documents when installing, configuring,
and maintaining your Bugzilla installation. A helpful starting point is
docs/txt/Bugzilla-Guide.txt, or with a web browser at docs/html/index.html.
* Release notes for people upgrading to a new version of Bugzilla are
available at docs/rel_notes.txt.
* If you wish to contribute to the documentation, please read docs/README.docs.
* The Bugzilla web site is at "http://www.mozilla.org/projects/bugzilla/".
This site will contain the latest Bugzilla information, including how to
report bugs and how to get help with Bugzilla.

View File

@@ -1,268 +0,0 @@
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 2000 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Dan Mosedale <dmose@mozilla.org>
# Terry Weissman <terry@mozilla.org>
# Dave Miller <justdave@syndicomm.com>
# This object models a set of relations between one item and a group
# of other items. An example is the set of relations between one bug
# and the users CCed on that bug. Currently, the relation objects are
# expected to be bugzilla userids. However, this could and perhaps
# should be generalized to work with non userid objects, such as
# keywords associated with a bug. That shouldn't be hard to do; it
# might involve turning this into a virtual base class, and having
# UserSet and KeywordSet types that inherit from it.
use diagnostics;
use strict;
# Everything that uses RelationSet should already have globals.pl loaded
# so we don't want to load it here. Doing so causes a loop in Perl because
# globals.pl turns around and does a 'use RelationSet'
# See http://bugzilla.mozilla.org/show_bug.cgi?id=72862
#require "globals.pl";
package RelationSet;
use CGI::Carp qw(fatalsToBrowser);
# create a new empty RelationSet
#
sub new {
my $type = shift();
# create a ref to an empty hash and bless it
#
my $self = {};
bless $self, $type;
# construct from a comma-delimited string
#
if ($#_ == 0) {
$self->mergeFromString($_[0]);
}
# unless this was a constructor for an empty list, somebody screwed up.
#
elsif ( $#_ != -1 ) {
confess("invalid number of arguments");
}
# bless as a RelationSet
#
return $self;
}
# Assumes that the set of relations "FROM $table WHERE $constantSql and
# $column = $value" is currently represented by $self, and this set should
# be updated to look like $other.
#
# Returns an array of two strings, one INSERT and one DELETE, which will
# make this change. Either or both strings may be the empty string,
# meaning that no INSERT or DELETE or both (respectively) need to be done.
#
# THE CALLER IS RESPONSIBLE FOR ANY DESIRED LOCKING AND/OR CONSISTENCY
# CHECKS (not to mention doing the SendSQL() calls).
#
sub generateSqlDeltas {
($#_ == 5) || confess("invalid number of arguments");
my ( $self, # instance ptr to set representing the existing state
$endState, # instance ptr to set representing the desired state
$table, # table where these relations are kept
$invariantName, # column held const for a RelationSet (often "bug_id")
$invariantValue, # what to hold the above column constant at
$columnName # the column which varies (often a userid)
) = @_;
# construct the insert list by finding relations which exist in the
# end state but not the current state.
#
my @endStateRelations = keys(%$endState);
my @insertList = ();
foreach ( @endStateRelations ) {
push ( @insertList, $_ ) if ( ! exists $$self{"$_"} );
}
# we've built the list. If it's non-null, add required sql chrome.
#
my $sqlInsert="";
if ( $#insertList > -1 ) {
$sqlInsert = "INSERT INTO $table ($invariantName, $columnName) VALUES " .
join (",",
map ( "($invariantValue, $_)" , @insertList )
);
}
# construct the delete list by seeing which relations exist in the
# current state but not the end state
#
my @selfRelations = keys(%$self);
my @deleteList = ();
foreach ( @selfRelations ) {
push (@deleteList, $_) if ( ! exists $$endState{"$_"} );
}
# we've built the list. if it's non-empty, add required sql chrome.
#
my $sqlDelete = "";
if ( $#deleteList > -1 ) {
$sqlDelete = "DELETE FROM $table WHERE $invariantName = $invariantValue " .
"AND $columnName IN ( " . join (",", @deleteList) . " )";
}
return ($sqlInsert, $sqlDelete);
}
# compare the current object with another.
#
sub isEqual {
($#_ == 1) || confess("invalid number of arguments");
my $self = shift();
my $other = shift();
# get arrays of the keys for faster processing
#
my @selfRelations = keys(%$self);
my @otherRelations = keys(%$other);
# make sure the arrays are the same size
#
return 0 if ( $#selfRelations != $#otherRelations );
# bail out if any of the elements are different
#
foreach my $relation ( @selfRelations ) {
return 0 if ( !exists $$other{$relation})
}
# we made it!
#
return 1;
}
# merge the results of a SQL command into this set
#
sub mergeFromDB {
( $#_ == 1 ) || confess("invalid number of arguments");
my $self = shift();
&::SendSQL(shift());
while (my @row = &::FetchSQLData()) {
$$self{$row[0]} = 1;
}
return;
}
# merge a set in string form into this set
#
sub mergeFromString {
($#_ == 1) || confess("invalid number of arguments");
my $self = shift();
# do the merge
#
foreach my $person (split(/[ ,]/, shift())) {
if ($person ne "") {
$$self{&::DBNameToIdAndCheck($person)} = 1;
}
}
}
# remove a set in string form from this set
#
sub removeItemsInString {
($#_ == 1) || confess("invalid number of arguments");
my $self = shift();
# do the merge
#
foreach my $person (split(/[ ,]/, shift())) {
if ($person ne "") {
my $dbid = &::DBNameToIdAndCheck($person);
if (exists $$self{$dbid}) {
delete $$self{$dbid};
}
}
}
}
# remove a set in array form from this set
#
sub removeItemsInArray {
($#_ > 0) || confess("invalid number of arguments");
my $self = shift();
# do the merge
#
while (my $person = shift()) {
if ($person ne "") {
my $dbid = &::DBNameToIdAndCheck($person);
if (exists $$self{$dbid}) {
delete $$self{$dbid};
}
}
}
}
# return the number of elements in this set
#
sub size {
my $self = shift();
my @k = keys(%$self);
return $#k++;
}
# return this set in array form
#
sub toArray {
my $self= shift();
return keys(%$self);
}
# return this set as an array of strings
#
sub toArrayOfStrings {
($#_ == 0) || confess("invalid number of arguments");
my $self = shift();
my @result = ();
foreach my $i ( keys %$self ) {
push @result, &::DBID_to_name($i);
}
return sort { lc($a) cmp lc($b) } @result;
}
# return this set in string form (comma-separated and sorted)
#
sub toString {
($#_ == 0) || confess("invalid number of arguments");
my $self = shift();
my @result = ();
foreach my $i ( keys %$self ) {
push @result, &::DBID_to_name($i);
}
return join(',', sort(@result));
}
1;

View File

@@ -1,273 +0,0 @@
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Myk Melez <myk@mozilla.org>
################################################################################
# Module Initialization
################################################################################
# Make it harder for us to do dangerous things in Perl.
use diagnostics;
use strict;
# Bundle the functions in this file together into the "Token" package.
package Token;
use Date::Format;
# This module requires that its caller have said "require CGI.pl" to import
# relevant functions from that script and its companion globals.pl.
################################################################################
# Constants
################################################################################
# The maximum number of days a token will remain valid.
my $maxtokenage = 3;
################################################################################
# Functions
################################################################################
sub IssueEmailChangeToken {
my ($userid, $old_email, $new_email) = @_;
my $token_ts = time();
my $issuedate = time2str("%Y-%m-%d %H:%M", $token_ts);
# Generate a unique token and insert it into the tokens table.
# We have to lock the tokens table before generating the token,
# since the database must be queried for token uniqueness.
&::SendSQL("LOCK TABLES tokens WRITE");
my $token = GenerateUniqueToken();
my $quotedtoken = &::SqlQuote($token);
my $quoted_emails = &::SqlQuote($old_email . ":" . $new_email);
&::SendSQL("INSERT INTO tokens ( userid , issuedate , token ,
tokentype , eventdata )
VALUES ( $userid , '$issuedate' , $quotedtoken ,
'emailold' , $quoted_emails )");
my $newtoken = GenerateUniqueToken();
$quotedtoken = &::SqlQuote($newtoken);
&::SendSQL("INSERT INTO tokens ( userid , issuedate , token ,
tokentype , eventdata )
VALUES ( $userid , '$issuedate' , $quotedtoken ,
'emailnew' , $quoted_emails )");
&::SendSQL("UNLOCK TABLES");
# Mail the user the token along with instructions for using it.
my $template = $::template;
my $vars = $::vars;
$vars->{'oldemailaddress'} = $old_email . &::Param('emailsuffix');
$vars->{'newemailaddress'} = $new_email . &::Param('emailsuffix');
$vars->{'max_token_age'} = $maxtokenage;
$vars->{'token_ts'} = $token_ts;
$vars->{'token'} = $token;
$vars->{'emailaddress'} = $old_email . &::Param('emailsuffix');
my $message;
$template->process("account/email/change-old.txt.tmpl", $vars, \$message)
|| &::ThrowTemplateError($template->error());
open SENDMAIL, "|/usr/lib/sendmail -t -i";
print SENDMAIL $message;
close SENDMAIL;
$vars->{'token'} = $newtoken;
$vars->{'emailaddress'} = $new_email . &::Param('emailsuffix');
$message = "";
$template->process("account/email/change-new.txt.tmpl", $vars, \$message)
|| &::ThrowTemplateError($template->error());
open SENDMAIL, "|/usr/lib/sendmail -t -i";
print SENDMAIL $message;
close SENDMAIL;
}
sub IssuePasswordToken {
# Generates a random token, adds it to the tokens table, and sends it
# to the user with instructions for using it to change their password.
my ($loginname) = @_;
# Retrieve the user's ID from the database.
my $quotedloginname = &::SqlQuote($loginname);
&::SendSQL("SELECT userid FROM profiles WHERE login_name = $quotedloginname");
my ($userid) = &::FetchSQLData();
my $token_ts = time();
my $issuedate = time2str("%Y-%m-%d %H:%M", $token_ts);
# Generate a unique token and insert it into the tokens table.
# We have to lock the tokens table before generating the token,
# since the database must be queried for token uniqueness.
&::SendSQL("LOCK TABLE tokens WRITE") if $::driver eq 'mysql';
my $token = GenerateUniqueToken();
my $quotedtoken = &::SqlQuote($token);
my $quotedipaddr = &::SqlQuote($::ENV{'REMOTE_ADDR'});
&::SendSQL("INSERT INTO tokens ( userid , issuedate , token , tokentype , eventdata )
VALUES ( $userid , '$issuedate' , $quotedtoken , 'password' , $quotedipaddr )");
&::SendSQL("UNLOCK TABLES") if $::driver eq 'mysql';
# Mail the user the token along with instructions for using it.
my $template = $::template;
my $vars = $::vars;
$vars->{'token'} = $token;
$vars->{'emailaddress'} = $loginname . &::Param('emailsuffix');
$vars->{'max_token_age'} = $maxtokenage;
$vars->{'token_ts'} = $token_ts;
my $message = "";
$template->process("account/password/forgotten-password.txt.tmpl",
$vars, \$message)
|| &::ThrowTemplateError($template->error());
open SENDMAIL, "|/usr/lib/sendmail -t -i";
print SENDMAIL $message;
close SENDMAIL;
}
sub CleanTokenTable {
&::SendSQL("LOCK TABLES tokens WRITE") if $::driver eq 'mysql';
if ($::driver eq 'mysql') {
&::SendSQL("DELETE FROM tokens WHERE TO_DAYS(NOW()) - TO_DAYS(issuedate) >= " . $maxtokenage);
} elsif ($::driver eq 'Pg') {
&::SendSQL("DELETE FROM tokens WHERE now() - issuedate >= '$maxtokenage days'");
}
&::SendSQL("UNLOCK TABLES") if $::driver eq 'mysql';
}
sub GenerateUniqueToken {
# Generates a unique random token. Uses &GenerateRandomPassword
# for the tokens themselves and checks uniqueness by searching for
# the token in the "tokens" table. Gives up if it can't come up
# with a token after about one hundred tries.
my $token;
my $duplicate = 1;
my $tries = 0;
while ($duplicate) {
++$tries;
if ($tries > 100) {
&::DisplayError("Something is seriously wrong with the token generation system.");
exit;
}
$token = &::GenerateRandomPassword();
&::SendSQL("SELECT userid FROM tokens WHERE token = " . &::SqlQuote($token));
$duplicate = &::FetchSQLData();
}
return $token;
}
sub Cancel {
# Cancels a previously issued token and notifies the system administrator.
# This should only happen when the user accidentally makes a token request
# or when a malicious hacker makes a token request on behalf of a user.
my ($token, $cancelaction) = @_;
# Quote the token for inclusion in SQL statements.
my $quotedtoken = &::SqlQuote($token);
# Get information about the token being cancelled.
&::SendSQL("SELECT issuedate , tokentype , eventdata , login_name , realname
FROM tokens, profiles
WHERE tokens.userid = profiles.userid
AND token = $quotedtoken");
my ($issuedate, $tokentype, $eventdata, $loginname, $realname) = &::FetchSQLData();
# Get the email address of the Bugzilla maintainer.
my $maintainer = &::Param('maintainer');
# Format the user's real name and email address into a single string.
my $username = $realname ? $realname . " <" . $loginname . ">" : $loginname;
my $template = $::template;
my $vars = $::vars;
$vars->{'emailaddress'} = $username;
$vars->{'maintainer'} = $maintainer;
$vars->{'remoteaddress'} = $::ENV{'REMOTE_ADDR'};
$vars->{'token'} = $token;
$vars->{'tokentype'} = $tokentype;
$vars->{'issuedate'} = $issuedate;
$vars->{'eventdata'} = $eventdata;
$vars->{'cancelaction'} = $cancelaction;
# Notify the user via email about the cancellation.
my $message;
$template->process("account/cancel-token.txt.tmpl", $vars, \$message)
|| &::ThrowTemplateError($template->error());
open SENDMAIL, "|/usr/lib/sendmail -t -i";
print SENDMAIL $message;
close SENDMAIL;
# Delete the token from the database.
&::SendSQL("LOCK TABLE tokens WRITE") if $::driver eq 'mysql';
&::SendSQL("DELETE FROM tokens WHERE token = $quotedtoken");
&::SendSQL("UNLOCK TABLES") if $::driver eq 'mysql';
}
sub HasPasswordToken {
# Returns a password token if the user has one.
my ($userid) = @_;
&::SendSQL("SELECT token FROM tokens
WHERE userid = $userid AND tokentype = 'password' LIMIT 1");
my ($token) = &::FetchSQLData();
return $token;
}
sub HasEmailChangeToken {
# Returns an email change token if the user has one.
my ($userid) = @_;
&::SendSQL("SELECT token FROM tokens
WHERE userid = $userid
AND tokentype = 'emailnew'
OR tokentype = 'emailold' LIMIT 1");
my ($token) = &::FetchSQLData();
return $token;
}
1;

View File

@@ -1,3 +0,0 @@
Please consult The Bugzilla Guide for instructions on how to upgrade
Bugzilla from an older version. The Guide can be found with this
distribution, in docs/html, docs/txt, and docs/sgml.

View File

@@ -1,407 +0,0 @@
This file contains only important changes made to Bugzilla before release
2.8. If you are upgrading from version older than 2.8, please read this file.
If you are upgrading from 2.8 or newer, please read the Installation and
Upgrade instructions in The Bugzilla Guide, found with this distribution in
docs/html, docs/txt, and docs/sgml.
For a complete list of what changes, use Bonsai
(http://cvs-mirror.mozilla.org/webtools/bonsai/cvsqueryform.cgi) to
query the CVS tree. For example,
http://cvs-mirror.mozilla.org/webtools/bonsai/cvsquery.cgi?module=all&branch=HEAD&branchtype=match&dir=mozilla%2Fwebtools%2Fbugzilla&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=week&mindate=&maxdate=&cvsroot=%2Fcvsroot
will tell you what has been changed in the last week.
10/12/99 The CHANGES file is now obsolete! There is a new file called
checksetup.pl. You should get in the habit of running that file every time
you update your installation of Bugzilla. That file will be constantly
updated to automatically update your installation to match any code changes.
If you're curious as to what is going on, changes are commented in that file,
at the end.
Many thanks to Holger Schurig <holgerschurig@nikocity.de> for writing this
script!
10/11/99 Restructured voting database to add a cached value in each
bug recording how many total votes that bug has. While I'm at it, I
removed the unused "area" field from the bugs database. It is
distressing to realize that the bugs table has reached the maximum
number of indices allowed by MySQL (16), which may make future
enhancements awkward.
You must feed the following to MySQL:
alter table bugs drop column area;
alter table bugs add column votes mediumint not null, add index (votes);
You then *must* delete the data/versioncache file when you make this
change, as it contains references to the "area" field. Deleting it is safe,
bugzilla will correctly regenerate it.
If you have been using the voting feature at all, then you will then
need to update the voting cache. You can do this by visiting the
sanitycheck.cgi page, and taking it up on its offer to rebuild the
votes stuff.
10/7/99 Added voting ability. You must run the new script
"makevotestable.sh". You must also feed the following to mysql:
alter table products add column votesperuser smallint not null;
9/15/99 Apparently, newer alphas of MySQL won't allow you to have
"when" as a column name. So, I have had to rename a column in the
bugs_activity table. You must feed the below to mysql or you won't
work at all.
alter table bugs_activity change column when bug_when datetime not null;
8/16/99 Added "OpenVMS" to the list of OS's. Feed this to mysql:
alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "Mac System 8.6", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "Neutrino", "OS/2", "BeOS", "OpenVMS", "other") not null;
6/22/99 Added an entry to the attachments table to record who the submitter
was. Nothing uses this yet, but it still should be recorded.
alter table attachments add column submitter_id mediumint not null;
You should also run this script to populate the new field:
#!/usr/bonsaitools/bin/perl -w
use diagnostics;
use strict;
require "globals.pl";
$|=1;
ConnectToDatabase();
SendSQL("select bug_id, attach_id from attachments order by bug_id");
my @list;
while (MoreSQLData()) {
my @row = FetchSQLData();
push(@list, \@row);
}
foreach my $ref (@list) {
my ($bug, $attach) = (@$ref);
SendSQL("select long_desc from bugs where bug_id = $bug");
my $comment = FetchOneColumn() . "Created an attachment (id=$attach)";
if ($comment =~ m@-* Additional Comments From ([^ ]*)[- 0-9/:]*\nCreated an attachment \(id=$attach\)@) {
print "Found $1\n";
SendSQL("select userid from profiles where login_name=" .
SqlQuote($1));
my $userid = FetchOneColumn();
if (defined $userid && $userid > 0) {
SendSQL("update attachments set submitter_id=$userid where attach_id = $attach");
}
} else {
print "Bug $bug can't find comment for attachment $attach\n";
}
}
6/14/99 Added "BeOS" to the list of OS's. Feed this to mysql:
alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "Mac System 8.6", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "Neutrino", "OS/2", "BeOS", "other") not null;
5/27/99 Added support for dependency information. You must run the new
"makedependenciestable.sh" script. You can turn off dependencies with the new
"usedependencies" param, but it defaults to being on. Also, read very
carefully the description for the new "webdotbase" param; you will almost
certainly need to tweak it.
5/24/99 Added "Mac System 8.6" and "Neutrino" to the list of OS's.
Feed this to mysql:
alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "Mac System 8.6", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "Neutrino", "OS/2", "other") not null;
5/12/99 Added a pref to control how much email you get. This needs a new
column in the profiles table, so feed the following to mysql:
alter table profiles add column emailnotification enum("ExcludeSelfChanges", "CConly", "All") not null default "ExcludeSelfChanges";
5/5/99 Added the ability to search by creation date. To make this perform
well, you ought to do the following:
alter table bugs change column creation_ts creation_ts datetime not null, add index (creation_ts);
4/30/99 Added a new severity, "blocker". To get this into your running
Bugzilla, do the following:
alter table bugs change column bug_severity bug_severity enum("blocker", "critical", "major", "normal", "minor", "trivial", "enhancement") not null;
4/22/99 There was a bug where the long descriptions of bugs had a variety of
newline characters at the end, depending on the operating system of the browser
that submitted the text. This bug has been fixed, so that no further changes
like that will happen. But to fix problems that have already crept into your
database, you can run the following perl script (which is slow and ugly, but
does work:)
#!/usr/bonsaitools/bin/perl -w
use diagnostics;
use strict;
require "globals.pl";
$|=1;
ConnectToDatabase();
SendSQL("select bug_id from bugs order by bug_id");
my @list;
while (MoreSQLData()) {
push(@list, FetchOneColumn());
}
foreach my $id (@list) {
if ($id % 50 == 0) {
print "\n$id ";
}
SendSQL("select long_desc from bugs where bug_id = $id");
my $comment = FetchOneColumn();
my $orig = $comment;
$comment =~ s/\r\n/\n/g; # Get rid of windows-style line endings.
$comment =~ s/\r/\n/g; # Get rid of mac-style line endings.
if ($comment ne $orig) {
SendSQL("update bugs set long_desc = " . SqlQuote($comment) .
" where bug_id = $id");
print ".";
} else {
print "-";
}
}
4/8/99 Added ability to store patches with bugs. This requires a new table
to store the data, so you will need to run the "makeattachmenttable.sh" script.
3/25/99 Unfortunately, the HTML::FromText CPAN module had too many bugs, and
so I had to roll my own. We no longer use the HTML::FromText CPAN module.
3/24/99 (This entry has been removed. It used to say that we required the
HTML::FromText CPAN module, but that's no longer true.)
3/22/99 Added the ability to query by fields which have changed within a date
range. To make this perform a bit better, we need a new index:
alter table bugs_activity add index (field);
3/10/99 Added 'groups' stuff, where we have different group bits that we can
put on a person or on a bug. Some of the group bits control access to bugzilla
features. And a person can't access a bug unless he has every group bit set
that is also set on the bug. See the comments in makegroupstable.sh for a bit
more info.
The 'maintainer' param is now used only as an email address for people to send
complaints to. The groups table is what is now used to determine permissions.
You will need to run the new script "makegroupstable.sh". And then you need to
feed the following lines to MySQL (replace XXX with the login name of the
maintainer, the person you wish to be all-powerful).
alter table bugs add column groupset bigint not null;
alter table profiles add column groupset bigint not null;
update profiles set groupset=0x7fffffffffffffff where login_name = XXX;
3/8/99 Added params to control how priorities are set in a new bug. You can
now choose whether to let submitters of new bugs choose a priority, or whether
they should just accept the default priority (which is now no longer hardcoded
to "P2", but is instead a param.) The default value of the params will cause
the same behavior as before.
3/3/99 Added a "disallownew" field to the products table. If non-zero, then
don't let people file new bugs against this product. (This is for when a
product is retired, but you want to keep the bug reports around for posterity.)
Feed this to MySQL:
alter table products add column disallownew tinyint not null;
2/8/99 Added FreeBSD to the list of OS's. Feed this to MySQL:
alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "OS/2", "other") not null;
2/4/99 Added a new column "description" to the components table, and added
links to a new page which will use this to describe the components of a
given product. Feed this to MySQL:
alter table components add column description mediumtext not null;
2/3/99 Added a new column "initialqacontact" to the components table that gives
an initial QA contact field. It may be empty if you wish the initial qa
contact to be empty. If you're not using the QA contact field, you don't need
to add this column, but you might as well be safe and add it anyway:
alter table components add column initialqacontact tinytext not null;
2/2/99 Added a new column "milestoneurl" to the products table that gives a URL
which is to describe the currently defined milestones for a product. If you
don't use target milestone, you might be able to get away without adding this
column, but you might as well be safe and add it anyway:
alter table products add column milestoneurl tinytext not null;
1/29/99 Whoops; had a misspelled op_sys. It was "Mac System 7.1.6"; it should
be "Mac System 7.6.1". It turns out I had no bugs with this value set, so I
could just do the below simple command. If you have bugs with this value, you
may need to do something more complicated.
alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "OSF/1", "Solaris", "SunOS", "OS/2", "other") not null;
1/20/99 Added new fields: Target Milestone, QA Contact, and Status Whiteboard.
These fields are all optional in the UI; there are parameters to turn them on.
However, whether or not you use them, the fields need to be in the DB. There
is some code that needs them, even if you don't.
To update your DB to have these fields, send the following to MySQL:
alter table bugs add column target_milestone varchar(20) not null,
add column qa_contact mediumint not null,
add column status_whiteboard mediumtext not null,
add index (target_milestone), add index (qa_contact);
1/18/99 You can now query by CC. To make this perform reasonably, the CC table
needs some indices. The following MySQL does the necessary stuff:
alter table cc add index (bug_id), add index (who);
1/15/99 The op_sys field can now be queried by (and more easily tweaked).
To make this perform reasonably, it needs an index. The following MySQL
command will create the necessary index:
alter table bugs add index (op_sys);
12/2/98 The op_sys and rep_platform fields have been tweaked. op_sys
is now an enum, rather than having the legal values all hard-coded in
perl. rep_platform now no longer allows a value of "X-Windows".
Here's how I ported to the new world. This ought to work for you too.
Actually, it's probably overkill. I had a lot of illegal values for op_sys
in my tables, from importing bugs from strange places. If you haven't done
anything funky, then much of the below will be a no-op.
First, send the following commands to MySQL to make sure all your values for
rep_platform and op_sys are legal in the new world..
update bugs set rep_platform="Sun" where rep_platform="X-Windows" and op_sys like "Solaris%";
update bugs set rep_platform="SGI" where rep_platform="X-Windows" and op_sys = "IRIX";
update bugs set rep_platform="SGI" where rep_platform="X-Windows" and op_sys = "HP-UX";
update bugs set rep_platform="DEC" where rep_platform="X-Windows" and op_sys = "OSF/1";
update bugs set rep_platform="PC" where rep_platform="X-Windows" and op_sys = "Linux";
update bugs set rep_platform="other" where rep_platform="X-Windows";
update bugs set rep_platform="other" where rep_platform="";
update bugs set op_sys="Mac System 7" where op_sys="System 7";
update bugs set op_sys="Mac System 7.5" where op_sys="System 7.5";
update bugs set op_sys="Mac System 8.0" where op_sys="8.0";
update bugs set op_sys="OSF/1" where op_sys="Digital Unix 4.0";
update bugs set op_sys="IRIX" where op_sys like "IRIX %";
update bugs set op_sys="HP-UX" where op_sys like "HP-UX %";
update bugs set op_sys="Windows NT" where op_sys like "NT %";
update bugs set op_sys="OSF/1" where op_sys like "OSF/1 %";
update bugs set op_sys="Solaris" where op_sys like "Solaris %";
update bugs set op_sys="SunOS" where op_sys like "SunOS%";
update bugs set op_sys="other" where op_sys = "Motif";
update bugs set op_sys="other" where op_sys = "Other";
Next, send the following commands to make sure you now have only legal
entries in your table. If either of the queries do not come up empty, then
you have to do more stuff like the above.
select bug_id,op_sys,rep_platform from bugs where rep_platform not regexp "^(All|DEC|HP|Macintosh|PC|SGI|Sun|X-Windows|Other)$";
select bug_id,op_sys,rep_platform from bugs where op_sys not regexp "^(All|Windows 3.1|Windows 95|Windows 98|Windows NT|Mac System 7|Mac System 7.5|Mac System 7.1.6|Mac System 8.0|AIX|BSDI|HP-UX|IRIX|Linux|OSF/1|Solaris|SunOS|other)$";
Finally, once that's all clear, alter the table to make enforce the new legal
entries:
alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.1.6", "Mac System 8.0", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "OSF/1", "Solaris", "SunOS", "other") not null, change column rep_platform rep_platform enum("All", "DEC", "HP", "Macintosh", "PC", "SGI", "Sun", "Other");
11/20/98 Added searching of CC field. To better support this, added
some indexes to the CC table. You probably want to execute the following
mysql commands:
alter table cc add index (bug_id);
alter table cc add index (who);
10/27/98 security check for legal products in place. bug charts are not
available as an option if collectstats.pl has never been run. all products
get daily stats collected now. README updated: Chart::Base is listed as
a requirement, instructions for using collectstats.pl included as
an optional step. also got silly and added optional quips to bug
reports.
10/17/98 modified README installation instructions slightly.
10/7/98 Added a new table called "products". Right now, this is used
only to have a description for each product, and that description is
only used when initially adding a new bug. Anyway, you *must* create
the new table (which you can do by running the new makeproducttable.sh
script). If you just leave it empty, things will work much as they
did before, or you can add descriptions for some or all of your
products.
9/15/98 Everything has been ported to Perl. NO MORE TCL. This
transition should be relatively painless, except for the "params"
file. This is the file that contains parameters you've set up on the
editparams.cgi page. Before changing to Perl, this was a tcl-syntax
file, stored in the same directory as the code; after the change to
Perl, it becomes a perl-syntax file, stored in a subdirectory named
"data". See the README file for more details on what version of Perl
you need.
So, if updating from an older version of Bugzilla, you will need to
edit data/param, change the email address listed for
$::param{'maintainer'}, and then go revisit the editparams.cgi page
and reset all the parameters to your taste. Fortunately, your old
params file will still be around, and so you ought to be able to
cut&paste important bits from there.
Also, note that the "whineatnews" script has changed name (it now has
an extension of .pl instead of .tcl), so you'll need to change your
cron job.
And the "comments" file has been moved to the data directory. Just do
"cat comments >> data/comments" to restore any old comments that may
have been lost.
9/2/98 Changed the way password validation works. We now keep a
crypt'd version of the password in the database, and check against
that. (This is silly, because we're also keeping the plaintext
version there, but I have plans...) Stop passing the plaintext
password around as a cookie; instead, we have a cookie that references
a record in a new database table, logincookies.
IMPORTANT: if updating from an older version of Bugzilla, you must run
the following commands to keep things working:
./makelogincookiestable.sh
echo "alter table profiles add column cryptpassword varchar(64);" | mysql bugs
echo "update profiles set cryptpassword = encrypt(password,substring(rand(),3, 4));" | mysql bugs

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

View File

@@ -1,792 +0,0 @@
#!/usr/bonsaitools/bin/perl -wT
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Myk Melez <myk@mozilla.org>
################################################################################
# Script Initialization
################################################################################
# Make it harder for us to do dangerous things in Perl.
use diagnostics;
use strict;
use lib qw(.);
use vars qw(
$template
$vars
);
# Include the Bugzilla CGI and general utility library.
require "CGI.pl";
# Establish a connection to the database backend.
ConnectToDatabase();
# Check whether or not the user is logged in and, if so, set the $userid
my $userid = quietly_check_login();
################################################################################
# Main Body Execution
################################################################################
# All calls to this script should contain an "action" variable whose value
# determines what the user wants to do. The code below checks the value of
# that variable and runs the appropriate code.
# Determine whether to use the action specified by the user or the default.
my $action = $::FORM{'action'} || 'view';
if ($action eq "view")
{
validateID();
view();
}
elsif ($action eq "viewall")
{
ValidateBugID($::FORM{'bugid'}, $userid);
viewall();
}
elsif ($action eq "enter")
{
my $userid = confirm_login();
ValidateBugID($::FORM{'bugid'}, $userid);
enter();
}
elsif ($action eq "insert")
{
my $userid = confirm_login();
ValidateBugID($::FORM{'bugid'}, $userid);
ValidateComment($::FORM{'comment'});
validateFilename();
validateData();
validateDescription();
validateIsPatch();
validateContentType() unless $::FORM{'ispatch'};
validateObsolete() if $::FORM{'obsolete'};
insert();
}
elsif ($action eq "edit")
{
quietly_check_login();
validateID();
validateCanEdit($::FORM{'id'});
edit();
}
elsif ($action eq "update")
{
my $userid = confirm_login();
UserInGroup($userid, "editbugs")
|| DisplayError("You are not authorized to edit attachments.")
&& exit;
ValidateComment($::FORM{'comment'});
validateID();
validateCanEdit($::FORM{'id'});
validateDescription();
validateIsPatch();
validateContentType() unless $::FORM{'ispatch'};
validateIsObsolete();
validateStatuses();
update();
}
else
{
DisplayError("I could not figure out what you wanted to do.")
}
exit;
################################################################################
# Data Validation / Security Authorization
################################################################################
sub validateID
{
# Validate the value of the "id" form field, which must contain an
# integer that is the ID of an existing attachment.
detaint_natural($::FORM{'id'})
|| DisplayError("You did not enter a valid attachment number.")
&& exit;
# Make sure the attachment exists in the database.
SendSQL("SELECT bug_id FROM attachments WHERE attach_id = $::FORM{'id'}");
MoreSQLData()
|| DisplayError("Attachment #$::FORM{'id'} does not exist.")
&& exit;
# Make sure the user is authorized to access this attachment's bug.
my ($bugid) = FetchSQLData();
ValidateBugID($bugid, $userid);
}
sub validateCanEdit
{
my ($attach_id) = (@_);
# If the user is not logged in, claim that they can edit. This allows
# the edit scrren to be displayed to people who aren't logged in.
# People not logged in can't actually commit changes, because that code
# calls confirm_login, not quietly_check_login, before calling this sub
return if $userid == 0;
# People in editbugs can edit all attachments
return if UserInGroup($userid, "editbugs");
# Bug 97729 - the submitter can edit their attachments
SendSQL("SELECT attach_id FROM attachments WHERE " .
"attach_id = $attach_id AND submitter_id = $userid");
FetchSQLData()
|| DisplayError("You are not authorised to edit attachment #$attach_id")
&& exit;
}
sub validateDescription
{
$::FORM{'description'}
|| DisplayError("You must enter a description for the attachment.")
&& exit;
}
sub validateIsPatch
{
# Set the ispatch flag to zero if it is undefined, since the UI uses
# an HTML checkbox to represent this flag, and unchecked HTML checkboxes
# do not get sent in HTML requests.
$::FORM{'ispatch'} = $::FORM{'ispatch'} ? 1 : 0;
# Set the content type to text/plain if the attachment is a patch.
$::FORM{'contenttype'} = "text/plain" if $::FORM{'ispatch'};
}
sub validateContentType
{
if (!$::FORM{'contenttypemethod'})
{
DisplayError("You must choose a method for determining the content type,
either <em>auto-detect</em>, <em>select from list</em>, or <em>enter
manually</em>.");
exit;
}
elsif ($::FORM{'contenttypemethod'} eq 'autodetect')
{
# The user asked us to auto-detect the content type, so use the type
# specified in the HTTP request headers.
if ( !$::FILE{'data'}->{'contenttype'} )
{
DisplayError("You asked Bugzilla to auto-detect the content type, but
your browser did not specify a content type when uploading the file,
so you must enter a content type manually.");
exit;
}
$::FORM{'contenttype'} = $::FILE{'data'}->{'contenttype'};
}
elsif ($::FORM{'contenttypemethod'} eq 'list')
{
# The user selected a content type from the list, so use their selection.
$::FORM{'contenttype'} = $::FORM{'contenttypeselection'};
}
elsif ($::FORM{'contenttypemethod'} eq 'manual')
{
# The user entered a content type manually, so use their entry.
$::FORM{'contenttype'} = $::FORM{'contenttypeentry'};
}
else
{
my $htmlcontenttypemethod = html_quote($::FORM{'contenttypemethod'});
DisplayError("Your form submission got corrupted somehow. The <em>content
method</em> field, which specifies how the content type gets determined,
should have been either <em>autodetect</em>, <em>list</em>,
or <em>manual</em>, but was instead <em>$htmlcontenttypemethod</em>.");
exit;
}
if ( $::FORM{'contenttype'} !~ /^(application|audio|image|message|model|multipart|text|video)\/.+$/ )
{
my $htmlcontenttype = html_quote($::FORM{'contenttype'});
DisplayError("The content type <em>$htmlcontenttype</em> is invalid.
Valid types must be of the form <em>foo/bar</em> where <em>foo</em>
is either <em>application, audio, image, message, model, multipart,
text,</em> or <em>video</em>.");
exit;
}
}
sub validateIsObsolete
{
# Set the isobsolete flag to zero if it is undefined, since the UI uses
# an HTML checkbox to represent this flag, and unchecked HTML checkboxes
# do not get sent in HTML requests.
$::FORM{'isobsolete'} = $::FORM{'isobsolete'} ? 1 : 0;
}
sub validateStatuses
{
# Get a list of attachment statuses that are valid for this attachment.
PushGlobalSQLState();
SendSQL("SELECT attachstatusdefs.id
FROM attachments, bugs, attachstatusdefs
WHERE attachments.attach_id = $::FORM{'id'}
AND attachments.bug_id = bugs.bug_id
AND attachstatusdefs.product = bugs.product");
my @statusdefs;
push(@statusdefs, FetchSQLData()) while MoreSQLData();
PopGlobalSQLState();
foreach my $status (@{$::MFORM{'status'}})
{
grep($_ == $status, @statusdefs)
|| DisplayError("One of the statuses you entered is not a valid status
for this attachment.")
&& exit;
# We have tested that the status is valid, so it can be detainted
detaint_natural($status);
}
}
sub validateData
{
$::FORM{'data'}
|| DisplayError("The file you are trying to attach is empty!")
&& exit;
my $len = length($::FORM{'data'});
my $maxpatchsize = Param('maxpatchsize');
my $maxattachmentsize = Param('maxattachmentsize');
# Makes sure the attachment does not exceed either the "maxpatchsize" or
# the "maxattachmentsize" parameter.
if ( $::FORM{'ispatch'} && $maxpatchsize && $len > $maxpatchsize*1024 )
{
my $lenkb = sprintf("%.0f", $len/1024);
DisplayError("The file you are trying to attach is ${lenkb} kilobytes (KB) in size.
Patches cannot be more than ${maxpatchsize}KB in size.
Try breaking your patch into several pieces.");
exit;
} elsif ( !$::FORM{'ispatch'} && $maxattachmentsize && $len > $maxattachmentsize*1024 ) {
my $lenkb = sprintf("%.0f", $len/1024);
DisplayError("The file you are trying to attach is ${lenkb} kilobytes (KB) in size.
Non-patch attachments cannot be more than ${maxattachmentsize}KB.
If your attachment is an image, try converting it to a compressable
format like JPG or PNG, or put it elsewhere on the web and
link to it from the bug's URL field or in a comment on the bug.");
exit;
}
}
sub validateFilename
{
defined $::FILE{'data'}
|| DisplayError("You did not specify a file to attach.")
&& exit;
}
sub validateObsolete
{
# Make sure the attachment id is valid and the user has permissions to view
# the bug to which it is attached.
foreach my $attachid (@{$::MFORM{'obsolete'}}) {
detaint_natural($attachid)
|| DisplayError("The attachment number of one of the attachments
you wanted to obsolete is invalid.")
&& exit;
SendSQL("SELECT bug_id, isobsolete, description
FROM attachments WHERE attach_id = $attachid");
# Make sure the attachment exists in the database.
MoreSQLData()
|| DisplayError("Attachment #$attachid does not exist.")
&& exit;
my ($bugid, $isobsolete, $description) = FetchSQLData();
if ($bugid != $::FORM{'bugid'})
{
$description = html_quote($description);
DisplayError("Attachment #$attachid ($description) is attached
to bug #$bugid, but you tried to flag it as obsolete while
creating a new attachment to bug #$::FORM{'bugid'}.");
exit;
}
if ( $isobsolete )
{
$description = html_quote($description);
DisplayError("Attachment #$attachid ($description) is already obsolete.");
exit;
}
# Check that the user can modify this attachment
validateCanEdit($attachid);
}
}
################################################################################
# Functions
################################################################################
sub view
{
# Display an attachment.
# Retrieve the attachment content and its content type from the database.
SendSQL("SELECT mimetype, thedata FROM attachments WHERE attach_id = $::FORM{'id'}");
my ($contenttype, $thedata) = FetchSQLData();
# Return the appropriate HTTP response headers.
print "Content-Type: $contenttype\n\n";
print $thedata;
}
sub viewall
{
# Display all attachments for a given bug in a series of IFRAMEs within one HTML page.
# Retrieve the attachments from the database and write them into an array
# of hashes where each hash represents one attachment.
SendSQL("SELECT attach_id, creation_ts, mimetype, description, ispatch, isobsolete
FROM attachments WHERE bug_id = $::FORM{'bugid'} ORDER BY attach_id");
my @attachments; # the attachments array
while (MoreSQLData())
{
my %a; # the attachment hash
($a{'attachid'}, $a{'date'}, $a{'contenttype'},
$a{'description'}, $a{'ispatch'}, $a{'isobsolete'}) = FetchSQLData();
# Format the attachment's creation/modification date into something readable.
if ($a{'date'} =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) {
$a{'date'} = "$3/$4/$2&nbsp;$5:$6";
}
# Flag attachments as to whether or not they can be viewed (as opposed to
# being downloaded). Currently I decide they are viewable if their MIME type
# is either text/*, image/*, or application/vnd.mozilla.*.
# !!! Yuck, what an ugly hack. Fix it!
$a{'isviewable'} = ( $a{'contenttype'} =~ /^(text|image|application\/vnd\.mozilla\.)/ );
# Retrieve a list of status flags that have been set on the attachment.
PushGlobalSQLState();
SendSQL("SELECT name
FROM attachstatuses, attachstatusdefs
WHERE attach_id = $a{'attachid'}
AND attachstatuses.statusid = attachstatusdefs.id
ORDER BY sortkey");
my @statuses;
push(@statuses, FetchSQLData()) while MoreSQLData();
$a{'statuses'} = \@statuses;
PopGlobalSQLState();
# Add the hash representing the attachment to the array of attachments.
push @attachments, \%a;
}
# Retrieve the bug summary for displaying on screen.
SendSQL("SELECT short_desc FROM bugs WHERE bug_id = $::FORM{'bugid'}");
my ($bugsummary) = FetchSQLData();
# Define the variables and functions that will be passed to the UI template.
$vars->{'bugid'} = $::FORM{'bugid'};
$vars->{'bugsummary'} = $bugsummary;
$vars->{'attachments'} = \@attachments;
# Return the appropriate HTTP response headers.
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/show-multiple.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
sub enter
{
# Display a form for entering a new attachment.
# Retrieve the attachments the user can edit from the database and write
# them into an array of hashes where each hash represents one attachment.
my $canEdit = "";
if (!UserInGroup($userid, "editbugs")) {
$canEdit = "AND submitter_id = $userid";
}
SendSQL("SELECT attach_id, description
FROM attachments
WHERE bug_id = $::FORM{'bugid'}
AND isobsolete = 0 $canEdit
ORDER BY attach_id");
my @attachments; # the attachments array
while ( MoreSQLData() ) {
my %a; # the attachment hash
($a{'id'}, $a{'description'}) = FetchSQLData();
# Add the hash representing the attachment to the array of attachments.
push @attachments, \%a;
}
# Retrieve the bug summary for displaying on screen.
SendSQL("SELECT short_desc FROM bugs WHERE bug_id = $::FORM{'bugid'}");
my ($bugsummary) = FetchSQLData();
# Define the variables and functions that will be passed to the UI template.
$vars->{'bugid'} = $::FORM{'bugid'};
$vars->{'bugsummary'} = $bugsummary;
$vars->{'attachments'} = \@attachments;
# Return the appropriate HTTP response headers.
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/create.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
sub insert
{
# Insert a new attachment into the database.
# Escape characters in strings that will be used in SQL statements.
my $filename = SqlQuote($::FILE{'data'}->{'filename'});
my $description = SqlQuote($::FORM{'description'});
my $contenttype = SqlQuote($::FORM{'contenttype'});
my $thedata = SqlQuote($::FORM{'data'});
# Insert the attachment into the database.
SendSQL("INSERT INTO attachments (bug_id, filename, description, mimetype, ispatch, submitter_id, thedata)
VALUES ($::FORM{'bugid'}, $filename, $description, $contenttype, $::FORM{'ispatch'}, $userid, $thedata)");
# Retrieve the ID of the newly created attachment record.
my $attachid = CurrId('attachments_attach_id_seq');
# Insert a comment about the new attachment into the database.
my $comment = "Created an attachment (id=$attachid)\n$::FORM{'description'}\n";
$comment .= ("\n" . $::FORM{'comment'}) if $::FORM{'comment'};
use Text::Wrap;
$Text::Wrap::columns = 80;
$Text::Wrap::huge = 'overflow';
$comment = Text::Wrap::wrap('', '', $comment);
AppendComment($::FORM{'bugid'},
$::COOKIE{"Bugzilla_login"},
$comment);
# Make existing attachments obsolete.
my $fieldid = GetFieldID('attachments.isobsolete');
foreach my $attachid (@{$::MFORM{'obsolete'}}) {
SendSQL("UPDATE attachments SET isobsolete = 1 WHERE attach_id = $attachid");
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when, fieldid, removed, added)
VALUES ($::FORM{'bugid'}, $attachid, $userid, NOW(), $fieldid, '0', '1')");
}
# Send mail to let people know the attachment has been created. Uses a
# special syntax of the "open" and "exec" commands to capture the output of
# "processmail", which "system" doesn't allow, without running the command
# through a shell, which backticks (``) do.
#system ("./processmail", $bugid , $userid);
#my $mailresults = `./processmail $bugid $::userid`;
my $mailresults = '';
open(PMAIL, "-|") or exec('./processmail', $::FORM{'bugid'}, $::COOKIE{'Bugzilla_login'});
$mailresults .= $_ while <PMAIL>;
close(PMAIL);
# Define the variables and functions that will be passed to the UI template.
$vars->{'bugid'} = $::FORM{'bugid'};
$vars->{'attachid'} = $attachid;
$vars->{'description'} = $description;
$vars->{'mailresults'} = $mailresults;
$vars->{'contenttypemethod'} = $::FORM{'contenttypemethod'};
$vars->{'contenttype'} = $::FORM{'contenttype'};
# Return the appropriate HTTP response headers.
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/created.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
SendSQL("SELECT short_desc FROM bugs WHERE bug_id = $::FORM{'bugid'}");
}
sub edit
{
# Edit an attachment record. Users with "editbugs" privileges, (or the
# original attachment's submitter) can edit the attachment's description,
# content type, ispatch and isobsolete flags, and statuses, and they can
# also submit a comment that appears in the bug.
# Users cannot edit the content of the attachment itself.
# Retrieve the attachment from the database.
SendSQL("SELECT description, mimetype, bug_id, ispatch, isobsolete
FROM attachments WHERE attach_id = $::FORM{'id'}");
my ($description, $contenttype, $bugid, $ispatch, $isobsolete) = FetchSQLData();
# Flag attachment as to whether or not it can be viewed (as opposed to
# being downloaded). Currently I decide it is viewable if its content
# type is either text/.* or application/vnd.mozilla.*.
# !!! Yuck, what an ugly hack. Fix it!
my $isviewable = ( $contenttype =~ /^(text|image|application\/vnd\.mozilla\.)/ );
# Retrieve a list of status flags that have been set on the attachment.
my %statuses;
SendSQL("SELECT id, name
FROM attachstatuses, attachstatusdefs
WHERE attachstatuses.statusid = attachstatusdefs.id
AND attach_id = $::FORM{'id'}");
while ( my ($id, $name) = FetchSQLData() )
{
$statuses{$id} = $name;
}
# Retrieve a list of statuses for this bug's product, and build an array
# of hashes in which each hash is a status flag record.
# ???: Move this into versioncache or its own routine?
my @statusdefs;
SendSQL("SELECT id, name
FROM attachstatusdefs, bugs
WHERE bug_id = $bugid
AND attachstatusdefs.product = bugs.product
ORDER BY sortkey");
while ( MoreSQLData() )
{
my ($id, $name) = FetchSQLData();
push @statusdefs, { 'id' => $id , 'name' => $name };
}
# Retrieve a list of attachments for this bug as well as a summary of the bug
# to use in a navigation bar across the top of the screen.
SendSQL("SELECT attach_id FROM attachments WHERE bug_id = $bugid ORDER BY attach_id");
my @bugattachments;
push(@bugattachments, FetchSQLData()) while (MoreSQLData());
SendSQL("SELECT short_desc FROM bugs WHERE bug_id = $bugid");
my ($bugsummary) = FetchSQLData();
# Define the variables and functions that will be passed to the UI template.
$vars->{'attachid'} = $::FORM{'id'};
$vars->{'description'} = $description;
$vars->{'contenttype'} = $contenttype;
$vars->{'bugid'} = $bugid;
$vars->{'bugsummary'} = $bugsummary;
$vars->{'ispatch'} = $ispatch;
$vars->{'isobsolete'} = $isobsolete;
$vars->{'isviewable'} = $isviewable;
$vars->{'statuses'} = \%statuses;
$vars->{'statusdefs'} = \@statusdefs;
$vars->{'attachments'} = \@bugattachments;
# Return the appropriate HTTP response headers.
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/edit.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
sub update
{
# Update an attachment record.
# Get the bug ID for the bug to which this attachment is attached.
SendSQL("SELECT bug_id FROM attachments WHERE attach_id = $::FORM{'id'}");
my $bugid = FetchSQLData()
|| DisplayError("Cannot figure out bug number.")
&& exit;
# Lock database tables in preparation for updating the attachment.
if ($::driver eq 'mysql') {
SendSQL("LOCK TABLES attachments WRITE , attachstatuses WRITE ,
attachstatusdefs READ , fielddefs READ , bugs_activity WRITE");
}
# Get a copy of the attachment record before we make changes
# so we can record those changes in the activity table.
SendSQL("SELECT description, mimetype, ispatch, isobsolete
FROM attachments WHERE attach_id = $::FORM{'id'}");
my ($olddescription, $oldcontenttype, $oldispatch, $oldisobsolete) = FetchSQLData();
# Get the list of old status flags.
SendSQL("SELECT attachstatusdefs.name
FROM attachments, attachstatuses, attachstatusdefs
WHERE attachments.attach_id = $::FORM{'id'}
AND attachments.attach_id = attachstatuses.attach_id
AND attachstatuses.statusid = attachstatusdefs.id
ORDER BY attachstatusdefs.sortkey
");
my @oldstatuses;
while (MoreSQLData()) {
push(@oldstatuses, FetchSQLData());
}
my $oldstatuslist = join(', ', @oldstatuses);
# Update the database with the new status flags.
SendSQL("DELETE FROM attachstatuses WHERE attach_id = $::FORM{'id'}");
foreach my $statusid (@{$::MFORM{'status'}})
{
SendSQL("INSERT INTO attachstatuses (attach_id, statusid) VALUES ($::FORM{'id'}, $statusid)");
}
# Get the list of new status flags.
SendSQL("SELECT attachstatusdefs.name
FROM attachments, attachstatuses, attachstatusdefs
WHERE attachments.attach_id = $::FORM{'id'}
AND attachments.attach_id = attachstatuses.attach_id
AND attachstatuses.statusid = attachstatusdefs.id
ORDER BY attachstatusdefs.sortkey
");
my @newstatuses;
while (MoreSQLData()) {
push(@newstatuses, FetchSQLData());
}
my $newstatuslist = join(', ', @newstatuses);
# Quote the description and content type for use in the SQL UPDATE statement.
my $quoteddescription = SqlQuote($::FORM{'description'});
my $quotedcontenttype = SqlQuote($::FORM{'contenttype'});
# Update the attachment record in the database.
# Sets the creation timestamp to itself to avoid it being updated automatically.
SendSQL("UPDATE attachments
SET description = $quoteddescription ,
mimetype = $quotedcontenttype ,
ispatch = $::FORM{'ispatch'} ,
isobsolete = $::FORM{'isobsolete'} ,
creation_ts = creation_ts
WHERE attach_id = $::FORM{'id'}
");
# Record changes in the activity table.
if ($olddescription ne $::FORM{'description'}) {
my $quotedolddescription = SqlQuote($olddescription);
my $fieldid = GetFieldID('attachments.description');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when, fieldid, removed, added)
VALUES ($bugid, $::FORM{'id'}, $userid, NOW(), $fieldid, $quotedolddescription, $quoteddescription)");
}
if ($oldcontenttype ne $::FORM{'contenttype'}) {
my $quotedoldcontenttype = SqlQuote($oldcontenttype);
my $fieldid = GetFieldID('attachments.mimetype');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when, fieldid, removed, added)
VALUES ($bugid, $::FORM{'id'}, $userid, NOW(), $fieldid, $quotedoldcontenttype, $quotedcontenttype)");
}
if ($oldispatch ne $::FORM{'ispatch'}) {
my $fieldid = GetFieldID('attachments.ispatch');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when, fieldid, removed, added)
VALUES ($bugid, $::FORM{'id'}, $userid, NOW(), $fieldid, $oldispatch, $::FORM{'ispatch'})");
}
if ($oldisobsolete ne $::FORM{'isobsolete'}) {
my $fieldid = GetFieldID('attachments.isobsolete');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when, fieldid, removed, added)
VALUES ($bugid, $::FORM{'id'}, $userid, NOW(), $fieldid, $oldisobsolete, $::FORM{'isobsolete'})");
}
if ($oldstatuslist ne $newstatuslist) {
my ($removed, $added) = DiffStrings($oldstatuslist, $newstatuslist);
my $quotedremoved = SqlQuote($removed);
my $quotedadded = SqlQuote($added);
my $fieldid = GetFieldID('attachstatusdefs.name');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when, fieldid, removed, added)
VALUES ($bugid, $::FORM{'id'}, $userid, NOW(), $fieldid, $quotedremoved, $quotedadded)");
}
# Unlock all database tables now that we are finished updating the database.
if ($::driver eq 'mysql') {
SendSQL("UNLOCK TABLES");
}
# If this installation has enabled the request manager, let the manager know
# an attachment was updated so it can check for requests on that attachment
# and fulfill them. The request manager allows users to request database
# changes of other users and tracks the fulfillment of those requests. When
# an attachment record is updated and the request manager is called, it will
# fulfill those requests that were requested of the user performing the update
# which are requests for the attachment being updated.
#my $requests;
#if (Param('userequestmanager'))
#{
# use Request;
# # Specify the fieldnames that have been updated.
# my @fieldnames = ('description', 'mimetype', 'status', 'ispatch', 'isobsolete');
# # Fulfill pending requests.
# $requests = Request::fulfillRequest('attachment', $::FORM{'id'}, @fieldnames);
# $vars->{'requests'} = $requests;
#}
# If the user submitted a comment while editing the attachment,
# add the comment to the bug.
if ( $::FORM{'comment'} )
{
use Text::Wrap;
$Text::Wrap::columns = 80;
$Text::Wrap::huge = 'wrap';
# Append a string to the comment to let users know that the comment came from
# the "edit attachment" screen.
my $comment = qq|(From update of attachment $::FORM{'id'})\n| . $::FORM{'comment'};
my $wrappedcomment = "";
foreach my $line (split(/\r\n|\r|\n/, $comment))
{
if ( $line =~ /^>/ )
{
$wrappedcomment .= $line . "\n";
}
else
{
$wrappedcomment .= wrap('', '', $line) . "\n";
}
}
# Get the user's login name since the AppendComment function needs it.
my $who = DBID_to_name($userid);
# Append the comment to the list of comments in the database.
AppendComment($bugid, $who, $wrappedcomment);
}
# Send mail to let people know the bug has changed. Uses a special syntax
# of the "open" and "exec" commands to capture the output of "processmail",
# which "system" doesn't allow, without running the command through a shell,
# which backticks (``) do.
#system ("./processmail", $bugid , $userid);
#my $mailresults = `./processmail $bugid $userid`;
my $mailresults = '';
open(PMAIL, "-|") or exec('./processmail', $bugid, DBID_to_name($userid));
$mailresults .= $_ while <PMAIL>;
close(PMAIL);
# Define the variables and functions that will be passed to the UI template.
$vars->{'attachid'} = $::FORM{'id'};
$vars->{'bugid'} = $bugid;
$vars->{'mailresults'} = $mailresults;
# Return the appropriate HTTP response headers.
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/updated.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}

View File

@@ -1,366 +0,0 @@
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Dave Miller <justdave@syndicomm.com>
use diagnostics;
use strict;
use RelationSet;
# Use the Attachment module to display attachments for the bug.
use Attachment;
sub show_bug {
# Shut up misguided -w warnings about "used only once". For some reason,
# "use vars" chokes on me when I try it here.
sub bug_form_pl_sillyness {
my $zz;
$zz = %::FORM;
$zz = %::proddesc;
$zz = %::prodmaxvotes;
$zz = @::enterable_products;
$zz = @::settable_resolution;
$zz = $::unconfirmedstate;
$zz = $::milestoneurl;
$zz = $::template;
$zz = $::vars;
$zz = @::legal_priority;
$zz = @::legal_platform;
$zz = @::legal_severity;
$zz = @::legal_bug_status;
$zz = @::target_milestone;
$zz = @::components;
$zz = @::legal_keywords;
$zz = @::versions;
$zz = @::legal_opsys;
}
# Use templates
my $template = $::template;
my $vars = $::vars;
$vars->{'GetBugLink'} = \&GetBugLink;
$vars->{'quoteUrls'} = \&quoteUrls,
$vars->{'lsearch'} = \&lsearch,
$vars->{'header_done'} = (@_),
my $userid = quietly_check_login();
my $id = $::FORM{'id'};
if (!defined($id)) {
$template->process("bug/choose.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
my %user = %{$vars->{'user'}};
my %bug;
# Populate the bug hash with the info we get directly from the DB.
my $query = "
SELECT
bugs.bug_id,
product,
version,
rep_platform,
op_sys,
bug_status,
resolution,
priority,
bug_severity,
component,
assigned_to,
reporter,
bug_file_loc,
short_desc,
target_milestone,
qa_contact,
status_whiteboard, ";
if ($::driver eq 'mysql') {
$query .= "
date_format(creation_ts, '%Y-%m-%d %H:%i'),
delta_ts, ";
} elsif ($::driver eq 'Pg') {
$query .= "
TO_CHAR(creation_ts, 'YYYY-MM-DD HH24:MI:SS'),
TO_CHAR(delta_ts, 'YYYYMMDDHH24MISS'), ";
}
$query .= "
SUM(votes.count)
FROM
bugs LEFT JOIN votes USING(bug_id)
WHERE
bugs.bug_id = $id
GROUP BY
bugs.bug_id,
product,
version,
rep_platform,
op_sys,
bug_status,
resolution,
priority,
bug_severity,
component,
assigned_to,
reporter,
bug_file_loc,
short_desc,
target_milestone,
qa_contact,
status_whiteboard,
creation_ts,
delta_ts ";
SendSQL($query);
my $value;
my @row = FetchSQLData();
foreach my $field ("bug_id", "product", "version", "rep_platform",
"op_sys", "bug_status", "resolution", "priority",
"bug_severity", "component", "assigned_to", "reporter",
"bug_file_loc", "short_desc", "target_milestone",
"qa_contact", "status_whiteboard", "creation_ts",
"delta_ts", "votes")
{
$value = shift(@row);
$bug{$field} = defined($value) ? $value : "";
}
# General arrays of info about the database state
GetVersionTable();
# Fiddle the product list.
my $seen_curr_prod;
my @prodlist;
foreach my $product (@::enterable_products) {
if ($product eq $bug{'product'}) {
# if it's the product the bug is already in, it's ALWAYS in
# the popup, period, whether the user can see it or not, and
# regardless of the disallownew setting.
$seen_curr_prod = 1;
push(@prodlist, $product);
next;
}
next if !CanSeeProduct($userid, $product);
push(@prodlist, $product);
}
# The current product is part of the popup, even if new bugs are no longer
# allowed for that product
if (!$seen_curr_prod) {
push (@prodlist, $bug{'product'});
@prodlist = sort @prodlist;
}
$vars->{'product'} = \@prodlist;
$vars->{'rep_platform'} = \@::legal_platform;
$vars->{'priority'} = \@::legal_priority;
$vars->{'bug_severity'} = \@::legal_severity;
$vars->{'op_sys'} = \@::legal_opsys;
$vars->{'bug_status'} = \@::legal_bug_status;
# Hack - this array contains "" for some reason. See bug 106589.
shift @::settable_resolution;
$vars->{'resolution'} = \@::settable_resolution;
$vars->{'component_'} = $::components{$bug{'product'}};
$vars->{'version'} = $::versions{$bug{'product'}};
$vars->{'target_milestone'} = $::target_milestone{$bug{'product'}};
$bug{'milestoneurl'} = $::milestoneurl{$bug{'product'}} ||
"notargetmilestone.html";
$vars->{'use_votes'} = $::prodmaxvotes{$bug{'product'}};
# Add additional, calculated fields to the bug hash
if (@::legal_keywords) {
$vars->{'use_keywords'} = 1;
SendSQL("SELECT keyworddefs.name
FROM keyworddefs, keywords
WHERE keywords.bug_id = $id
AND keyworddefs.id = keywords.keywordid
ORDER BY keyworddefs.name");
my @keywords;
while (MoreSQLData()) {
push(@keywords, FetchOneColumn());
}
$bug{'keywords'} = \@keywords;
}
# Attachments
$bug{'attachments'} = Attachment::query($id);
# Dependencies
my @list;
SendSQL("SELECT dependson FROM dependencies WHERE
blocked = $id ORDER BY dependson");
while (MoreSQLData()) {
my ($i) = FetchSQLData();
push(@list, $i);
}
$bug{'dependson'} = \@list;
my @list2;
SendSQL("SELECT blocked FROM dependencies WHERE
dependson = $id ORDER BY blocked");
while (MoreSQLData()) {
my ($i) = FetchSQLData();
push(@list2, $i);
}
$bug{'blocked'} = \@list2;
# Groups
my @groups;
my (%buggroups, %usergroups);
# Find out if this bug is private to any group
SendSQL("SELECT group_id FROM bug_group_map WHERE bug_id = $id");
while (my $group_id = FetchOneColumn()) {
$buggroups{$group_id} = 1;
}
# Get a list of active groups the user is in, subject to the above conditions
if ($userid) {
# NB - the number of groups is likely to be small - should we just select
# everything, and weed manually? OTOH, the number of products is likely
# to be small, too. This buggroup stuff needs to be rethought
SendSQL("SELECT groups.group_id, groups.isactive " .
"FROM user_group_map, " .
"groups LEFT JOIN products ON groups.name = products.product " .
"WHERE groups.group_id = user_group_map.group_id AND " .
"user_group_map.user_id = $userid AND groups.isbuggroup != 0 AND " .
"(groups.name = " . SqlQuote($bug{'product'}) . " OR " .
"products.product IS NULL)");
while (my $group_id = FetchOneColumn()) {
$usergroups{$group_id} = 1;
}
# Now get information about each group
SendSQL("SELECT group_id, name, description " .
"FROM groups " .
# "WHERE group_id IN (" . join(',', @groups) . ") " .
"ORDER BY description");
while (MoreSQLData()) {
my ($group_id, $name, $description) = FetchSQLData();
my ($ison, $ingroup);
if ($buggroups{$group_id} ||
($usergroups{$group_id} && (($name eq $bug{'product'}) ||
(!defined $::proddesc{$name}))))
{
$user{'inallgroups'} &= $ingroup;
push (@groups, { "bit" => $group_id,
"ison" => $buggroups{$group_id},
"ingroup" => $usergroups{$group_id},
"description" => $description });
}
}
# If the bug is restricted to a group, display checkboxes that allow
# the user to set whether or not the reporter
# and cc list can see the bug even if they are not members of all
# groups to which the bug is restricted.
if (%buggroups) {
$bug{'inagroup'} = 1;
# Determine whether or not the bug is always accessible by the
# reporter, QA contact, and/or users on the cc: list.
SendSQL("SELECT reporter_accessible, cclist_accessible
FROM bugs
WHERE bug_id = $id
");
($bug{'reporter_accessible'},
$bug{'cclist_accessible'}) = FetchSQLData();
}
}
$vars->{'groups'} = \@groups;
my $movers = Param("movers");
$user{'canmove'} = Param("move-enabled")
&& (defined $::COOKIE{"Bugzilla_login"})
&& ($::COOKIE{"Bugzilla_login"} =~ /\Q$movers\E/);
# User permissions
# In the below, if the person hasn't logged in ($::userid == 0), then
# we treat them as if they can do anything. That's because we don't
# know why they haven't logged in; it may just be because they don't
# use cookies. Display everything as if they have all the permissions
# in the world; their permissions will get checked when they log in
# and actually try to make the change.
$user{'canedit'} = $::userid == 0
|| $::userid == $bug{'reporter'}
|| $::userid == $bug{'qa_contact'}
|| $::userid == $bug{'assigned_to'}
|| UserInGroup($userid, "editbugs");
$user{'canconfirm'} = ($::userid == 0) || UserInGroup($userid, "canconfirm");
# Bug states
$bug{'isunconfirmed'} = ($bug{'bug_status'} eq $::unconfirmedstate);
$bug{'isopened'} = IsOpenedState($bug{'bug_status'});
# People involved with the bug
$bug{'assigned_to_email'} = DBID_to_name($bug{'assigned_to'});
$bug{'assigned_to'} = DBID_to_real_or_loginname($bug{'assigned_to'});
$bug{'reporter'} = DBID_to_real_or_loginname($bug{'reporter'});
$bug{'qa_contact'} = $bug{'qa_contact'} > 0 ?
DBID_to_name($bug{'qa_contact'}) : "";
my $ccset = new RelationSet;
$ccset->mergeFromDB("SELECT who FROM cc WHERE bug_id=$id");
my @cc = $ccset->toArrayOfStrings();
$bug{'cc'} = \@cc if $cc[0];
# Next bug in list (if there is one)
my @bug_list;
if ($::COOKIE{"BUGLIST"} && $id)
{
@bug_list = split(/:/, $::COOKIE{"BUGLIST"});
}
$vars->{'bug_list'} = \@bug_list;
$bug{'comments'} = GetComments($bug{'bug_id'});
# This is length in number of comments
$bug{'longdesclength'} = scalar(@{$bug{'comments'}});
# Add the bug and user hashes to the variables
$vars->{'bug'} = \%bug;
$vars->{'user'} = \%user;
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("bug/edit.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
1;

View File

@@ -1,206 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<!--
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is the Bugzilla Bug Tracking System.
The Initial Developer of the Original Code is Netscape Communications
Corporation. Portions created by Netscape are
Copyright (C) 1998 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Contributor(s): Terry Weissman <terry@mozilla.org>
-->
<head>
<TITLE>A Bug's Life Cycle</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1 ALIGN=CENTER>A Bug's Life Cycle</h1>
The <B>status</B> and <B>resolution</B> field define and track the
life cycle of a bug.
<a name="status"></a>
<p>
<TABLE BORDER=1 CELLPADDING=4>
<TR ALIGN=CENTER VALIGN=TOP>
<TD WIDTH="50%"><H1>STATUS</H1> <TD><H1>RESOLUTION</H1>
<TR VALIGN=TOP>
<TD>The <B>status</B> field indicates the general health of a bug. Only
certain status transitions are allowed.
<TD>The <b>resolution</b> field indicates what happened to this bug.
<TR VALIGN=TOP><TD>
<DL><DT><B>
<A HREF="confirmhelp.html">UNCONFIRMED</A></B>
<DD> This bug has recently been added to the database. Nobody has
validated that this bug is true. Users who have the "canconfirm"
permission set may confirm this bug, changing its state to NEW.
Or, it may be directly resolved and marked RESOLVED.
<DT><B>NEW</B>
<DD> This bug has recently been added to the assignee's list of bugs
and must be processed. Bugs in this state may be accepted, and
become <B>ASSIGNED</B>, passed on to someone else, and remain
<B>NEW</B>, or resolved and marked <B>RESOLVED</B>.
<DT><B>ASSIGNED</B>
<DD> This bug is not yet resolved, but is assigned to the proper
person. From here bugs can be given to another person and become
<B>NEW</B>, or resolved and become <B>RESOLVED</B>.
<DT><B>REOPENED</B>
<DD>This bug was once resolved, but the resolution was deemed
incorrect. For example, a <B>WORKSFORME</B> bug is
<B>REOPENED</B> when more information shows up and the bug is now
reproducible. From here bugs are either marked <B>ASSIGNED</B>
or <B>RESOLVED</B>.
</DL>
<TD>
<DL>
<DD> No resolution yet. All bugs which are in one of these "open" states
have the resolution set to blank. All other bugs
will be marked with one of the following resolutions.
</DL>
<TR VALIGN=TOP><TD>
<DL>
<DT><B>RESOLVED</B>
<DD> A resolution has been taken, and it is awaiting verification by
QA. From here bugs are either re-opened and become
<B>REOPENED</B>, are marked <B>VERIFIED</B>, or are closed for good
and marked <B>CLOSED</B>.
<DT><B>VERIFIED</B>
<DD> QA has looked at the bug and the resolution and agrees that the
appropriate resolution has been taken. Bugs remain in this state
until the product they were reported against actually ships, at
which point they become <B>CLOSED</B>.
<DT><B>CLOSED</B>
<DD> The bug is considered dead, the resolution is correct. Any zombie
bugs who choose to walk the earth again must do so by becoming
<B>REOPENED</B>.
</DL>
<TD>
<DL>
<DT><B>FIXED</B>
<DD> A fix for this bug is checked into the tree and tested.
<DT><B>INVALID</B>
<DD> The problem described is not a bug
<DT><B>WONTFIX</B>
<DD> The problem described is a bug which will never be fixed.
<DT><B>LATER</B>
<DD> The problem described is a bug which will not be fixed in this
version of the product.
<DT><B>REMIND</B>
<DD> The problem described is a bug which will probably not be fixed in this
version of the product, but might still be.
<DT><B>DUPLICATE</B>
<DD> The problem is a duplicate of an existing bug. Marking a bug
duplicate requires the bug# of the duplicating bug and will at
least put that bug number in the description field.
<DT><B>WORKSFORME</B>
<DD> All attempts at reproducing this bug were futile, reading the
code produces no clues as to why this behavior would occur. If
more information appears later, please re-assign the bug, for
now, file it.
</DL>
</TABLE>
<H1>Other Fields</H1>
<table border=1 cellpadding=4><tr><td>
<h2><a name="severity">Severity</a></h2>
This field describes the impact of a bug.
<p>
<p>
<table>
<tr><th>Blocker</th><td>Blocks development and/or testing work
<tr><th>Critical</th><td>crashes, loss of data, severe memory leak
<tr><th>Major</th><td>major loss of function
<tr><th>Minor</th><td>minor loss of function, or other problem where easy workaround is present
<tr><th>Trivial</th><td>cosmetic problem like misspelled words or misaligned text
<tr><th>Enhancement</th><td>Request for enhancement
</table>
</td><td>
<h2><a name="priority">Priority</a></h2>
This field describes the importance and order in which a bug should be
fixed. This field is utilized by the programmers/engineers to
prioritize their work to be done. The available priorities are:
<p>
<p>
<table>
<tr><th>P1</th><td>Most important
<tr><th>P2</th><td>
<tr><th>P3</th><td>
<tr><th>P4</th><td>
<tr><th>P5</th><td>Least important
</table>
</tr></table>
<h2><a name="rep_platform">Platform</a></h2>
This is the hardware platform against which the bug was reported. Legal
platforms include:
<UL>
<LI> All (happens on all platform; cross-platform bug)
<LI> Macintosh
<LI> PC
<LI> Sun
<LI> HP
</UL>
<b>Note:</b> Selecting the option "All" does not select bugs assigned against all platforms. It
merely selects bugs that <b>occur</b> on all platforms.
<h2><a name="op_sys">Operating System</a></h2>
This is the operating system against which the bug was reported. Legal
operating systems include:
<UL>
<LI> All (happens on all operating systems; cross-platform bug)
<LI> Windows 95
<LI> Mac System 8.0
<LI> Linux
</UL>
Note that the operating system implies the platform, but not always.
For example, Linux can run on PC and Macintosh and others.
<h2><a name="assigned_to">Assigned To</a></h2>
This is the person in charge of resolving the bug. Every time this
field changes, the status changes to <B>NEW</B> to make it easy to see
which new bugs have appeared on a person's list.
The default status for queries is set to NEW, ASSIGNED and REOPENED. When
searching for bugs that have been resolved or verified, remember to set the
status field appropriately.
<hr>
<!-- hhmts start -->
Last modified: Sun Apr 14 12:51:23 EST 2002
<!-- hhmts end -->
</body> </html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,392 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Bug Writing Guidelines</title>
</head>
<body>
<center>
<h1>Bug Writing Guidelines</h1>
</center>
<h3>Why You Should Read This</h3>
<blockquote>
<p>Simply put, the more effectively you report a bug, the more
likely an engineer will actually fix it.</p>
<p>These guidelines are a general
tutorial to teach novice and intermediate bug reporters how to compose effective bug reports. Not every sentence may precisely apply to
your software project.</p>
</blockquote>
<h3>How to Write a Useful Bug Report</h3>
<blockquote>
<p>Useful bug reports are ones that get bugs fixed. A useful bug
report normally has two qualities:</p>
<ol>
<li><b>Reproducible.</b> If an engineer can't see the bug herself to prove that it exists, she'll probably stamp your bug report "WORKSFORME" or "INVALID" and move on to the next bug. Every detail you can provide helps.<br>
<br>
</li>
<li><b>Specific.</b> The quicker the engineer can isolate the bug
to a specific area, the more likely she'll expediently fix it.
(If a programmer or tester has to decypher a bug, they may spend
more time cursing the submitter than solving the problem.)
<br>
<br>
[ <a href="#tips" name="Anchor">Tell Me More</a> ]
</li>
</ol>
<p>Let's say the application you're testing is a web browser. You
crash at foo.com, and want to write up a bug report:</p>
<blockquote>
<p><b>BAD:</b> "My browser crashed. I think I was on www.foo.com. I play golf with Bill Gates, so you better fix this problem, or I'll report you to him. By the way, your Back icon looks like a squashed rodent. UGGGLY. And my grandmother's home page is all messed up in your browser. Thx 4 UR help."
</p>
<p>
<b>GOOD:</b> "I crashed each time I went to www.foo.com, using
the 2002-02-25 build on a Windows 2000 system. I also
rebooted into Linux, and reproduced this problem using the 2002-02-24
Linux build.
</p>
<p>
It again crashed each time upon drawing the Foo banner at the top
of the page. I broke apart the page, and discovered that the
following image link will crash the application reproducibly,
unless you remove the "border=0" attribute:
</p>
<p>
<tt>&lt;IMG SRC="http://www.foo.com/images/topics/topicfoos.gif"
width="34" height="44" border="0" alt="News"&gt;</tt>
</p>
</blockquote>
</blockquote>
<h3>How to Enter your Useful Bug Report into Bugzilla:</h3>
<blockquote>
<p>Before you enter your bug, use Bugzilla's
<a href="query.cgi">search page</a> to determine whether the defect you've discovered is a known, already-reported bug. If your bug is the 37th duplicate of a known issue, you're more likely to annoy the engineer. (Annoyed
engineers fix fewer bugs.)
</p>
<p>
Next, be sure to reproduce your bug using a recent
build. Engineers tend to be most interested in problems affecting
the code base that they're actively working on. After all, the bug you're reporting
may already be fixed.
</p>
<p>
If you've discovered a new bug using a current build, report it in
Bugzilla:
</p>
<ol>
<li>From your Bugzilla main page, choose
"<a href="enter_bug.cgi">Enter a new bug</a>".</li>
<li>Select the product that you've found a bug in.</li>
<li>Enter your e-mail address, password, and press the "Login"
button. (If you don't yet have a password, leave the password field empty,
and press the "E-mail me a password" button instead.
You'll quickly receive an e-mail message with your password.)</li>
</ol>
<p>Now, fill out the form. Here's what it all means:</p>
<p><b>Where did you find the bug?</b></p>
<blockquote>
<p><b>Product: In which product did you find the bug?</b><br>
You just specified this on the last page, so you can't edit it here.</p>
<p><b>Version: In which product version did you find the
bug?</b><br>
(If applicable)</p>
<p><b>Component: In which component does the bug exist?</b><br>
Bugzilla requires that you select a component to enter a bug. (Not sure which to choose?
Click on the Component link. You'll see a description of each component, to help you make the best choice.)</p>
<p><b>OS: On which Operating System (OS) did you find this bug?</b>
(e.g. Linux, Windows 2000, Mac OS 9.)<br>
If you know the bug happens on all OSs, choose 'All'. Otherwise,
select the OS that you found the bug on, or "Other" if your OS
isn't listed.</p>
</blockquote>
<p><b>How important is the bug?</b></p>
<blockquote>
<p><b>Severity: How damaging is the bug?</b><br>
This item defaults to 'normal'. If you're not sure what severity your bug deserves, click on the Severity link.
You'll see a description of each severity rating. <br>
</p>
</blockquote>
<p><b>Who will be following up on the bug?</b></p>
<blockquote>
<p><b>Assigned To: Which engineer should be responsible for fixing
this bug?</b><br>
Bugzilla will automatically assign the bug to a default engineer
upon submitting a bug report. If you'd prefer to directly assign the bug to
someone else, enter their e-mail address into this field. (To see the list of
default engineers for each component, click on the Component
link.)</p>
<p><b>Cc: Who else should receive e-mail updates on changes to this
bug?</b><br>
List the full e-mail addresses of other individuals who should
receive an e-mail update upon every change to the bug report. You
can enter as many e-mail addresses as you'd like, separated by spaces or commas, as long as those
people have Bugzilla accounts.</p>
</blockquote>
<p><b>What else can you tell the engineer about the bug?</b></p>
<blockquote>
<p><b>Summary:</b> <b>How would you describe the bug, in
approximately 60 or fewer characters?</b><br>
A good summary should <b>quickly and uniquely identify a bug
report</b>. Otherwise, an engineer cannot meaningfully identify
your bug by its summary, and will often fail to pay attention to
your bug report when skimming through a 10 page bug list.<br>
<br>
A useful summary might be
"<tt>PCMCIA install fails on Tosh Tecra 780DVD w/ 3c589C</tt>".
"<tt>Software fails</tt>" or "<tt>install problem</tt>" would be
examples of a bad summary.<br>
<br>
[ <a href="#summary">Tell Me More</a> ]<br>
<br>
<b>Description: </b><br>
Please provide a detailed problem report in this field.
Your bug's recipients will most likely expect the following information:</p>
<blockquote>
<p><b>Overview Description:</b> More detailed expansion of
summary.</p>
<blockquote>
<pre>
Drag-selecting any page crashes Mac builds in NSGetFactory
</pre>
</blockquote>
<p><b>Steps to Reproduce:</b> Minimized, easy-to-follow steps that will
trigger the bug. Include any special setup steps.</p>
<blockquote>
<pre>
1) View any web page. (I used the default sample page,
resource:/res/samples/test0.html)
2) Drag-select the page. (Specifically, while holding down
the mouse button, drag the mouse pointer downwards from any
point in the browser's content region to the bottom of the
browser's content region.)
</pre>
</blockquote>
<p>
<b>Actual Results:</b> What the application did after performing
the above steps.
</p>
<blockquote>
<pre>
The application crashed. Stack crawl appended below from MacsBug.
</pre>
</blockquote>
<p><b>Expected Results:</b> What the application should have done,
were the bug not present.</p>
<blockquote>
<pre>
The window should scroll downwards. Scrolled content should be selected.
(Or, at least, the application should not crash.)
</pre>
</blockquote>
<p><b>Build Date &amp; Platform:</b> Date and platform of the build
that you first encountered the bug in.</p>
<blockquote>
<pre>
Build 2002-03-15 on Mac OS 9.0
</pre>
</blockquote>
<p><b>Additional Builds and Platforms:</b> Whether or not the bug
takes place on other platforms (or browsers, if applicable).</p>
<blockquote>
<pre>
- Also Occurs On
Mozilla (2002-03-15 build on Windows NT 4.0)
- Doesn't Occur On
Mozilla (2002-03-15 build on Red Hat Linux; feature not supported)
Internet Explorer 5.0 (shipping build on Windows NT 4.0)
Netscape Communicator 4.5 (shipping build on Mac OS 9.0)
</pre>
</blockquote>
<p><b>Additional Information:</b> Any other debugging information.
For crashing bugs:</p>
<ul>
<li><b>Win32:</b> if you receive a Dr. Watson error, please note
the type of the crash, and the module that the application crashed
in. (e.g. access violation in apprunner.exe)</li>
<li><b>Mac OS:</b> if you're running MacsBug, please provide the
results of a <b>how</b> and an <b>sc</b>:</li>
</ul>
<blockquote>
<pre>
*** MACSBUG STACK CRAWL OF CRASH (Mac OS)
Calling chain using A6/R1 links
Back chain ISA Caller
00000000 PPC 0BA85E74
03AEFD80 PPC 0B742248
03AEFD30 PPC 0B50FDDC NSGetFactory+027FC
PowerPC unmapped memory exception at 0B512BD0 NSGetFactory+055F0
</pre>
</blockquote>
</blockquote>
</blockquote>
<p>You're done!<br>
<br>
After double-checking your entries for any possible errors, press
the "Commit" button, and your bug report will now be in the
Bugzilla database.<br>
</p>
</blockquote>
<hr>
<h3>More Information on Writing Good Bugs</h3>
<blockquote>
<p><b><a name="tips"></a> 1. General Tips for a Useful Bug
Report</b>
</p>
<blockquote>
<p>
<b>Use an explicit structure, so your bug reports are easy to
skim.</b> Bug report users often need immediate access to specific
sections of your bug. If your Bugzilla installation supports the
Bugzilla Helper, use it.
</p>
<p>
<b>Avoid cuteness if it costs clarity.</b> Nobody will be laughing
at your funny bug title at 3:00 AM when they can't remember how to
find your bug.
</p>
<p>
<b>One bug per report.</b> Completely different people typically
fix, verify, and prioritize different bugs. If you mix a handful of
bugs into a single report, the right people probably won't discover
your bugs in a timely fashion, or at all. Certain bugs are also
more important than others. It's impossible to prioritize a bug
report when it contains four different issues, all of differing
importance.
</p>
<p>
<b>No bug is too trivial to report.</b> Unless you're reading the
source code, you can't see actual software bugs, like a dangling
pointer -- you'll see their visible manifestations, such as the
segfault when the application finally crashes. Severe software
problems can manifest themselves in superficially trivial ways.
File them anyway.<br>
</p>
</blockquote>
<p><b><a name="summary"></a>2. How and Why to Write Good Bug Summaries</b>
</p>
<blockquote>
<p><b>You want to make a good first impression on the bug
recipient.</b> Just like a New York Times headline guides readers
towards a relevant article from dozens of choices, will your bug summary
suggest that your bug report is worth reading from dozens or hundreds of
choices?
</p>
<p>
Conversely, a vague bug summary like <tt>install problem</tt> forces anyone
reviewing installation bugs to waste time opening up your bug to
determine whether it matters.
</p>
<p>
<b>Your bug will often be searched by its summary.</b> Just as
you'd find web pages with Google by searching by keywords through
intuition, so will other people locate your bugs. Descriptive bug
summaries are naturally keyword-rich, and easier to find.
</p>
<p>
For example, you'll find a bug titled "<tt>Dragging icons from List View to
gnome-terminal doesn't paste path</tt>" if you search on "List",
"terminal", or "path". Those search keywords wouldn't have found a
bug titled "<tt>Dragging icons
doesn't paste</tt>".
</p>
<p>
Ask yourself, "Would someone understand my bug from just this
summary?" If so, you've written a fine summary.
</p>
<p><b>Don't write titles like these:</b></p>
<ol>
<li>"Can't install" - Why can't you install? What happens when you
try to install?</li>
<li>"Severe Performance Problems" - ...and they occur when you do
what?</li>
<li>"back button does not work" - Ever? At all?</li>
</ol>
<p><b>Good bug titles:</b></p>
<ol>
<li>"1.0 upgrade installation fails if Mozilla M18 package present"
- Explains problem and the context.</li>
<li>"RPM 4 installer crashes if launched on Red Hat 6.2 (RPM 3)
system" - Explains what happens, and the context.</li>
</ol>
</blockquote>
</blockquote>
<p>(Written and maintained by
<a href="http://www.prometheus-music.com/eli">Eli Goldberg</a>. Claudius
Gayle, Gervase Markham, Peter Mock, Chris Pratt, Tom Schutter and Chris Yeh also
contributed significant changes. Constructive
<a href="mailto:eli@prometheus-music.com">suggestions</a> welcome.)</p>
</body>
</html>

View File

@@ -1,46 +0,0 @@
<!ELEMENT bugzilla (bug+)>
<!ATTLIST bugzilla
version CDATA #REQUIRED
urlbase CDATA #REQUIRED
maintainer CDATA #REQUIRED
exporter CDATA #IMPLIED
>
<!ELEMENT bug (bug_id, (bug_status, product, priority, version, rep_platform, assigned_to, delta_ts, component, reporter, target_milestone?, bug_severity, creation_ts, qa_contact?, op_sys, resolution?, bug_file_loc?, short_desc?, keywords*, status_whiteboard?, dependson*, blocks*, cc*, long_desc*, attachment*)?)>
<!ATTLIST bug
error (NotFound | NotPermitted | InvalidBugId) #IMPLIED
>
<!ELEMENT bug_id (#PCDATA)>
<!ELEMENT exporter (#PCDATA)>
<!ELEMENT urlbase (#PCDATA)>
<!ELEMENT bug_status (#PCDATA)>
<!ELEMENT product (#PCDATA)>
<!ELEMENT priority (#PCDATA)>
<!ELEMENT version (#PCDATA)>
<!ELEMENT rep_platform (#PCDATA)>
<!ELEMENT assigned_to (#PCDATA)>
<!ELEMENT delta_ts (#PCDATA)>
<!ELEMENT component (#PCDATA)>
<!ELEMENT reporter (#PCDATA)>
<!ELEMENT target_milestone (#PCDATA)>
<!ELEMENT bug_severity (#PCDATA)>
<!ELEMENT creation_ts (#PCDATA)>
<!ELEMENT qa_contact (#PCDATA)>
<!ELEMENT status_whiteboard (#PCDATA)>
<!ELEMENT op_sys (#PCDATA)>
<!ELEMENT resolution (#PCDATA)>
<!ELEMENT bug_file_loc (#PCDATA)>
<!ELEMENT short_desc (#PCDATA)>
<!ELEMENT keywords (#PCDATA)>
<!ELEMENT dependson (#PCDATA)>
<!ELEMENT blocks (#PCDATA)>
<!ELEMENT cc (#PCDATA)>
<!ELEMENT long_desc (who, bug_when, thetext)>
<!ELEMENT who (#PCDATA)>
<!ELEMENT bug_when (#PCDATA)>
<!ELEMENT thetext (#PCDATA)>
<!ELEMENT attachment (attachid, date, desc, type?, data?)>
<!ELEMENT attachid (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT data (#PCDATA)>

View File

@@ -1,39 +0,0 @@
#!/usr/bonsaitools/bin/perl -wT
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
use strict;
print q{Content-type: text/html
<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh"
CONTENT="0; URL=userprefs.cgi">
</HEAD>
<BODY>
This URL is obsolete. Forwarding you to the correct one.
<P>
Going to <A HREF="userprefs.cgi">userprefs.cgi</A>
<BR>
</BODY>
</HTML>
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,156 +0,0 @@
#!/usr/bonsaitools/bin/perl -wT
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
use diagnostics;
use strict;
use lib qw(.);
use vars qw(
@legal_keywords
$buffer
$template
$vars
);
require "CGI.pl";
# Use the template toolkit (http://www.template-toolkit.org/) to generate
# the user interface (HTML pages and mail messages) using templates in the
# "template/" subdirectory.
use Template;
# Create the global template object that processes templates and specify
# configuration parameters that apply to all templates processed in this script.
my $template = Template->new(
{
# Colon-separated list of directories containing templates.
INCLUDE_PATH => "template/custom:template/default",
# Allow templates to be specified with relative paths.
RELATIVE => 1,
PRE_CHOMP => 1,
});
# Define the global variables and functions that will be passed to the UI
# template. Individual functions add their own values to this hash before
# sending them to the templates they process.
my $vars =
{
# Function for retrieving global parameters.
'Param' => \&Param,
# Function for processing global parameters that contain references
# to other global parameters.
'PerformSubsts' => \&PerformSubsts,
# Function to search an array for a value
'lsearch' => \&lsearch,
};
print "Content-type: text/html\n";
# The master list not only says what fields are possible, but what order
# they get displayed in.
ConnectToDatabase();
GetVersionTable();
my @masterlist = ("opendate", "changeddate", "severity", "priority",
"platform", "owner", "reporter", "status", "resolution",
"product", "component", "version", "os", "votes");
if (Param("usetargetmilestone")) {
push(@masterlist, "target_milestone");
}
if (Param("useqacontact")) {
push(@masterlist, "qa_contact");
}
if (Param("usestatuswhiteboard")) {
push(@masterlist, "status_whiteboard");
}
if (@::legal_keywords) {
push(@masterlist, "keywords");
}
push(@masterlist, ("summary", "summaryfull"));
$vars->{masterlist} = \@masterlist;
my @collist;
if (defined $::FORM{'rememberedquery'}) {
my $splitheader = 0;
if (defined $::FORM{'resetit'}) {
@collist = @::default_column_list;
} else {
foreach my $i (@masterlist) {
if (defined $::FORM{"column_$i"}) {
push @collist, $i;
}
}
if (exists $::FORM{'splitheader'}) {
$splitheader = $::FORM{'splitheader'};
}
}
my $list = join(" ", @collist);
my $urlbase = Param("urlbase");
my $cookiepath = Param("cookiepath");
print "Set-Cookie: COLUMNLIST=$list ; path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
print "Set-Cookie: SPLITHEADER=$::FORM{'splitheader'} ; path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
print "Refresh: 0; URL=buglist.cgi?$::FORM{'rememberedquery'}\n";
print "\n";
print "<META HTTP-EQUIV=Refresh CONTENT=\"1; URL=$urlbase"."buglist.cgi?$::FORM{'rememberedquery'}\">\n";
print "<TITLE>What a hack.</TITLE>\n";
PutHeader ("Change columns");
print "Resubmitting your query with new columns...\n";
exit;
}
if (defined $::COOKIE{'COLUMNLIST'}) {
@collist = split(/ /, $::COOKIE{'COLUMNLIST'});
} else {
@collist = @::default_column_list;
}
$vars->{collist} = \@collist;
$vars->{splitheader} = 0;
if ($::COOKIE{'SPLITHEADER'}) {
$vars->{splitheader} = 1;
}
my %desc = ();
foreach my $i (@masterlist) {
$desc{$i} = $i;
}
$desc{'summary'} = "Summary (first 60 characters)";
$desc{'summaryfull'} = "Full Summary";
$vars->{desc} = \%desc;
$vars->{buffer} = $::buffer;
# Generate and return the UI (HTML page) from the appropriate template.
print "Content-type: text/html\n\n";
$template->process("list/change-columns.html.tmpl", $vars)
|| ThrowTemplateError($template->error());

View File

@@ -1,202 +0,0 @@
#!/usr/bonsaitools/bin/perl -w
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>,
# Harrison Page <harrison@netscape.com>
# Gervase Markham <gerv@gerv.net>
# Run me out of cron at midnight to collect Bugzilla statistics.
use AnyDBM_File;
use diagnostics;
use strict;
use vars @::legal_product;
require "globals.pl";
# tidy up after graphing module
if (chdir("graphs")) {
unlink <./*.gif>;
unlink <./*.png>;
chdir("..");
}
ConnectToDatabase(1);
GetVersionTable();
my @myproducts;
push( @myproducts, "-All-", @::legal_product );
foreach (@myproducts) {
my $dir = "data/mining";
&check_data_dir ($dir);
&collect_stats ($dir, $_);
}
&calculate_dupes();
sub check_data_dir {
my $dir = shift;
if (! -d) {
mkdir $dir, 0777;
chmod 0777, $dir;
}
}
sub collect_stats {
my $dir = shift;
my $product = shift;
my $when = localtime (time);
# NB: Need to mangle the product for the filename, but use the real
# product name in the query
my $file_product = $product;
$file_product =~ s/\//-/gs;
my $file = join '/', $dir, $file_product;
my $exists = -f $file;
if (open DATA, ">>$file") {
push my @row, &today;
foreach my $status ('NEW', 'ASSIGNED', 'REOPENED', 'UNCONFIRMED', 'RESOLVED', 'VERIFIED', 'CLOSED') {
if( $product eq "-All-" ) {
SendSQL("select count(bug_status) from bugs where bug_status='$status'");
} else {
SendSQL("select count(bug_status) from bugs where bug_status='$status' and product='$product'");
}
push @row, FetchOneColumn();
}
foreach my $resolution ('FIXED', 'INVALID', 'WONTFIX', 'LATER', 'REMIND', 'DUPLICATE', 'WORKSFORME', 'MOVED') {
if( $product eq "-All-" ) {
SendSQL("select count(resolution) from bugs where resolution='$resolution'");
} else {
SendSQL("select count(resolution) from bugs where resolution='$resolution' and product='$product'");
}
push @row, FetchOneColumn();
}
if (! $exists) {
print DATA <<FIN;
# Bugzilla Daily Bug Stats
#
# Do not edit me! This file is generated.
#
# fields: DATE|NEW|ASSIGNED|REOPENED|UNCONFIRMED|RESOLVED|VERIFIED|CLOSED|FIXED|INVALID|WONTFIX|LATER|REMIND|DUPLICATE|WORKSFORME|MOVED
# Product: $product
# Created: $when
FIN
}
print DATA (join '|', @row) . "\n";
close DATA;
} else {
print "$0: $file, $!";
}
}
sub calculate_dupes {
SendSQL("SELECT * FROM duplicates");
my %dupes;
my %count;
my @row;
my $key;
my $changed = 1;
my $today = &today_dash;
# Save % count here in a date-named file
# so we can read it back in to do changed counters
# First, delete it if it exists, so we don't add to the contents of an old file
if (my @files = <data/duplicates/dupes$today*>) {
unlink @files;
}
dbmopen(%count, "data/duplicates/dupes$today", 0644) || die "Can't open DBM dupes file: $!";
# Create a hash with key "a bug number", value "bug which that bug is a
# direct dupe of" - straight from the duplicates table.
while (@row = FetchSQLData()) {
my $dupe_of = shift @row;
my $dupe = shift @row;
$dupes{$dupe} = $dupe_of;
}
# Total up the number of bugs which are dupes of a given bug
# count will then have key = "bug number",
# value = "number of immediate dupes of that bug".
foreach $key (keys(%dupes))
{
my $dupe_of = $dupes{$key};
if (!defined($count{$dupe_of})) {
$count{$dupe_of} = 0;
}
$count{$dupe_of}++;
}
# Now we collapse the dupe tree by iterating over %count until
# there is no further change.
while ($changed == 1)
{
$changed = 0;
foreach $key (keys(%count)) {
# if this bug is actually itself a dupe, and has a count...
if (defined($dupes{$key}) && $count{$key} > 0) {
# add that count onto the bug it is a dupe of,
# and zero the count; the check is to avoid
# loops
if ($count{$dupes{$key}} != 0) {
$count{$dupes{$key}} += $count{$key};
$count{$key} = 0;
$changed = 1;
}
}
}
}
# Remove the values for which the count is zero
foreach $key (keys(%count))
{
if ($count{$key} == 0) {
delete $count{$key};
}
}
dbmclose(%count);
}
sub today {
my ($dom, $mon, $year) = (localtime(time))[3, 4, 5];
return sprintf "%04d%02d%02d", 1900 + $year, ++$mon, $dom;
}
sub today_dash {
my ($dom, $mon, $year) = (localtime(time))[3, 4, 5];
return sprintf "%04d-%02d-%02d", 1900 + $year, ++$mon, $dom;
}

View File

@@ -1,168 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<!--
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is the Bugzilla Bug Tracking System.
The Initial Developer of the Original Code is Netscape Communications
Corporation. Portions created by Netscape are
Copyright (C) 2000 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s): Terry Weissman <terry@mozilla.org>
-->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Understanding the UNCONFIRMED state, and other recent changes</title>
</head>
<body>
<h1>Understanding the UNCONFIRMED state, and other recent changes</h1>
<p>
[This document is aimed primarily at people who have used Bugzilla
before the UNCONFIRMED state was implemented. It might be helpful for
newer users as well.]
</p>
<p>
New bugs in some products will now show up in a new state,
UNCONFIRMED. This means that we have nobody has confirmed that the
bug is real. Very busy engineers will probably generally ignore
UNCONFIRMED that have been assigned to them, until they have been
confirmed in one way or another. (Engineers with more time will
hopefully glance over their UNCONFIRMED bugs regularly.)
</p>
<p>
The <a href="bug_status.html">page describing bug fields</a> has been
updated to include UNCONFIRMED.
</p>
<p>
There are two basic ways that a bug can become confirmed (and enter
the NEW) state.
</p>
<ul>
<li> A user with the appropriate permissions (see below for more on
permissions) decides that the bug is a valid one, and confirms
it. We hope to gather a small army of responsible volunteers
to regularly go through bugs for us.</li>
<li> The bug gathers a certain number of votes. <b>Any</b> valid Bugzilla user may vote for
bugs (each user gets a certain number of bugs); any UNCONFIRMED bug which
gets enough votes becomes automatically confirmed, and enters the NEW state.</li>
</ul>
<p>
One implication of this is that it is worth your time to search the
bug system for duplicates of your bug to vote on them, before
submitting your own bug. If we can spread around knowledge of this
fact, it ought to help cut down the number of duplicate bugs in the
system.
</p>
<h2>Permissions.</h2>
<p>
Users now have a certain set of permissions. To see your permissions,
check out the
<a href="userprefs.cgi?bank=permissions">user preferences</a> page.
</p>
<p>
If you have the "Can confirm a bug" permission, then you will be able
to move UNCONFIRMED bugs into the NEW state.
</p>
<p>
If you have the "Can edit all aspects of any bug" permission, then you
can tweak anything about any bug. If not, you may only edit those
bugs that you have submitted, or that you have assigned to you (or
qa-assigned to you). However, anyone may add a comment to any bug.
</p>
<p>
Some people (initially, the initial owners and initial qa-contacts for
components in the system) have the ability to give the above two
permissions to other people. So, if you really feel that you ought to
have one of these permissions, a good person to ask (via private
email, please!) is the person who is assigned a relevant bug.
</p>
<h2>Other details.</h2>
<p>
An initial stab was taken to decide who would be given which of the
above permissions. This was determined by some simple heurstics of
who was assigned bugs, and who the default owners of bugs were, and a
look at people who seem to have submitted several bugs that appear to
have been interesting and valid. Inevitably, we have failed to give
someone the permissions they deserve. Please don't take it
personally; just bear with us as we shake out the new system.
</p>
<p>
People with one of the two bits above can easily confirm their own
bugs, so bugs they submit will actually start out in the NEW state.
They can override this when submitting a bug.
</p>
<p>
People can ACCEPT or RESOLVE a bug assigned to them, even if they
aren't allowed to confirm it. However, the system remembers, and if
the bug gets REOPENED or reassigned to someone else, it will revert
back to the UNCONFIRMED state. If the bug has ever been confirmed,
then REOPENing or reassigning will cause it to go to the NEW or
REOPENED state.
</p>
<p>
Note that only some products support the UNCONFIRMED state. In other
products, all new bugs will automatically start in the NEW state.
</p>
<h2>Things still to be done.</h2>
<p>
There probably ought to be a way to get a bug back into the
UNCONFIRMED state, but there isn't yet.
</p>
<p>
If a person has submitted several bugs that get confirmed, then this
is probably a person who understands the system well, and deserves the
"Can confirm a bug" permission. This kind of person should be
detected and promoted automatically.
</p>
<p>
There should also be a way to automatically promote people to get the
"Can edit all aspects of any bug" permission.
</p>
<p>
The "enter a new bug" page needs to be revamped with easy ways for new
people to educate themselves on the benefit of searching for a bug
like the one they're about to submit and voting on it, rather than
adding a new useless duplicate.
</p>
<hr>
<p>
<!-- hhmts start -->
Last modified: Sun Apr 14 12:55:14 EST 2002
<!-- hhmts end -->
</p>
</body> </html>

View File

@@ -1,79 +0,0 @@
# -*- Mode: perl; indent-tabs-mode: nil -*-
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# This code is based on code found in bug_email.pl from the bugzilla
# email tracker. Initial contributors are ::
# Terry Weissman <terry@mozilla.org>
# Gregor Fischer <fischer@suse.de>
# Klaas Freitag <freitag@suse.de>
# Seth Landsman <seth@dworkin.net>
# The purpose of this module is to abstract out a bunch of the code
# that is central to email interfaces to bugzilla and its database
# Contributor : Seth Landsman <seth@dworkin.net>
# Initial checkin : 03/15/00 (SML)
# findUser() function moved from bug_email.pl to here
push @INC, "../."; # this script now lives in contrib
require "globals.pl";
use diagnostics;
use strict;
my $EMAIL_TRANSFORM_NONE = "email_transform_none";
my $EMAIL_TRANSFORM_BASE_DOMAIN = "email_transform_base_domain";
my $EMAIL_TRANSFORM_NAME_ONLY = "email_transform_name_only";
# change to do incoming email address fuzzy matching
my $email_transform = $EMAIL_TRANSFORM_NAME_ONLY;
# findUser()
# This function takes an email address and returns the user email.
# matching is sloppy based on the $email_transform parameter
sub findUser($) {
my ($address) = @_;
# if $email_transform is $EMAIL_TRANSFORM_NONE, return the address, otherwise, return undef
if ($email_transform eq $EMAIL_TRANSFORM_NONE) {
my $stmt = "SELECT login_name FROM profiles WHERE profiles.login_name = \'$address\';";
SendSQL($stmt);
my $found_address = FetchOneColumn();
return $found_address;
} elsif ($email_transform eq $EMAIL_TRANSFORM_BASE_DOMAIN) {
my ($username) = ($address =~ /(.+)@/);
my $stmt = "SELECT login_name FROM profiles WHERE profiles.login_name RLIKE \'$username\';";
SendSQL($stmt);
my $domain;
my $found = undef;
my $found_address;
my $new_address = undef;
while ((!$found) && ($found_address = FetchOneColumn())) {
($domain) = ($found_address =~ /.+@(.+)/);
if ($address =~ /$domain/) {
$found = 1;
$new_address = $found_address;
}
}
return $new_address;
} elsif ($email_transform eq $EMAIL_TRANSFORM_NAME_ONLY) {
my ($username) = ($address =~ /(.+)@/);
my $stmt = "SELECT login_name FROM profiles WHERE profiles.login_name RLIKE \'$username\';";
SendSQL($stmt);
my $found_address = FetchOneColumn();
return $found_address;
}
}
1;

View File

@@ -1,22 +0,0 @@
This directory contains contributed software related to Bugzilla.
Things in here have not necessarily been tested or tried by anyone
except the original contributor, so tred carefully. But it may still
be useful to you.
This directory includes:
mysqld-watcher.pl -- This script can be installed as a frequent cron
job to clean up stalled/dead queries.
gnats2bz.pl -- A perl script to help import bugs from a GNATS
database into a Bugzilla database. Contributed by
Tom Schutter <tom@platte.com>
bug_email.pl -- A perl script that can receive email containing
bug reports (email-interface). Contributed by
Klaas Freitag <freitag@SuSE.de>
README.Mailif -- Readme describing the mail interface.
bugmail_help.html -- User help page for the mail interface.
yp_nomail.sh -- Script you can run via cron that regularly updates
the nomail file for terminated employees

View File

@@ -1,80 +0,0 @@
The Bugzilla Mail interface
===========================
(UPDATE 03/14/00 to better reflect reality by SML)
The Bugzilla Mail interface allows to submit bugs to Bugzilla by email.
The Mail Interface Contribution consists of three files:
README.Mailif - this readme.
bug_email.pl - the script
bugmail_help.html - a user help html site
Installation:
Next is to add a user who receives the bugmails, e. g. bugmail. Create a
mail account and a home directory for the user.
The mailinterface script bug_email.pl needs to get the mail through stdin.
I use procmail for that, with the following line in the .procmailrc:
BUGZILLA_HOME=/usr/local/httpd/htdocs/bugzilla
:0 c
|(cd $BUGZILLA_HOME/contrib; ./bug_email.pl)
This defines the Bugzilla directory as the variable BUGZILLA_HOME and passes
all incoming mail to the script after cd'ing into the bugzilla home.
In some cases, it is necessary to alter the headers of incoming email. The
additional line to procmail :
:0 fhw
| formail -I "From " -a "From "
fixes many problems.
See bugzilla.procmailrc for a sample procmailrc that works for me (SML) and
also deals with bugzilla_email_append.pl
Customation:
There are some values inside the script which need to be customized for your
needs:
1. In sub-routine Reply (search 'sub Reply':
there is the line
print MAIL "From: Bugzilla Mailinterface<yourmail\@here.com>\n";
^^^^^^^^^^^^^^^^^^^^
Fill in your correct mail here. That will make it easy for people to reply
to the mail.
2. check, if your sendmail resides in /usr/sbin/sendmail, change the path if neccessary.
Search the script after 'default' - you find some default-Settings for bug
reports, which are used, if the sender did not send a field for it. The defaults
should be checked and changed.
Thats hopefully all, we will come up with any configuration file or something.
If your mail works, your script will insert mails from now on.
The mailinterface supports two commandline switches:
There are two command line switches :
-t: Testmode
The mailinterface does not really insert the bug into the database, but
writes some debug output to stdout and writes the mail into the file
bug_email_test.log in the data-dir.
-r: restricted mode
All lines before the first line with a keyword character are skipped.
In not restricted, default mode, these lines are added to the long
description of the bug.
02/2000 - Klaas Freitag, SuSE GmbH <freitag@suse.de>
03/2000 - Seth M. Landsman <seth@cs.brandeis.edu>
bug_email.pl now lives out of bugzilla/contrib
added line about formail

File diff suppressed because it is too large Load Diff

View File

@@ -1,223 +0,0 @@
<HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is the Bugzilla Bug Tracking System.
Contributor(s): Klaas Freitag <Freitag@SuSE.de>
-->
<HEAD> <TITLE>Bugzilla Mail Interface</TITLE> </HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER><H1>The Bugzilla Mail Interface</H1>
Contributor: <A HREF="mailto:freitag@suse.de">Klaas Freitag</A>, SuSE GmbH
</CENTER>
<P>
The bugzilla Mail interface allows the registered bugzilla users to submit bugs by
sending email with a bug description. This is usefull for people, who do not work
inhouse and want to submitt bugs to the bugzilla system.
<p>
I know, show me the <A HREF="#examplemail">example-mail !</A>
<H2>What do you need to do to submitt a bug by mail ?</H2>
You need to send a email in the described format to the bugmail-user of the
bugzilla-system. This is <A HREF="mailto:our_bugzilla@xyz.com">yourbugzilla@here.com</A>
You receive a reply mail with the new bug-ID if your request was ok.
If not, you get a mail with
some help on the bugmail system and a specific analysis of your request.
<P>
Please dont refuse to send one or two wrong mails, you will get all the information
you need in the replies, and <I>only</I> in the mail replies. The information on this
page, concerning available products, versions and so on, is not dynamicly generated and
may be old therefore.
<H1>The Mail Format</H1>
The bugmail needs a special format , which consists of some keywords and suitable
values for them and a description text. Note that the keyword block needs to be
above of the description text.
<H2>Keywords</H2>
You need to tell bugzilla some properties of the bugs. This is done by keywords, which
start on a new line with a @, followed by the keyword and and equal-sign, followed by a
hopefully valid value.
<TABLE BORDER=4 FRAME=box CELLSPACING="5" width=95%> <COLGROUP> <col width="2*">
<col width="5*"> <col width="1*"> </COLGROUP>
<TR>
<TH>Keyword</TH>
<TH>Value description</TH>
<TH>required and default value</TH>
</TR>
<TR>
<TD>@product</TD>
<TD>The product which has a bug</TD>
<TD>yes. <br> This is the most important information. Many other
fields depend on the product.</TD>
</TR>
<TR>
<TD>@component</TD>
<TD>the desired component which is affected by the bug</TD>
<TD>yes. <br> As the @product, this is a very important
field.</TD>
</TR>
<TR>
<TD>@version</TD>
<TD>The version of the product</TD>
<TD>yes. <br>See @product and @component</TD>
</TR>
<TR>
<TD>@short_desc</TD>
<TD>A summary of your bug report</TD>
<TD>yes. <br>This summary of the error you want to report
describes what happen. You may skip the long description,
but not this summary.<br>
<b>Note:</b>The short description may be given in the mail subject
instead of using the keyword !</TD>
</TR>
<TR>
<TD>@rep_platform</TD>
<TD>The desired platform</TD>
<TD>no.<br>If you dont give a value, this field is set to <I>All</I>.</TD>
</TR>
<TR>
<TD>@bug_severity</TD>
<TD>The severity of the bug</TD>
<TD>no. <br> If you dont give a value, this field is set to
<I>normal</I></TD>
</TR>
<TR>
<TD>@priority</TD>
<TD>The priority of the bug</TD>
<TD>no.<br>If you dont give a value, this field is set to <I>P3</I></TD>
</TR>
<TR>
<TD>@op_sys</TD>
<TD>The operating system</TD>
<TD>no.<br>If you dont give a value, this field is set to <I>Linux</I>.</TD>
</TR>
<TR>
<TD>@assigned_to</TD>
<TD>The one to whom the bug is assigned to</TD>
<TD>no. <br>There is an initial owner for every product/version/component.
He owns the bug by default. The initial owner can only be found if
product, version and component are valid.</TD>
</TR>
<TR>
<TD>@bug_file_loc</TD>
<TD>?</TD>
<TD>no.</TD>
</TR>
<TR>
<TD>@status_whiteboard</TD>
<TD>?</TD>
<TD>no.</TD>
</TR>
<TR>
<TD>@target_milestone</TD>
<TD>?</TD>
<TD>no.</TD>
</TR>
<TR>
<TD>@groupset</TD>
<TD>rules the visibility of the bug.</TD>
<TD>no.<br>This value defaults to the smallest of the available groups,
which is <I>readInternal</I>.</TD>
</TR>
<TR>
<TD>@qa_contact</TD>
<TD>the quality manager for the product</TD>
<TD>no.<br>This value can be retrieved from product, component and
version</TD>
</TR>
</TABLE>
<H2>Valid values</H2>
Give string values for the most keys above. Some keywords require special values:<br>
<ol>
<li>E-Mail adresses: If you want to set the qa-contact, specify a email-adress for @qa_contact. The email must be known by bugzilla of course.</li>
<li>Listvalues: Most of the values have to be one of a list of valid values. Try by sending
a mail and read the reply. Skip fields if you dont get help for them unless you dont know
which values you may choose.</li>
<li>free Text: The descriptions may be free text. </li>
<li>Special: The field groupset may be specified in different in three different kinds:
<ol>
<li> A plain numeric way, which is one usually huge number, e. g. <I>65536</I></li>
<li> a string with added numbers e.g. <I>65536+131072</I></li>
<li> a string list, e.g. <I>ReadInternal, ReadBeta </I></li>
</ol>
</li>
</ol>
<p>
But most of them need <b>valid</b> values.
<p>
Sorry, you will not find lists of valid products, components and the other stuff
here. Send a mail to with any text, and you will get a list of valid keywords in the reply.
<p>
Some of the values must be choosen from a list:<br>
<ol>
<li>bug_severity: blocker, critical, major, normal, minor, trivial, enhancement</li>
<li>op_sys: Linux </li>
<li>priority: P1, P2, P3, P4, P5</li>
<li>rep_platform: All, i386, AXP, i686, Other</li></ol>
<p>
After you have specified the required keywords and maybe some other value, you may
describe your bug. You dont need a keyword for starting your bug description. All
text which follows the keyword block is handled as long description of the bug.
<p>
The bugmail interface is able to find required information by itself. E.g. if you specify
a product which has exactly one component, this component will be found by the interface
automatically.
<H1>Attachments</H1>
The mail interface is able to cope with MIME-attachments.
People could for example add a logfile as a mail attachment, and it will appear in
bugzilla as attachment. A comment for the attachment should be added, it will describe
the attachment in bugzilla.
<H1><A NAME="examplemail">Example Mail</A></H1>
See the example of the mail <b>body</b> (Dont forget to specify the short description
in the mail subject):<hr><pre>
@product = Bugzilla
@component = general
@version = All
@groupset = ReadWorld ReadPartners
@op_sys = Linux
@priority = P3
@rep_platform = i386
This is the description of the bug I found. It is not neccessary to start
it with a keyword.
Note: The short_description is neccessary and may be given with the keyword
@short_description or will be retrieved from the mail subject.
</pre><hr>
</BODY>
</HTML>

View File

@@ -1,30 +0,0 @@
:0 fhw
| formail -I "From " -a "From "
BUGZILLA_HOME=/home/bugzilla/WEB/bugzilla/contrib
:0
* ^Subject: .*\[Bug .*\]
RESULT=|(cd $BUGZILLA_HOME && ./bugzilla_email_append.pl)
# Feed mail to stdin of bug_email.pl
:0 Ec
#* !^Subject: .*[Bug .*]
RESULT=|(cd $BUGZILLA_HOME && ./bug_email.pl )
# write result to a logfile
:0 c
|echo `date '+%d.%m.%y %H:%M: '` $RESULT >> $HOME/bug_email.log
:0 c
|echo "----------------------------------" >> $HOME/bug_email.log
:0 c
$HOME/bug_email.log
# Move mail to the inbox
:0
$HOME/Mail/INBOX

View File

@@ -1,189 +0,0 @@
#!/usr/bin/perl -w
# -*- Mode: perl; indent-tabs-mode: nil -*-
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
# The purpose of this script is to take an email message, which
# specifies a bugid and append it to the bug as part of the longdesc
# table
# Contributor : Seth M. Landsman <seth@dworkin.net>
# 03/15/00 : Initial version by SML
# 03/15/00 : processmail gets called
# Email subject must be of format :
# .* Bug ### .*
# replying to a typical bugzilla email should be valid
# TODO :
# 1. better way to get the body text (I don't know what dump_entity() is
# actually doing
use diagnostics;
use strict;
use MIME::Parser;
push @INC, "../."; # this script lives in contrib
require "globals.pl";
require "BugzillaEmail.pm";
# Create a new MIME parser:
my $parser = new MIME::Parser;
my $Comment = "";
# Create and set the output directory:
# FIXME: There should be a $BUGZILLA_HOME variable (SML)
(-d "../data/mimedump-tmp") or mkdir "../data/mimedump-tmp",0755 or die "mkdir: $!";
(-w "../data/mimedump-tmp") or die "can't write to directory";
$parser->output_dir("../data/mimedump-tmp");
# Read the MIME message:
my $entity = $parser->read(\*STDIN) or die "couldn't parse MIME stream";
$entity->remove_sig(10); # Removes the signature in the last 10 lines
# Getting values from parsed mail
my $Sender = $entity->get( 'From' );
$Sender ||= $entity->get( 'Reply-To' );
my $Message_ID = $entity->get( 'Message-Id' );
die (" *** Cant find Sender-adress in sent mail ! ***\n" ) unless defined( $Sender );
chomp( $Sender );
chomp( $Message_ID );
print "Dealing with the sender $Sender\n";
ConnectToDatabase();
my $SenderShort = $Sender;
$SenderShort =~ s/^.*?([a-zA-Z0-9_.-]+?\@[a-zA-Z0-9_.-]+\.[a-zA-Z0-9_.-]+).*$/$1/;
$SenderShort = findUser($SenderShort);
print "SenderShort is $SenderShort\n";
if (!defined($SenderShort)) {
$SenderShort = $Sender;
$SenderShort =~ s/^.*?([a-zA-Z0-9_.-]+?\@[a-zA-Z0-9_.-]+\.[a-zA-Z0-9_.-]+).*$/$1/;
}
print "The sendershort is now $SenderShort\n";
if (!defined($SenderShort)) {
DealWithError("No such user $SenderShort exists.");
}
my $Subject = $entity->get('Subject');
print "The subject is $Subject\n";
my ($bugid) = ($Subject =~ /\[Bug ([\d]+)\]/);
print "The bugid is $bugid\n";
# make sure the bug exists
SendSQL("SELECT bug_id FROM bugs WHERE bug_id = $bugid;");
my $found_id = FetchOneColumn();
print "Did we find the bug? $found_id-\n";
if (!defined($found_id)) {
DealWithError("Bug $bugid does not exist");
}
# get the user id
SendSQL("SELECT userid FROM profiles WHERE login_name = \'$SenderShort\';");
my $userid = FetchOneColumn();
if (!defined($userid)) {
DealWithError("Userid not found for $SenderShort");
}
# parse out the text of the message
dump_entity($entity);
# Get rid of the bug id
$Subject =~ s/\[Bug [\d]+\]//;
#my $Comment = "This is only a test ...";
my $Body = "Subject: " . $Subject . "\n" . $Comment;
# shove it in the table
my $long_desc_query = "INSERT INTO longdescs SET bug_id=$found_id, who=$userid, bug_when=NOW(), thetext=" . SqlQuote($Body) . ";";
SendSQL($long_desc_query);
system("cd .. ; ./processmail $found_id '$SenderShort'");
sub DealWithError {
my ($reason) = @_;
print $reason . "\n";
}
# Yanking this wholesale from bug_email, 'cause I know this works. I'll
# figure out what it really does later
#------------------------------
#
# dump_entity ENTITY, NAME
#
# Recursive routine for parsing a mime coded mail.
# One mail may contain more than one mime blocks, which need to be
# handled. Therefore, this function is called recursively.
#
# It gets the for bugzilla important information from the mailbody and
# stores them into the global attachment-list @attachments. The attachment-list
# is needed in storeAttachments.
#
sub dump_entity {
my ($entity, $name) = @_;
defined($name) or $name = "'anonymous'";
my $IO;
# Output the body:
my @parts = $entity->parts;
if (@parts) { # multipart...
my $i;
foreach $i (0 .. $#parts) { # dump each part...
dump_entity($parts[$i], ("$name, part ".(1+$i)));
}
} else { # single part...
# Get MIME type, and display accordingly...
my $msg_part = $entity->head->get( 'Content-Disposition' );
$msg_part ||= "";
my ($type, $subtype) = split('/', $entity->head->mime_type);
my $body = $entity->bodyhandle;
my ($data, $on_disk );
if( $msg_part =~ /^attachment/ ) {
# Attached File
my $des = $entity->head->get('Content-Description');
$des ||= "";
if( defined( $body->path )) { # Data is on disk
$on_disk = 1;
$data = $body->path;
} else { # Data is in core
$on_disk = 0;
$data = $body->as_string;
}
# push ( @attachments, [ $data, $entity->head->mime_type, $on_disk, $des ] );
} else {
# Real Message
if ($type =~ /^(text|message)$/) { # text: display it...
if ($IO = $body->open("r")) {
$Comment .= $_ while (defined($_ = $IO->getline));
$IO->close;
} else { # d'oh!
print "$0: couldn't find/open '$name': $!";
}
} else { print "Oooops - no Body !\n"; }
}
}
}

View File

@@ -1,94 +0,0 @@
#!/bin/sh
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is
# Andreas Franke <afranke@ags.uni-sb.de>.
# Corporation. Portions created by Andreas Franke are
# Copyright (C) 2001 Andreas Franke. All
# Rights Reserved.
#
# Contributor(s):
conf="`dirname $0`/query.conf"
query="http://bugzilla.mozilla.org/buglist.cgi?cmd=doit"
defaultcolumnlist="severity priority platform status resolution target_milestone status_whiteboard keywords summaryfull"
chart=0
and=0
while test "$1" != ""; do
arg=$1
arg_len=`expr length ${arg}`
if test `expr substr "${arg}" 1 2` == "--"; then
eq_pos=`expr match ${arg} '--.*='`
if test "${eq_pos}" == "0"; then
echo 'Missing value for long option '"${arg}"' ("=" not found)' 1>&2
exit 1;
fi
# extract option name
let name_len=${eq_pos}-3
name=`expr substr ${arg} 3 ${name_len}`
# extract option value
let val_start=${eq_pos}+1
let val_len=${arg_len}-${eq_pos}
val=`expr substr ${arg} ${val_start} ${val_len}`
elif test `expr substr ${arg} 1 1` == "-" &&
test "`expr substr ${arg} 2 1`" != ""; then
# extract
name=`expr substr ${arg} 2 1`
let val_len=${arg_len}-2
val=`expr substr ${arg} 3 ${val_len}`
else
name="default"
val="${arg}"
#echo "Unrecognized option ${arg}" 1>&2
#exit 1
fi
# find field and comparison type for option ${name}
field=`grep '"'${name}'"' ${conf} | awk '{printf $1}'`
type=`grep '"'${name}'"' ${conf} | awk '{printf $2}'`
if test "${field}" == "" || test "${type}" == ""; then
echo "Field name & comparison type not found for option ${name}." 1>&2
exit 1;
fi
or=0
while test "${val}" != ""; do
comma_idx=`expr index ${val} ,`
if test ${comma_idx} == "0"; then
val1="${val}"
val=""
else
let val1_len=${comma_idx}-1
val1=`expr substr ${val} 1 ${val1_len}`
val_len=`expr length ${val}`
let rest_start=${comma_idx}+1
let rest_len=${val_len}-${comma_idx}
val=`expr substr ${val} ${rest_start} ${rest_len}`
fi
query="${query}&field${chart}-${and}-${or}=${field}"
query="${query}&type${chart}-${and}-${or}=${type}"
query="${query}&value${chart}-${and}-${or}=${val1}"
#echo "----- ${name} : ${field} : ${type} : ${val1} -----" 1>&2
let or=${or}+1
done
let chart=${chart}+1
shift
done
outputfile="/dev/stdout"
#outputfile="buglist.html"
#\rm -f ${outputfile}
wget -q -O ${outputfile} --header="Cookie: COLUMNLIST=${COLUMNLIST-${defaultcolumnlist}}" "${query}"

View File

@@ -1,31 +0,0 @@
#!/bin/sh
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is
# Andreas Franke <afranke@ags.uni-sb.de>.
# Corporation. Portions created by Andreas Franke are
# Copyright (C) 2001 Andreas Franke. All
# Rights Reserved.
#
# Contributor(s):
buglist="`dirname $0`/buglist"
htmlfile="`dirname $0`/buglist.html"
${buglist} "$@" 2>&1 1>${htmlfile}
if test ${?} == "0"; then
echo `grep 'TR VALIGN=TOP ALIGN=LEFT CLASS=' ${htmlfile} | sed -e 's/<TR.*id=//' | sed -e 's/".*//'` | sed -e 's/ /\,/g'
else
cat ${htmlfile} 1>&2
exit 1
fi

View File

@@ -1,49 +0,0 @@
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is
# Andreas Franke <afranke@ags.uni-sb.de>.
# Corporation. Portions created by Andreas Franke are
# Copyright (C) 2001 Andreas Franke. All
# Rights Reserved.
#
# Contributor(s):
#
# This is `query.conf', the config file for `buglist'.
#
# Columns: 1: field_name, 2: comparison_type, 3: cmd-line options
#
bug_status substring "s","status"
resolution substring "r","resolution"
rep_platform substring "p","platform"
op_sys substring "o","os","opsys"
priority substring "p","priority"
bug_severity substring "S","severity"
assigned_to substring "A","O","owner","assignedto"
reporter substring "R","reporter"
qa_contact substring "Q","qa","qacontact"
cc substring "C","cc"
product substring "product"
version substring "V","version"
component substring "c","component"
target_milestone substring "M","milestone"
short_desc substring "default","summary"
longdesc substring "d","description","longdesc"
bug_file_loc substring "u","url"
status_whiteboard substring "w","whiteboard"
keywords substring "k","K","keywords"
attachments.description substring "attachdesc"
attachments.thedata substring "attachdata"
attachments.mimetype substring "attachmime"
dependson substring # bug 30823
blocked substring # bug 30823

View File

@@ -1,40 +0,0 @@
#!/bin/sh
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Dawn Endico <endico@mozilla.org>
# Keep a record of all cvs updates made from a given directory.
#
# Later, if changes need to be backed out, look at the log file
# and run the cvs command with the date that you want to back
# out to. (Probably the second to last entry).
#DATE=`date +%e/%m/%Y\ %k:%M:%S\ %Z`
DATE=`date`
COMMAND="cvs update -d -P -D"
echo $COMMAND \"$DATE\" >> cvs-update.log
$COMMAND "$DATE"
# sample log file
#cvs update -P -D "11/04/2000 20:22:08 PDT"
#cvs update -P -D "11/05/2000 20:22:22 PDT"
#cvs update -P -D "11/07/2000 20:26:29 PDT"
#cvs update -P -D "11/08/2000 20:27:10 PDT"

File diff suppressed because it is too large Load Diff

View File

@@ -1,303 +0,0 @@
#!/usr/local/bin/python
# -*- mode: python -*-
"""
jb2bz.py - a nonce script to import bugs from JitterBug to Bugzilla
Written by Tom Emerson, tree@basistech.com
This script is provided in the hopes that it will be useful. No
rights reserved. No guarantees expressed or implied. Use at your own
risk. May be dangerous if swallowed. If it doesn't work for you, don't
blame me. It did what I needed it to do.
This code requires a recent version of Andy Dustman's MySQLdb interface,
http://sourceforge.net/projects/mysql-python
Share and enjoy.
"""
import rfc822, mimetools, multifile, mimetypes
import sys, re, glob, StringIO, os, stat, time
import MySQLdb, getopt
# mimetypes doesn't include everything we might encounter, yet.
if not mimetypes.types_map.has_key('.doc'):
mimetypes.types_map['.doc'] = 'application/msword'
if not mimetypes.encodings_map.has_key('.bz2'):
mimetypes.encodings_map['.bz2'] = "bzip2"
bug_status='NEW'
component="default"
version=""
product="" # this is required, the rest of these are defaulted as above
"""
Each bug in JitterBug is stored as a text file named by the bug number.
Additions to the bug are indicated by suffixes to this:
<bug>
<bug>.followup.*
<bug>.reply.*
<bug>.notes
The dates on the files represent the respective dates they were created/added.
All <bug>s and <bug>.reply.*s include RFC 822 mail headers. These could include
MIME file attachments as well that would need to be extracted.
There are other additions to the file names, such as
<bug>.notify
which are ignored.
Bugs in JitterBug are organized into directories. At Basis we used the following
naming conventions:
<product>-bugs Open bugs
<product>-requests Open Feature Requests
<product>-resolved Bugs/Features marked fixed by engineering, but not verified
<product>-verified Resolved defects that have been verified by QA
where <product> is either:
<product-name>
or
<product-name>-<version>
"""
def process_notes_file(current, fname):
try:
new_note = {}
notes = open(fname, "r")
s = os.fstat(notes.fileno())
new_note['text'] = notes.read()
new_note['timestamp'] = time.gmtime(s[stat.ST_MTIME])
notes.close()
current['notes'].append(new_note)
except IOError:
pass
def process_reply_file(current, fname):
new_note = {}
reply = open(fname, "r")
msg = rfc822.Message(reply)
new_note['text'] = "%s\n%s" % (msg['From'], msg.fp.read())
new_note['timestamp'] = rfc822.parsedate_tz(msg['Date'])
current["notes"].append(new_note)
def add_notes(current):
"""Add any notes that have been recorded for the current bug."""
process_notes_file(current, "%d.notes" % current['number'])
for f in glob.glob("%d.reply.*" % current['number']):
process_reply_file(current, f)
for f in glob.glob("%d.followup.*" % current['number']):
process_reply_file(current, f)
def maybe_add_attachment(current, file, submsg):
"""Adds the attachment to the current record"""
cd = submsg["Content-Disposition"]
m = re.search(r'filename="([^"]+)"', cd)
if m == None:
return
attachment_filename = m.group(1)
if (submsg.gettype() == 'application/octet-stream'):
# try get a more specific content-type for this attachment
type, encoding = mimetypes.guess_type(m.group(1))
if type == None:
type = submsg.gettype()
else:
type = submsg.gettype()
try:
data = StringIO.StringIO()
mimetools.decode(file, data, submsg.getencoding())
except:
return
current['attachments'].append( ( attachment_filename, type, data.getvalue() ) )
def process_mime_body(current, file, submsg):
data = StringIO.StringIO()
mimetools.decode(file, data, submsg.getencoding())
current['description'] = data.getvalue()
def process_text_plain(msg, current):
print "Processing: %d" % current['number']
current['description'] = msg.fp.read()
def process_multi_part(file, msg, current):
print "Processing: %d" % current['number']
mf = multifile.MultiFile(file)
mf.push(msg.getparam("boundary"))
while mf.next():
submsg = mimetools.Message(file)
if submsg.has_key("Content-Disposition"):
maybe_add_attachment(current, mf, submsg)
else:
# This is the message body itself (always?), so process
# accordingly
process_mime_body(current, mf, submsg)
def process_jitterbug(filename):
current = {}
current['number'] = int(filename)
current['notes'] = []
current['attachments'] = []
current['description'] = ''
current['date-reported'] = ()
current['short-description'] = ''
file = open(filename, "r")
msg = mimetools.Message(file)
msgtype = msg.gettype()
add_notes(current)
current['date-reported'] = rfc822.parsedate_tz(msg['Date'])
current['short-description'] = msg['Subject']
if msgtype[:5] == 'text/':
process_text_plain(msg, current)
elif msgtype[:10] == "multipart/":
process_multi_part(file, msg, current)
else:
# Huh? This should never happen.
print "Unknown content-type: %s" % msgtype
sys.exit(1)
# At this point we have processed the message: we have all of the notes and
# attachments stored, so it's time to add things to the database.
# The schema for JitterBug 2.14 can be found at:
#
# http://www.trilobyte.net/barnsons/html/dbschema.html
#
# The following fields need to be provided by the user:
#
# bug_status
# product
# version
# reporter
# component
# resolution
# change this to the user_id of the Bugzilla user who is blessed with the
# imported defects
reporter=6
# the resolution will need to be set manually
resolution=""
db = MySQLdb.connect(db='bugs',user='root',host='localhost')
cursor = db.cursor()
cursor.execute( "INSERT INTO bugs SET " \
"bug_id=%s," \
"bug_severity='normal'," \
"bug_status=%s," \
"creation_ts=%s," \
"short_desc=%s," \
"product=%s," \
"rep_platform='All'," \
"assigned_to=%s,"
"reporter=%s," \
"version=%s," \
"component=%s," \
"resolution=%s",
[ current['number'],
bug_status,
time.strftime("%Y-%m-%d %H:%M:%S", current['date-reported'][:9]),
current['short-description'],
product,
reporter,
reporter,
version,
component,
resolution] )
# This is the initial long description associated with the bug report
cursor.execute( "INSERT INTO longdescs VALUES (%s,%s,%s,%s)",
[ current['number'],
reporter,
time.strftime("%Y-%m-%d %H:%M:%S", current['date-reported'][:9]),
current['description'] ] )
# Add whatever notes are associated with this defect
for n in current['notes']:
cursor.execute( "INSERT INTO longdescs VALUES (%s,%s,%s,%s)",
[current['number'],
reporter,
time.strftime("%Y-%m-%d %H:%M:%S", n['timestamp'][:9]),
n['text']])
# add attachments associated with this defect
for a in current['attachments']:
cursor.execute( "INSERT INTO attachments SET " \
"bug_id=%s, creation_ts=%s, description='', mimetype=%s," \
"filename=%s, thedata=%s, submitter_id=%s",
[ current['number'],
time.strftime("%Y-%m-%d %H:%M:%S", current['date-reported'][:9]),
a[1], a[0], a[2], reporter ])
cursor.close()
db.close()
def usage():
print """Usage: jb2bz.py [OPTIONS] Product
Where OPTIONS are one or more of the following:
-h This help information.
-s STATUS One of UNCONFIRMED, NEW, ASSIGNED, REOPENED, RESOLVED, VERIFIED, CLOSED
(default is NEW)
-c COMPONENT The component to attach to each bug as it is important. This should be
valid component for the Product.
-v VERSION Version to assign to these defects.
Product is the Product to assign these defects to.
All of the JitterBugs in the current directory are imported, including replies, notes,
attachments, and similar noise.
"""
sys.exit(1)
def main():
global bug_status, component, version, product
opts, args = getopt.getopt(sys.argv[1:], "hs:c:v:")
for o,a in opts:
if o == "-s":
if a in ('UNCONFIRMED','NEW','ASSIGNED','REOPENED','RESOLVED','VERIFIED','CLOSED'):
bug_status = a
elif o == '-c':
component = a
elif o == '-v':
version = a
elif o == '-h':
usage()
if len(args) != 1:
sys.stderr.write("Must specify the Product.\n")
sys.exit(1)
product = args[0]
for bug in filter(lambda x: re.match(r"\d+$", x), glob.glob("*")):
process_jitterbug(bug)
if __name__ == "__main__":
main()

View File

@@ -1,102 +0,0 @@
#!/usr/bonsaitools/bin/perl -w
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 2000 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Dan Mosedale <dmose@mozilla.org>
#
# mysqld-watcher.pl - a script that watches the running instance of
# mysqld and kills off any long-running SELECTs against the shadow_db
#
use diagnostics;
use strict;
require "globals.pl";
# some configurables:
# length of time before a thread is eligible to be killed, in seconds
#
my $long_query_time = 600;
#
# the From header for any messages sent out
#
my $mail_from = "root\@lounge.mozilla.org";
#
# mail transfer agent. this should probably really be converted to a Param().
#
my $mta_program = "/usr/lib/sendmail -t -ODeliveryMode=deferred";
# and STDIN is where we get the info about running threads
#
close(STDIN);
open(STDIN, "/usr/bonsaitools/bin/mysqladmin processlist |");
# iterate through the running threads
#
my @LONGEST = (0,0,0,0,0,0,0,0,0);
while ( <STDIN> ) {
my @F = split(/\|/);
# if this line is not the correct number of fields, or if the thread-id
# field contains Id, skip this line. both these cases indicate that this
# line contains pretty-printing gunk and not thread info.
#
next if ( $#F != 9 || $F[1] =~ /Id/);
if ( $F[4] =~ /shadow_bugs/ # shadowbugs database in use
&& $F[5] =~ /Query/ # this is actually a query
&& $F[6] > $long_query_time # this query has taken too long
&& $F[8] =~ /(select|SELECT)/ # only kill a select
&& $F[6] > $LONGEST[6] ) { # the longest running query seen
@LONGEST = @F;
}
}
# send an email message
#
# should perhaps be moved to somewhere more global for use in bugzilla as a
# whole; should also do more error-checking
#
sub sendEmail($$$$) {
($#_ == 3) || die("sendEmail: invalid number of arguments");
my ($from, $to, $subject, $body) = @_;
open(MTA, "|$mta_program");
print MTA "From: $from\n";
print MTA "To: $to\n";
print MTA "Subject: $subject\n";
print MTA "\n";
print MTA $body;
print MTA "\n";
close(MTA);
}
# if we found anything, kill the database thread and send mail about it
#
if ($LONGEST[6] != 0) {
system ("/usr/bonsaitools/bin/mysqladmin", "kill", $LONGEST[1]);
# fire off an email telling the maintainer that we had to kill a thread
#
sendEmail($mail_from, Param("maintainer"),
"long running MySQL thread killed",
join(" ", @LONGEST) . "\n");
}

View File

@@ -1,78 +0,0 @@
#!/bin/sh
# -*- Mode: ksh -*-
##############################################################################
# $Id: yp_nomail.sh,v 1.1 2000-09-12 23:50:31 cyeh%bluemartini.com Exp $
# yp_nomail
#
# Our mail admins got annoyed when bugzilla kept sending email
# to people who'd had bugzilla entries and left the company. They
# were no longer in the list of valid email users so it'd bounce.
# Maintaining the 'data/nomail' file was a pain. Luckily, our UNIX
# admins list all the users that ever were, but the people who've left
# have a distinct marker in their password file. For example:
#
# fired:*LK*:2053:1010:You're Fired Dude:/home/loser:/bin/false
#
# This script takes advantage of the "*LK*" convention seen via
# ypcat passwd and dumps those people into the nomail file. Any
# manual additions are kept in a "nomail.(domainname)" file and
# appended to the list of yp lockouts every night via Cron
#
# 58 23 * * * /export/bugzilla/contrib/yp_nomail.sh > /dev/null 2>&1
#
# Tak ( Mark Takacs ) 08/2000
#
# XXX: Maybe should crosscheck w/bugzilla users?
##############################################################################
####
# Configure this section to suite yer installation
####
DOMAIN=`domainname`
MOZILLA_HOME="/export/mozilla"
BUGZILLA_HOME="${MOZILLA_HOME}/bugzilla"
NOMAIL_DIR="${BUGZILLA_HOME}/data"
NOMAIL="${NOMAIL_DIR}/nomail"
NOMAIL_ETIME="${NOMAIL}.${DOMAIN}"
NOMAIL_YP="${NOMAIL}.yp"
FIRED_FLAG="\*LK\*"
YPCAT="/usr/bin/ypcat"
GREP="/usr/bin/grep"
SORT="/usr/bin/sort"
########################## no more config needed #################
# This dir comes w/Bugzilla. WAY too paranoid
if [ ! -d ${NOMAIL_DIR} ] ; then
echo "Creating $date_dir"
mkdir -p ${NOMAIL_DIR}
fi
#
# Do some (more) paranoid checking
#
touch ${NOMAIL}
if [ ! -w ${NOMAIL} ] ; then
echo "Can't write nomail file: ${NOMAIL} -- exiting"
exit
fi
if [ ! -r ${NOMAIL_ETIME} ] ; then
echo "Can't access custom nomail file: ${NOMAIL_ETIME} -- skipping"
NOMAIL_ETIME=""
fi
#
# add all the people with '*LK*' password to the nomail list
# XXX: maybe I should customize the *LK* string. Doh.
#
LOCKOUT=`$YPCAT passwd | $GREP "${FIRED_FLAG}" | cut -d: -f1 | sort > ${NOMAIL_YP}`
`cat ${NOMAIL_YP} ${NOMAIL_ETIME} > ${NOMAIL}`
exit
# end

View File

@@ -1,88 +0,0 @@
#!/usr/bonsaitools/bin/perl -wT
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# David Gardiner <david.gardiner@unisa.edu.au>
# Joe Robins <jmrobins@tgix.com>
# Christopher Aillon <christopher@aillon.com>
# Gervase Markham <gerv@gerv.net>
use diagnostics;
use strict;
use lib qw(.);
require "CGI.pl";
require "globals.pl";
# Shut up misguided -w warnings about "used only once":
use vars qw(
%FORM
$template
$vars
);
ConnectToDatabase();
# If we're using LDAP for login, then we can't create a new account here.
if(Param('useLDAP')) {
DisplayError("This site is using LDAP for authentication. Please contact
an LDAP administrator to get a new account created.",
"Can't create LDAP accounts");
PutFooter();
exit;
}
# Clear out the login cookies. Make people log in again if they create an
# account; otherwise, they'll probably get confused.
my $cookiepath = Param("cookiepath");
print "Set-Cookie: Bugzilla_login= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT
Set-Cookie: Bugzilla_logincookie= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT\n";
print "Content-Type: text/html\n\n";
my $login = $::FORM{'login'};
my $realname = trim($::FORM{'realname'});
if (defined($login)) {
# We've been asked to create an account.
CheckEmailSyntax($login);
trick_taint($login);
$vars->{'login'} = $login;
if (!ValidateNewUser($login)) {
# Account already exists
$template->process("account/exists.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
# Create account
my $password = InsertNewUser($login, $realname);
MailPassword($login, $password);
$template->process("account/created.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
# Show the standard "would you like to create an account?" form.
$template->process("account/create.html.tmpl", $vars)
|| ThrowTemplateError($template->error());

Some files were not shown because too many files have changed in this diff Show More