| @@ -8,9 +8,9 @@ | ||
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | 10 | * |
| 11 | 11 | */ |
| 12 | -class CJTTinymceBlocksModel { | |
| 12 | +class CJTTinymceBlocksModel_DEPRECATED { | |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * put your comment there... |
| 16 | 16 | * |
| @@ -20,9 +20,9 @@ | ||
| 20 | 20 | $driver = cssJSToolbox::getInstance()->getDBDriver(); |
| 21 | 21 | // Get common quiery parts!@ |
| 22 | 22 | $query = $this->getItemsQuery(); |
| 23 | 23 | // Add fields list! |
| 24 | - $query['select'] = 'id, name title, owner'; | |
| 24 | + $query['select'] = 'b.id, b.name title, b.owner, f.name formTitle'; | |
| 25 | 25 | $query = "SELECT {$query['select']} FROM {$query['from']} WHERE {$query['where']};"; |
| 26 | 26 | // Retrieve blocks! |
| 27 | 27 | return $driver->select($query); |
| 28 | 28 | } |
| @@ -32,9 +32,9 @@ | ||
| 32 | 32 | * |
| 33 | 33 | */ |
| 34 | 34 | public function getItemsQuery() { |
| 35 | 35 | // Build query parts! |
| 36 | - $query['from'] = '#__cjtoolbox_blocks'; | |
| 36 | + $query['from'] = '#__cjtoolbox_blocks b LEFT JOIN #__cjtoolbox_forms f ON b.id = f.blockId'; | |
| 37 | 37 | $query['where'] = 'type = "block" and backupId IS null'; |
| 38 | 38 | return $query; |
| 39 | 39 | } |
| 40 | 40 | |