- Ran the code through 'scripts/code-clean.sh': removed trailing whitespace

(and possibly tabs).
4.0.x
Dries Buytaert 2002-05-20 07:34:38 +00:00
parent d895ef8c40
commit f3c8757179
10 changed files with 27 additions and 27 deletions

View File

@ -2,7 +2,7 @@
#
# Host: localhost Database: drupal
#--------------------------------------------------------
# Server version 3.23.38
# Server version 3.23.38
#
# Table structure for table 'access'

View File

@ -20,7 +20,7 @@ function db_connect($url) {
*
* @param $query sql query
* @param $type module type of this item
* @return sql result resource
* @return sql result resource
*/
function db_query($query) {
$args = func_get_args();

View File

@ -116,7 +116,7 @@ function theme_blocks($region, &$theme) {
global $id, $PHP_SELF, $user;
$result = db_query("SELECT * FROM blocks WHERE (status = '1' OR custom = '1') ". ($region != "all" ? "AND region = '%s' " : "") ."ORDER BY weight, name", $region == "left" ? 0 : 1);
while ($result && ($block = db_fetch_object($result))) {
if (($block->status && (!$user->uid || !$block->custom)) || ($block->custom && $user->block[$block->name])) {
$blocks = module_invoke($block->module, "block");

View File

@ -1227,7 +1227,7 @@ function node_page() {
if ($or) {
// this is an OR of terms
$result = db_query("SELECT DISTINCT(n.nid), type FROM node n LEFT JOIN term_node r ON n.nid = r.nid WHERE tid IN (".implode(",", $terms).") AND ". ($id ? "nid = '$id'" : "promote = '1'") ." AND status = '1' ORDER BY static DESC, created DESC LIMIT ". ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10)));
}
}
else if ($and) {
// this is an AND
$result = db_query("SELECT n.nid, type, count(*) AS c FROM node n LEFT JOIN term_node r ON n.nid = r.nid WHERE tid IN (".implode(",", $terms).") AND ". ($id ? "nid = '$id'" : "promote = '1'") ." AND status = '1' GROUP BY n.nid HAVING c = ".count($terms)." ORDER BY static DESC, created DESC LIMIT ". ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10)));

View File

@ -1227,7 +1227,7 @@ function node_page() {
if ($or) {
// this is an OR of terms
$result = db_query("SELECT DISTINCT(n.nid), type FROM node n LEFT JOIN term_node r ON n.nid = r.nid WHERE tid IN (".implode(",", $terms).") AND ". ($id ? "nid = '$id'" : "promote = '1'") ." AND status = '1' ORDER BY static DESC, created DESC LIMIT ". ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10)));
}
}
else if ($and) {
// this is an AND
$result = db_query("SELECT n.nid, type, count(*) AS c FROM node n LEFT JOIN term_node r ON n.nid = r.nid WHERE tid IN (".implode(",", $terms).") AND ". ($id ? "nid = '$id'" : "promote = '1'") ." AND status = '1' GROUP BY n.nid HAVING c = ".count($terms)." ORDER BY static DESC, created DESC LIMIT ". ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10)));

View File

@ -37,7 +37,7 @@ function system_link($type) {
function system_view_options() {
global $conf, $cmodes, $corder;
// general settings:
$output .= "<h3>General settings</h3>\n";
$output .= form_textfield("Name", "site_name", variable_get("site_name", "drupal"), 55, 55, "The name of this website.");
@ -124,12 +124,12 @@ function system_view($type) {
$form = system_view_filters();
break;
default:
foreach (module_list() as $name) {
if (module_hook($name, "conf_options")) {
$links[] = la($name, array("mod" => "system"), $name);
}
}
foreach (module_list() as $name) {
if (module_hook($name, "conf_options")) {
$links[] = la($name, array("mod" => "system"), $name);
}
}
$output = "<small>". implode(" :: ", $links) ."</small><hr />";
$form = system_view_options();
}

View File

@ -37,7 +37,7 @@ function system_link($type) {
function system_view_options() {
global $conf, $cmodes, $corder;
// general settings:
$output .= "<h3>General settings</h3>\n";
$output .= form_textfield("Name", "site_name", variable_get("site_name", "drupal"), 55, 55, "The name of this website.");
@ -124,12 +124,12 @@ function system_view($type) {
$form = system_view_filters();
break;
default:
foreach (module_list() as $name) {
if (module_hook($name, "conf_options")) {
$links[] = la($name, array("mod" => "system"), $name);
}
}
foreach (module_list() as $name) {
if (module_hook($name, "conf_options")) {
$links[] = la($name, array("mod" => "system"), $name);
}
}
$output = "<small>". implode(" :: ", $links) ."</small><hr />";
$form = system_view_options();
}

View File

@ -56,7 +56,7 @@ function taxonomy_form_vocabulary($edit = array()) {
$nodetypes[$name] = $name;
}
}
$form .= form_textfield("Vocabulary name", "name", $edit["name"], 50, 64, "Required. The name for this vocabulary. Example: 'Topic'.");
$form .= form_textarea("Description", "description", $edit["description"], 60, 5, "Optional. Description of the vocabulary, can be used by modules.");
$form .= form_select("Types", "types", explode(",", $edit["types"]), $nodetypes, "Required. A list of node types you want to associate this vocabulary with.", "", 1);

View File

@ -56,7 +56,7 @@ function taxonomy_form_vocabulary($edit = array()) {
$nodetypes[$name] = $name;
}
}
$form .= form_textfield("Vocabulary name", "name", $edit["name"], 50, 64, "Required. The name for this vocabulary. Example: 'Topic'.");
$form .= form_textarea("Description", "description", $edit["description"], 60, 5, "Optional. Description of the vocabulary, can be used by modules.");
$form .= form_select("Types", "types", explode(",", $edit["types"]), $nodetypes, "Required. A list of node types you want to associate this vocabulary with.", "", 1);

View File

@ -420,20 +420,20 @@ function update_30() {
function update_31() {
include_once("modules/taxonomy.module");
print "Wiping tables.<br />";
db_query("DELETE FROM vocabulary");
db_query("DELETE FROM term_data");
db_query("DELETE FROM term_node");
db_query("DELETE FROM term_hierarchy");
print "Creating collections.<br />";
$result = db_query("SELECT * FROM collection");
while ($c = db_fetch_object($result)) {
$collections[$c->name] = count($collections) + 1;
db_query("INSERT INTO vocabulary SET vid = '". count($collections) ."', name = '$c->name', types = '". str_replace(" ", "", $c->types) ."'");
}
print "Creating terms.<br />";
$result = db_query("SELECT * FROM tag");
$i = 1;
@ -447,7 +447,7 @@ function update_31() {
}
}
}
print "Linking nodes with terms.<br />";
$result = db_query("SELECT nid,attributes FROM node WHERE attributes != ''");
while ($node = db_fetch_object($result)) {
@ -462,12 +462,12 @@ function update_31() {
}
}
}
if (count($errors)) {
asort($errors);
print "<br /><br />Terms not found:<br /><pre> ". implode("\n ", $errors) ."</pre>";
}
// Clean up meta tag system
update_sql("DROP TABLE collection");
update_sql("DROP TABLE tag");