[drupal-devel] [bug] welcome text appears when the query in node_page_default is rewritten to have an empty result

chx drupal-devel at drupal.org
Thu Mar 3 23:40:07 UTC 2005


Issue status update for http://drupal.org/node/18340

 Project:      Drupal
 Version:      cvs
 Component:    node.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  chx
 Reported by:  chx
 Updated by:   chx
 Status:       patch
 Attachment:   http://drupal.org/files/issues/default_as_node.patch (8.55 KB)

As discussed on IRC, I have moved the welcome text into node 0 as a PHP
node. Although there is a check for whether this welcome node is
present for every node_page_default call, it is only a variable_get, so
it is cheap. Also at every node save we check for the same variable, and
if the welcome node is present, it gets silently deleted. So, as soon as
the first node gets created, the welcome text disappears as it should.
The one liner in node_validate is very important when a node with nid=0
is present. Otherwise, consider it a minor speedup.
This patch should have a little positive effect on the memory
requirements of node.module -- a long, rarely used text is removed.
This is not a new feature but a usability issue so let's get it into
4.6. Although there is change (two INSERTs) to database.mysql and
database.pgsql it does not mandate an update.inc change 'cos most
probably noone will bother with updating an empty site.
I payed special attention to spaces this time.


chx




More information about the drupal-devel mailing list