| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | public function update_blocks_settings() |
||
| 50 | { |
||
| 51 | $result = $this->db->sql_query('SELECT * FROM ' . $this->table_prefix . 'sm_blocks_config'); |
||
| 52 | |||
| 53 | $bconfig = array(); |
||
| 54 | while ($row = $this->db->sql_fetchrow($result)) |
||
| 55 | { |
||
| 56 | $bconfig[$row['bid']][$row['bvar']] = $row['bval']; |
||
| 57 | } |
||
| 58 | $this->db->sql_freeresult($result); |
||
| 59 | |||
| 60 | foreach ($bconfig as $bid => $settings) |
||
| 61 | { |
||
| 62 | $sql_data = array( |
||
| 63 | 'settings' => serialize($settings) |
||
| 64 | ); |
||
| 65 | $this->db->sql_query('UPDATE ' . $this->table_prefix . 'sm_blocks SET ' . $this->db->sql_build_array('UPDATE', $sql_data) .' WHERE bid = ' . (int) $bid); |
||
| 66 | } |
||
| 69 |