- Fixed bug #3637: made comment module settings translatable. Patch #13 by Moshe.

- Fixed bug #3642: removed duplicate settings from user page.  Patch #14 by Moshe.

- Fixed bug #3503: added 'forum topic' link to the 'create content' menu.  Patch
  by Gobar.  I think this might be more intuitive and consistent code-wise; I don't
  want to introduce small hacks.

- Cache improvement: small cache improvement to prevent SQL errors.  Patch by
  Jeremy.
4.3.x
Dries Buytaert 2003-10-16 17:29:26 +00:00
parent 7624580f76
commit 880842885b
7 changed files with 12 additions and 22 deletions

View File

@ -755,10 +755,8 @@ function cache_get($key) {
}
function cache_set($cid, $data, $expire = 0) {
if (db_fetch_object(db_query("SELECT cid FROM {cache} WHERE cid = '%s'", $cid))) {
db_query("UPDATE {cache} SET data = '%s', created = %d, expire = %d WHERE cid = '%s'", $data, time(), $expire, $cid);
}
else {
db_query("UPDATE {cache} SET data = '%s', created = %d, expire = %d WHERE cid = '%s'", $data, time(), $expire, $cid);
if (!db_affected_rows()) {
db_query("INSERT INTO {cache} (cid, data, created, expire) VALUES('%s', '%s', %d, %d)", $cid, $data, time(), $expire);
}
}

View File

@ -1619,7 +1619,7 @@ function comment_update_index() {
function comment_nodeapi(&$node, $op, $arg = 0) {
switch ($op) {
case "settings":
$output[t("comment")] = form_select("", "comment_$node->type", variable_get("comment_$node->type", 2), array("Disabled", "Read only", "Read/Write"));
$output[t("comment")] = form_select("", "comment_$node->type", variable_get("comment_$node->type", 2), array(t("Disabled"), t("Read only"), t("Read/Write")));
return $output;
case "fields":
return array("comment");

View File

@ -1619,7 +1619,7 @@ function comment_update_index() {
function comment_nodeapi(&$node, $op, $arg = 0) {
switch ($op) {
case "settings":
$output[t("comment")] = form_select("", "comment_$node->type", variable_get("comment_$node->type", 2), array("Disabled", "Read only", "Read/Write"));
$output[t("comment")] = form_select("", "comment_$node->type", variable_get("comment_$node->type", 2), array(t("Disabled"), t("Read only"), t("Read/Write")));
return $output;
case "fields":
return array("comment");

View File

@ -98,6 +98,10 @@ function forum_link($type, $node = 0, $main = 0) {
$links[] = l(t("forums"), "forum");
}
if ($type == "system" && user_access("create forum topics")) {
menu("node/add/forum",t("forum topic"), "forum_page");
}
if (!$main && $type == "node" && $node->type == "forum") {
// get previous and next topic

View File

@ -98,6 +98,10 @@ function forum_link($type, $node = 0, $main = 0) {
$links[] = l(t("forums"), "forum");
}
if ($type == "system" && user_access("create forum topics")) {
menu("node/add/forum",t("forum topic"), "forum_page");
}
if (!$main && $type == "node" && $node->type == "forum") {
// get previous and next topic

View File

@ -1551,14 +1551,6 @@ function user_admin_edit($edit = array()) {
$output .= implode("\n", module_invoke_all("user", "edit_form", $edit, $account));
$options = "<option value=\"\"". (("" == $key) ? " selected=\"selected\"" : "") .">". t("Default theme") ."</option>\n";
foreach (theme_list() as $key => $value) {
$options .= "<option value=\"$key\"". (($edit["theme"] == $key) ? " selected=\"selected\"" : "") .">$key - $value->description</option>\n";
}
$output .= form_item(t("Theme"), "<select name=\"edit[theme]\">$options</select>", t("Selecting a different theme will change the look and feel of the site."));
for ($zone = -43200; $zone <= 46800; $zone += 3600) $zones[$zone] = date("l, F dS, Y - h:i A", time() - date("Z") + $zone) ." (GMT ". $zone / 3600 .")";
$output .= form_select(t("Time zone"), "timezone", $account->timezone, $zones, t("Select what time you currently have and your time zone settings will be set appropriate."));
$output .= form_select(t("Language"), "language", $account->language, $languages, t("Selecting a different language will change the language of the site."));
$output .= form_item(t("Password"), "<input type=\"password\" name=\"edit[pass1]\" size=\"12\" maxlength=\"24\" /> <input type=\"password\" name=\"edit[pass2]\" size=\"12\" maxlength=\"24\" />", t("Enter a new password twice if you want to change the current password for this user or leave it blank if you are happy with the current password."));
$output .= form_select(t("Status"), "status", $account->status, array(t("Blocked"), t("Active")));
$output .= form_select(t("Role"), "rid", $account->rid, user_roles(1));

View File

@ -1551,14 +1551,6 @@ function user_admin_edit($edit = array()) {
$output .= implode("\n", module_invoke_all("user", "edit_form", $edit, $account));
$options = "<option value=\"\"". (("" == $key) ? " selected=\"selected\"" : "") .">". t("Default theme") ."</option>\n";
foreach (theme_list() as $key => $value) {
$options .= "<option value=\"$key\"". (($edit["theme"] == $key) ? " selected=\"selected\"" : "") .">$key - $value->description</option>\n";
}
$output .= form_item(t("Theme"), "<select name=\"edit[theme]\">$options</select>", t("Selecting a different theme will change the look and feel of the site."));
for ($zone = -43200; $zone <= 46800; $zone += 3600) $zones[$zone] = date("l, F dS, Y - h:i A", time() - date("Z") + $zone) ." (GMT ". $zone / 3600 .")";
$output .= form_select(t("Time zone"), "timezone", $account->timezone, $zones, t("Select what time you currently have and your time zone settings will be set appropriate."));
$output .= form_select(t("Language"), "language", $account->language, $languages, t("Selecting a different language will change the language of the site."));
$output .= form_item(t("Password"), "<input type=\"password\" name=\"edit[pass1]\" size=\"12\" maxlength=\"24\" /> <input type=\"password\" name=\"edit[pass2]\" size=\"12\" maxlength=\"24\" />", t("Enter a new password twice if you want to change the current password for this user or leave it blank if you are happy with the current password."));
$output .= form_select(t("Status"), "status", $account->status, array(t("Blocked"), t("Active")));
$output .= form_select(t("Role"), "rid", $account->rid, user_roles(1));