1. 31 Mar, 2005 2 commits
  2. 29 Mar, 2005 1 commit
  3. 18 Mar, 2005 2 commits
  4. 08 Mar, 2005 1 commit
  5. 28 Feb, 2005 1 commit
  6. 27 Feb, 2005 4 commits
  7. 15 Jan, 2005 1 commit
  8. 14 Jan, 2005 1 commit
  9. 13 Jan, 2005 1 commit
  10. 11 Jan, 2005 7 commits
  11. 10 Jan, 2005 1 commit
  12. 09 Jan, 2005 1 commit
  13. 31 Dec, 2004 2 commits
    • Dries's avatar
      - Small change · ceb20b45
      Dries authored
      ceb20b45
    • Dries's avatar
      - Patch #14917 by UnConeD/Steven: · 1dbe0dc2
      Dries authored
      1) The different types of search, which used to be radio button options in the search form, are now subtabs of "search" (default "search/node"). This seems better from a UI point of view, but also has another advantage: modules which implement a custom search form (flexinode, project) can add it as a subtab of search. This means that all search forms will be located in the same place, and also without needing an extra api call to search.module.
      
      2) The current code was a bit hackish, as the indexing of comments along with nodes was hardcoded in node.module. Instead, I created a nodeapi operation "update index" which allows modules to add more data for a node that is being indexed. Comments are now indexed using this mechanism and from comment.module, which is a lot cleaner.
      
      3) The search results format was also hardcoded to include "N comments". I replaced this with a nodeapi operation "search result" and moved the comment code to comment.module where it belongs. This op is quite useful, as for example I also modified upload.module to add "N attachments" to a search result if any are present.
      1dbe0dc2
  14. 15 Dec, 2004 1 commit
    • Dries's avatar
      - Patch #13907 by Neil: less ways to set the page title. · 2b17b3a9
      Dries authored
         * Less logic in theme code.
         * Encourages use of the menu system.
         * Easier to find where a title or breadcrumb comes from in other people's code because there are less places to look. Look in menu and then grep for the appropriate set function. Looking for calls to theme_page() is hard because there are too many of them.
         * Very slightly more efficient.
      2b17b3a9
  15. 11 Dec, 2004 1 commit
    • Dries's avatar
      · 6e3eb60a
      Dries authored
      - Removed some cruft: left-over xxx_help_page() functions.
      6e3eb60a
  16. 02 Dec, 2004 1 commit
  17. 29 Nov, 2004 1 commit
    • Dries's avatar
      - Patch #13581 by Steven: Db_query() allows a variable amount of parameters so... · 29337ad8
      Dries authored
      - Patch #13581 by Steven: Db_query() allows a variable amount of parameters so you can pass the query arguments in. There is however an alternative syntax: instead of passing the query arguments as function arguments, you can also pass a single array with the query arguments in it. For example the following two statements are equivalent:
      
      db_query($query, $a, $b, $c);
      db_query($query, array($a, $b, $c));
      
      This usage is particularly interesting when the query is constructed dynamically, and the amount of arguments to pass varies. In that case we use the second method to avoid using call_user_func_array(). This behaviour is not documented explicitly, but it is used in several places.
      
      However, db_query_range() and pager_query() do not support this syntax properly, which means there are several pieces of code which still revert to the ugly call_user_func_array() call.
      
      This patch updates db_query_range() and pager_query() so they support the array-passing method. I also added documentation about this method to each of the db functions.
      
      I also cleaned up the code for db_query (it was weird and hard to understand) and moved db_query() and db_queryd() from database.xxxxx.inc to database.inc: it was the same between both mysql and pgsql, as it doesn't do anything database specific. It just prefixes the tables and inserts the arguments. The actual db query is performed in _db_query(), which is still in database.xxxxx.inc.
      
      Finally, I updated several places with the new syntax, and the code is a lot cleaner. For example:
      - array_unshift($params, "SELECT u.* FROM {users} u WHERE $query u.status < 3");
      - $params[] = 0;
      - $params[] = 1;
      - $result = call_user_func_array('db_query_range', $params);
      + $result = db_query_range("SELECT u.* FROM {users} u WHERE $query u.status < 3", $params, 0, 1);
      
      and
      
      - return call_user_func_array('db_query_range', array_merge(array($query), $args, array((int)$pager_from_array[$element], (int)$limit)));
      + return db_query_range($query, $args, (int)$pager_from_array[$element], (int)$limit);
      
      I've tested it on mysql. I didn't alter the actual db behaviour, so pgsql should be okay too.
      
      This patch is important because many people avoid the call_user_func_array() method and put data directly into the db query.  This is very, very bad because the database prefix will be applied to it, and strip out braces. It's also generally bad form as you have to call check_query() yourself.  With the new, documented syntax, there is no more excuse to put data directly in the query.
      29337ad8
  18. 24 Nov, 2004 1 commit
    • Dries's avatar
      · 4726c931
      Dries authored
      - Patch #13443 by Moshe: got rid of the semi-implemented 'page link' feature. All themes currently support primary and secondary links so page links are now deprecated.  Check your contributed modules and update them accordingly.
      4726c931
  19. 18 Nov, 2004 1 commit
  20. 04 Nov, 2004 2 commits
    • Dries's avatar
      - Patch #12232 by Steven: more search improvements: · b6eee48c
      Dries authored
         + When a comment is posted, a node needs to be re-indexed. Luckily, we can use node_comment_statistics for this easily.
         + When a node is deleted, it should be deleted from the search index as well.
         + The search wipe didn't properly remove links to nodes from the index.
         + Section url was faulty in _help.
         + Minor code rearrangement.
      b6eee48c
    • Steven Wittens's avatar
      Fixing bad UTF-8. · d13943e2
      Steven Wittens authored
      d13943e2
  21. 03 Nov, 2004 1 commit
    • Dries's avatar
      - Patch by Steven: · bd6ae693
      Dries authored
         + Display 'friendly' name rather than module name in search watchdog
           messages.
         + Remove left-over from search_total table.
         + Add index wipe button to the admin
         + Moved the admin to admin/settings/search
         + Prevented menu bug when node modules update the breadcrumb in view
           (thanks JonBob).
         + Changed search_total table's word key to PRIMARY.
      bd6ae693
  22. 31 Oct, 2004 1 commit
    • Dries's avatar
      - Patch #12232 by Steven/UnConed: search module improvements. · 8daed9cb
      Dries authored
      1) Clean up the text analyser: make it handle UTF-8 and all sorts of characters. The word splitter now does intelligent splitting into words and supports all Unicode characters. It has smart handling of acronyms, URLs, dates, ...
      
      2) It now indexes the filtered output, which means it can take advantage of HTML tags. Meaningful tags (headers, strong, em, ...) are analysed and used to boost certain words scores. This has the side-effect of allowing the indexing of PHP nodes.
      
      3) Link analyser for node links. The HTML analyser also checks for links. If they point to a node on the current site (handles path aliases) then the link's words are counted as part of the target node. This helps bring out commonly linked FAQs and answers to the top of the results.
      
      4) Index comments along with the node. This means that the search can make a difference between a single node/comment about 'X' and a whole thread about 'X'. It also makes the search results much shorter and more relevant (before this patch, comments were even shown first).
      
      5) We now keep track of total counts as well as a per item count for a word. This allows us to divide the word score by the total before adding up the scores for different words, and automatically makes noisewords have less influence than rare words. This dramatically improves the relevancy of multiword searches. This also makes the disadvantage of now using OR searching instead of AND searching less problematic.
      
      6) Includes support for text preprocessors through a hook. This is required to index Chinese and Japanese, because these languages do not use spaces between words. An external utility can be used to split these into words through a simple wrapper module. Other uses could be spell checking (although it would have no UI).
      
      7) Indexing is now regulated: only a certain amount of items will be indexed per cron run. This prevents PHP from running out of memory or timing out. This also makes the reindexing required for this patch automatic. I also added an index coverage estimate to the search admin screen.
      
      8) Code cleanup! Moved all the search stuff from common.inc into search.module, rewired some hooks and simplified the functions used. The search form and results now also use valid XHTML and form_ functions. The search admin was moved from search/configure to admin/search for consistency.
      
      9) Improved search output: we also show much more info per item: date, author, node type, amount of comments and a cool dynamic excerpt à la Google. The search form is now much more simpler and the help is only displayed as tips when no search results are found.
      
      10) By moving all search logic to SQL, I was able to add a pager to the search results. This improves usability and performance dramatically.
      8daed9cb
  23. 15 Oct, 2004 1 commit
  24. 21 Sep, 2004 1 commit
    • Dries's avatar
      · 4a6e2258
      Dries authored
      - Patch #10982 by TDobes: usability improvement: changed the link in search.module watchdog entries from "view results" to "results". This better matches watchdog entries from other modules.
      4a6e2258
  25. 16 Sep, 2004 1 commit
    • Dries's avatar
      · 5c7983c4
      Dries authored
      - Patch #8179 by JonBob: reintroduced menu caching.
      5c7983c4
  26. 09 Sep, 2004 1 commit
    • Dries's avatar
      · b84b6e42
      Dries authored
      - Patch #10663 by JonBob: documentation improvements: fixed some typos and improved consistency to the use of Doxygen/api.module commands in the comments.
      b84b6e42
  27. 21 Aug, 2004 1 commit
    • Dries's avatar
      · 94e30bf7
      Dries authored
      - Patch by JonBob: for consistency and readability, add brief descriptions of each source file inside the @file comment block at the head of the file. This helps with Doxygen indexing, and also allows neophytes to see what a file does immediately on opening the source, regardless of the organization of the hooks.
      94e30bf7