PluginProbe
CSS & JavaScript Toolbox / 6.0.6
CSS & JavaScript Toolbox v6.0.6
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | models/blocks-backups.php +0 -7 trunk6.0.6 View file →
@@ -47,11 +47,8 @@
47 47 * @param mixed $srcBackupId
48 48 * @param mixed $desBackupId
49 49 */
50 50 public function copyBackupBlocks($srcBackupId, $desBackupId) {
51 - // Initialie.
52 - $codeFilesQuery = 'INSERT INTO #__cjtoolbox_block_files (blockId, id, name, description, `type`, code, `order`)
53 - SELECT %d, id, name, description, `type`, code, `order` FROM #__cjtoolbox_block_files WHERE blockId = %d;';
54 51 // Blocks Table & Model..
55 52 require_once CJTOOLBOX_TABLES_PATH . '/blocks.php';
56 53 require_once CJTOOLBOX_TABLES_PATH . '/block-pins.php';
57 54 require_once CJTOOLBOX_MODELS_PATH . '/blocks.php';
@@ -100,10 +97,8 @@
100 97 $blocksTable->insert($blockData);
101 98 // Insert block Pins.
102 99 $pinsData = array_intersect_key($block, array_flip(array('pages', 'posts', 'categories')));
103 100 $blockPinsTable->insert($block['id'], $pinsData);
104 - // Copy code files.
105 - $this->dbDriver->insert(sprintf($codeFilesQuery, $block['id'], $id))->processQueue();
106 101 }
107 102 }
108 103
109 104 /**
@@ -170,10 +165,8 @@
170 165 $blocks = $blocksTable->get(null, $blocks['fields'], $blocks['filters']);
171 166 // Delete blocks using its Id.
172 167 $ids = array_keys($blocks);
173 168 $blocksModel->delete($ids);
174 - // Delete code files.
175 - $this->dbDriver->delete('DELETE FROM #__cjtoolbox_block_files where blockId IN (' . implode(',', $ids) . ');');
176 169 // In order for $this->processQueue to work
177 170 // we need to Merge db driver queues into the current
178 171 // local queue.
179 172 $this->dbDriver->merge($blocksModel->dbDriver());