dr:zeitgeist
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dr:zeitgeist [2007/12/22 14:45] – external edit 127.0.0.1 | dr:zeitgeist [2020/11/23 17:23] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
Ensuing discussion on [[irc:// | Ensuing discussion on [[irc:// | ||
+ | |||
* the idea was interesting | * the idea was interesting | ||
Line 11: | Line 12: | ||
As this involves changes to core features, I hope developers with a deeper understanding of core than me will comment on this/edit this page to improve it before I write code involving these core changes. The wiki structure allows this more easily than comments on the patch page. | As this involves changes to core features, I hope developers with a deeper understanding of core than me will comment on this/edit this page to improve it before I write code involving these core changes. The wiki structure allows this more easily than comments on the patch page. | ||
+ | |||
===== Problems with the current patch ===== | ===== Problems with the current patch ===== | ||
Line 16: | Line 18: | ||
If you look at the patch, what it basically does is this, along with the definition of a new block in search_block: | If you look at the patch, what it basically does is this, along with the definition of a new block in search_block: | ||
- | < | + | <code php> |
+ | function _search_recent() | ||
{ | { | ||
$sq = " | $sq = " | ||
Line 37: | Line 40: | ||
unset ($ar); | unset ($ar); | ||
return $output ; | return $output ; | ||
- | }</php> | + | } |
+ | </code> | ||
You'll notice the " | You'll notice the " | ||
Also, processing is done in PHP whereas a better implementation would just ask the DBMS for the set of distinct entries in proper order to minimize the global workload. | Also, processing is done in PHP whereas a better implementation would just ask the DBMS for the set of distinct entries in proper order to minimize the global workload. | ||
- | |||
- | |||
===== Changes to watchdog ===== | ===== Changes to watchdog ===== | ||
Line 50: | Line 52: | ||
* add a new column (say, " | * add a new column (say, " | ||
* modify bootstrap.inc/ | * modify bootstrap.inc/ | ||
- | + | <code php> | |
- | <php> | + | |
function watchdog( | function watchdog( | ||
$type, | $type, | ||
Line 57: | Line 58: | ||
$severity = WATCHDOG_NOTICE, | $severity = WATCHDOG_NOTICE, | ||
$link = NULL, | $link = NULL, | ||
- | $data = NULL) {</php> | + | $data = NULL) { |
+ | </code> | ||
The new parameter could be used by modules aware of this new feature to store content of their choice in the watchdog along with the standard parameters, while retaining compatibility with existing call through the use of a default NULL. | The new parameter could be used by modules aware of this new feature to store content of their choice in the watchdog along with the standard parameters, while retaining compatibility with existing call through the use of a default NULL. | ||
Line 68: | Line 70: | ||
In the current 4.6.x core, only watchdog module queries the watchdog table, and does so with queries like: | In the current 4.6.x core, only watchdog module queries the watchdog table, and does so with queries like: | ||
+ | |||
<code sql> | <code sql> | ||
- | which means no outside modules should be impacted. These queries could be improved to avoid querying this additional column if it is not needed. | ||
- | |||
+ | which means no outside modules should be impacted. These queries could be improved to avoid querying this additional column if it is not needed. | ||
===== Changes to search ===== | ===== Changes to search ===== | ||
Line 86: | Line 88: | ||
===== TODO ===== | ===== TODO ===== | ||
+ | |||
2005-11-29 8:33 chx says: | 2005-11-29 8:33 chx says: | ||
+ | |||
If you want to win the developers' | If you want to win the developers' | ||
2005-1129 20:33 After further discussion, it looks like the idea is to log the debug_backtrace() information in the additional field. | 2005-1129 20:33 After further discussion, it looks like the idea is to log the debug_backtrace() information in the additional field. |
dr/zeitgeist.1198334700.txt.gz · Last modified: 2020/11/23 17:23 (external edit)