diff --git a/database/database.mysql b/database/database.mysql index c35019bc68a..994ea4f919e 100644 --- a/database/database.mysql +++ b/database/database.mysql @@ -2,7 +2,7 @@ -- -- Host: localhost Database: drupal_devel --------------------------------------------------------- --- Server version 3.23.52-nt +-- Server version 3.23.52-nt -- -- Table structure for table 'access' diff --git a/includes/theme.inc b/includes/theme.inc index 108347da74c..62239da128c 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -75,6 +75,21 @@ class BaseTheme { } +function theme_mark() { + /* + ** Return a marker. Used to indicate new comments or required form + ** fields. + */ + return "*"; +} + +function theme_error($message) { + /* + ** Return an error message. + */ + return "
Drupal's poll module allows users with at least content posting privileges to submit multiple-choice questions that others can vote on. Any user with sufficient privileges can vote. Please note that this is fully controlled by Drupal's access control features. For example, users might be required to login before voting (or even seeing the page where the voting occurs) or it could be open to the world.
+ ?> +Drupal's poll module allows users with at least content posting privileges to submit multiple-choice questions that others can vote on. Any user with sufficient privileges can vote. Please note that this is fully controlled by Drupal's access control features. For example, users might be required to login before voting (or even seeing the page where the voting occurs) or it could be open to the world.
chvotes[$i] < 0) { - $error["chvotes][$i"] = "". t("Negative values are not allowed.") .""; + $error["chvotes][$i"] = theme_invoke("theme_error", t("Negative values are not allowed.")); } } if ($actualchoices < 2) { - $error["choice][0"] = "". t("You must fill in at least two choices.") .""; + $error["choice][0"] = theme_invoke("theme_error", t("You must fill in at least two choices.")); } } else { @@ -125,7 +125,8 @@ function poll_form(&$node, &$help, &$error) { } function poll_help() { - ?>Drupal's poll module allows users with at least content posting privileges to submit multiple-choice questions that others can vote on. Any user with sufficient privileges can vote. Please note that this is fully controlled by Drupal's access control features. For example, users might be required to login before voting (or even seeing the page where the voting occurs) or it could be open to the world.
+ ?> +Drupal's poll module allows users with at least content posting privileges to submit multiple-choice questions that others can vote on. Any user with sufficient privileges can vote. Please note that this is fully controlled by Drupal's access control features. For example, users might be required to login before voting (or even seeing the page where the voting occurs) or it could be open to the world.
*"; + return $title ." ". theme_invoke("theme_mark"); } function _profile_form($edit, $mode) { diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 5503d7ee9e0..58c2882ab78 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -54,9 +54,9 @@ function profile_conf_options() { $output .= form_select(t("Publicly accessible fields"), "profile_public_fields", variable_get("profile_public_fields", array()), $fields, t("The fields users will be able to set and that will be publicly visible."), "size=\"6\"", 1); $output .= form_select(t("Private fields"), "profile_private_fields", variable_get("profile_private_fields", array()), $fields, t("The fields users will be able to set, but which are kept private."), "size=\"6\"", 1); - $output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writeable and visible from the web.")); - $output .= form_textfield(t("Avatar max size"), "profile_avatar_size", variable_get("profile_avatar_size", "85x85"), 10, 10, t("Maximum size for avatars.")); - $output .= form_textfield(t("Avatar max filesize"), "profile_avatar_filesize", variable_get("profile_avatar_filesize", "30"), 10, 10, t("Maximum filesize for avatars, in kb.")); + $output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writeable and visible from the web.")); + $output .= form_textfield(t("Avatar max size"), "profile_avatar_size", variable_get("profile_avatar_size", "85x85"), 10, 10, t("Maximum size for avatars.")); + $output .= form_textfield(t("Avatar max filesize"), "profile_avatar_filesize", variable_get("profile_avatar_filesize", "30"), 10, 10, t("Maximum filesize for avatars, in kb.")); return $output; } @@ -86,12 +86,12 @@ function profile_user($type, $edit, &$user) { case "view_private": // when user looks at his own data return _profile_user_view($user, "private"); - } + } } function profile_required($title) { // this pleads "theme_invoke, theme_invoke" ;) - return $title ." *"; + return $title ." ". theme_invoke("theme_mark"); } function _profile_form($edit, $mode) { diff --git a/modules/tracker.module b/modules/tracker.module index 32a8a0885c9..e663ea7984b 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -48,7 +48,7 @@ function tracker_comments($id = 0) { $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } /* @@ -678,7 +678,7 @@ function user_pass($edit = array()) { // Display error message if necessary. if ($error) { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } /* @@ -800,7 +800,7 @@ function user_register($edit = array()) { } else { if ($error) { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } } @@ -917,7 +917,7 @@ function user_edit($edit = array()) { } if ($error) { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } if (!$edit) { @@ -1141,7 +1141,7 @@ function user_admin_create($edit = array()) { else { if ($error) { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } $output .= form_textfield("Username", "name", $edit["name"], 30, 55); @@ -1396,7 +1396,7 @@ function user_admin_edit($edit = array()) { $output .= status(t("your user information changes have been saved.")); } else { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } } else if ($op == "Delete account") { diff --git a/modules/user/user.module b/modules/user/user.module index d2c4d173483..835b8a99600 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -77,7 +77,7 @@ function user_load($array = array()) { $result = db_query("SELECT u.*, r.name AS role FROM users u LEFT JOIN role r ON u.rid = r.rid WHERE $query u.status < 3 LIMIT 1"); $user = db_fetch_object($result); - if ($data = unserialize($user->data)) { + if ($user->data && $data = unserialize($user->data)) { foreach ($data as $key => $value) { if (!isset($user->$key)) { $user->$key = $value; @@ -188,7 +188,7 @@ function user_validate_mail($mail) { */ if ($mail && !eregi("^[0-9a-z_\.-]+@(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z][0-9a-z-]*[0-9a-z]\.)+[a-z]{2,})$", $mail)) { - return t("The e-mail address '$mail' is not valid."); + return t("The e-mail address '%mail' is not valid.", array("%mail" => $mail)); } } @@ -579,7 +579,7 @@ function user_login($edit = array(), $msg = "") { */ if ($error) { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } /* @@ -678,7 +678,7 @@ function user_pass($edit = array()) { // Display error message if necessary. if ($error) { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } /* @@ -800,7 +800,7 @@ function user_register($edit = array()) { } else { if ($error) { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } } @@ -917,7 +917,7 @@ function user_edit($edit = array()) { } if ($error) { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } if (!$edit) { @@ -1141,7 +1141,7 @@ function user_admin_create($edit = array()) { else { if ($error) { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } $output .= form_textfield("Username", "name", $edit["name"], 30, 55); @@ -1396,7 +1396,7 @@ function user_admin_edit($edit = array()) { $output .= status(t("your user information changes have been saved.")); } else { - $output .= "". check_output($error) ."
"; + $output .= theme_invoke("theme_error", check_output($error)); } } else if ($op == "Delete account") {