Skip to content

Commit 70dd09f

Browse files
authored
Merge pull request #34 from Crizz0/issue/33
Fix use of this->table in migration file
2 parents b63586a + e90c951 commit 70dd09f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cron/main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(\phpbb\cache\service $cache, \phpbb\config\config $c
5353
public function run()
5454
{
5555
$now = time();
56-
$sql = 'DELETE FROM ' . $this->table('pastebin') . '
56+
$sql = 'DELETE FROM ' . $this->pastebin_table . '
5757
WHERE snippet_prunable = 1 and snippet_prune_on < ' . $now;
5858
$this->db->sql_query($sql);
5959
$this->config->set('phpbbde_pastebin_prune_last_run', $now, true);

migrations/pastebin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function update_schema()
2626
{
2727
return array(
2828
'add_tables' => array(
29-
$this->table('pastebin') => array(
29+
$this->table_prefix . 'pb' => array(
3030
'COLUMNS' => array(
3131
'snippet_id' => array('UINT:8', null, 'auto_increment'),
3232
'snippet_author' => array('UINT:8', 0),
@@ -50,7 +50,7 @@ public function update_schema()
5050
public function revert_schema()
5151
{
5252
return array(
53-
'drop_tables' => array($this->table('pastebin')),
53+
'drop_tables' => array($this->table_prefix . 'pb'),
5454
);
5555
}
5656

0 commit comments

Comments
 (0)