Diff for Metafox/admin/inc-db/triggers/word-count.trigger between version 1.2 and 1.3
| version 1.2, 2009/10/14 14:24:26 |
version 1.3, 2013/02/25 15:30:29 |
|
|
| foreach (array('ghometext', 'hometext', 'bodytext', 'text', 'description') as $type) { |
foreach (array('ghometext', 'hometext', 'bodytext', 'text', 'description') as $type) { |
| if (in_array($type, $changed)) { |
if (in_array($type, $changed)) { |
| $newvals[$type.'_wordcount'] = str_word_count($newvals[$type]); |
$newvals[$type.'_wordcount'] = str_word_count($newvals[$type]); |
| |
} else { |
| |
unset($newvals[$type.'_wordcount']); |
| |
} |
| |
} |
| |
|
| |
// unset empty cols |
| |
foreach (array('section_id', 'article_id') as $col) { |
| |
if (strlen($newvals[$col]) <= 0) { |
| |
unset($newvals[$col]); |
| } |
} |
| } |
} |
| |
|
Platon Group <platon@platon.org> http://platon.org/
|
|