Completed
Push — remove-tables-constants ( 6d7635...7377e8 )
by Erwan
03:11
created
core/cron.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 	*/
53 53
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\log\log $phpbb_log, \phpbb\user $user, \phpbb\notification\manager $notification, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
54 54
 	{
55
-		$this->db				= $db;
56
-		$this->config			= $config;
57
-		$this->phpbb_log		= $phpbb_log;
55
+		$this->db = $db;
56
+		$this->config = $config;
57
+		$this->phpbb_log = $phpbb_log;
58 58
 		$this->user				= $user;
59
-		$this->notification		= $notification;
59
+		$this->notification = $notification;
60 60
 		$this->link				= $link;
61
-		$this->root_path		= $root_path;
62
-		$this->php_ext			= $php_ext;
61
+		$this->root_path = $root_path;
62
+		$this->php_ext = $php_ext;
63 63
 	}
64 64
 
65 65
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	public function auto_check($cat_data)
72 72
 	{
73 73
 		$sql = 'SELECT cat_name
74
-			FROM ' . $this->categories_table . '
74
+			FROM ' . $this->categories_table.'
75 75
 			WHERE cat_id = ' . (int) $cat_data['cat_id'];
76 76
 		$result = $this->db->sql_query($sql);
77 77
 		$row = $this->db->sql_fetchrow($result);
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
 
84 84
 			$this->_check($cat_data['cat_id'], $cat_data['cat_cron_nb_check'], $next_prune);
85 85
 
86
-			$sql = 'UPDATE ' . $this->categories_table . "
86
+			$sql = 'UPDATE '.$this->categories_table."
87 87
 			SET cat_cron_next = $next_prune
88
-			WHERE cat_id = " . (int) $cat_data['cat_id'];
88
+			WHERE cat_id = ".(int) $cat_data['cat_id'];
89 89
 			$this->db->sql_query($sql);
90 90
 
91 91
 			$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_DIR_AUTO_PRUNE', time(), array($row['cat_name']));
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	public function get_cat($cat_id)
104 104
 	{
105 105
 		$sql = 'SELECT cat_id, cat_cron_enable, cat_cron_next, cat_cron_freq, cat_cron_nb_check
106
-				FROM ' . $this->categories_table . '
106
+				FROM ' . $this->categories_table.'
107 107
 					WHERE cat_id = ' . (int) $cat_id;
108 108
 		$result = $this->db->sql_query($sql);
109 109
 		$row = $this->db->sql_fetchrow($result);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 					'ON'	=> 'l.link_user_id = u.user_id'
139 139
 				)
140 140
 			),
141
-			'WHERE'		=> 'l.link_back <> "" AND l.link_active = 1 AND l.link_cat = '  . (int) $cat_id);
141
+			'WHERE'		=> 'l.link_back <> "" AND l.link_active = 1 AND l.link_cat = '.(int) $cat_id);
142 142
 
143 143
 			$sql = $this->db->sql_build_query('SELECT', $sql_array);
144 144
 			$result = $this->db->sql_query($sql);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 			{
148 148
 				if ($this->link->validate_link_back($row['link_back'], false, true) !== false)
149 149
 				{
150
-					if (!$nb_check || ($row['link_nb_check']+1) >= $nb_check)
150
+					if (!$nb_check || ($row['link_nb_check'] + 1) >= $nb_check)
151 151
 					{
152 152
 						$del_array[] = $row['link_id'];
153 153
 					}
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	{
182 182
 		if (!class_exists('messenger'))
183 183
 		{
184
-			include($this->root_path . 'includes/functions_messenger.' . $this->php_ext);
184
+			include($this->root_path.'includes/functions_messenger.'.$this->php_ext);
185 185
 		}
186 186
 
187 187
 		$messenger = new \messenger(false);
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 		// We need to define it, because we use user->format_date below
191 191
 		$this->user->timezone = new \DateTimeZone($this->config['board_timezone']);
192 192
 
193
-		$sql = 'UPDATE ' . $this->links_table . '
193
+		$sql = 'UPDATE '.$this->links_table.'
194 194
 			SET link_nb_check = link_nb_check + 1
195 195
 			WHERE ' . $this->db->sql_in_set('link_id', array_keys($u_array));
196 196
 		$this->db->sql_query($sql);
Please login to merge, or discard this patch.