| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function run() |
||
| 18 | { |
||
| 19 | // ftsearch_refresh() will roughly process 5-50 search_index_times entries |
||
| 20 | // per second. In normal Opencaching.de operation, we expect just 1 changed |
||
| 21 | // text item per cronjob run. |
||
| 22 | // |
||
| 23 | // Let's allow 20 per run. This will yield a timely indexing even in peak |
||
| 24 | // activity situations, and still limit the cronjob runtime to a few seconds. |
||
| 25 | |||
| 26 | // If there is some very huge batch outstanding, or for some special index |
||
| 27 | // rebuild, we will leave it up to fill_search_index.php. This avoids |
||
| 28 | // duplicate word counting when both run concurrently (though the word |
||
| 29 | // counts are uncritical an so far not used at all). |
||
| 30 | |||
| 31 | if (sql_value('SELECT COUNT(*) FROM `search_index_times`', 0) < 2000) { |
||
| 32 | ftsearch_refresh(20); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | } |
||
| 36 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.