| 1 |
<?php |
| 2 |
/** |
| 3 |
* |
| 4 |
*/ |
| 5 |
|
| 6 |
// Import dependencies. |
| 7 |
cssJSToolbox::import('framework:html:list.php', 'framework:db:mysql:xtable.inc.php'); |
| 8 |
|
| 9 |
/** |
| 10 |
* |
| 11 |
*/ |
| 12 |
class CJTTemplateOwnersField extends CJTListField { |
| 13 |
|
| 14 |
/** |
| 15 |
* put your comment there... |
| 16 |
* |
| 17 |
*/ |
| 18 |
protected function prepareItems() { |
| 19 |
// Query CJT Authors + Wordpress build-in local users. |
| 20 |
$query = ' SELECT o.ID id, o.user_login `text` |
| 21 |
FROM #__wordpress_users o |
| 22 |
RIGHT JOIN #__cjtoolbox_templates t |
| 23 |
ON o.ID = t.ownerId ORDER BY `text`'; |
| 24 |
// Get all exists authors |
| 25 |
$this->items = cssJSToolbox::getInstance()->getDBDriver()->select($query); |
| 26 |
} |
| 27 |
|
| 28 |
} // End class. |