|
@@ 88-112 (lines=25) @@
|
| 85 |
|
* @param mixed $old_state State returned by previous call of this method |
| 86 |
|
* @return mixed Returns false after last step, otherwise temporary state |
| 87 |
|
*/ |
| 88 |
|
public function disable_step($old_state) |
| 89 |
|
{ |
| 90 |
|
switch ($old_state) |
| 91 |
|
{ |
| 92 |
|
case '': // Empty means nothing has run yet |
| 93 |
|
|
| 94 |
|
// Disable notifications |
| 95 |
|
return $this->notification_handler('disable', array( |
| 96 |
|
'ernadoo.phpbbdirectory.notification.type.directory_website', |
| 97 |
|
'ernadoo.phpbbdirectory.notification.type.directory_website_approved', |
| 98 |
|
'ernadoo.phpbbdirectory.notification.type.directory_website_disapproved', |
| 99 |
|
'ernadoo.phpbbdirectory.notification.type.directory_website_error_cron', |
| 100 |
|
'ernadoo.phpbbdirectory.notification.type.directory_website_in_queue', |
| 101 |
|
)); |
| 102 |
|
|
| 103 |
|
break; |
| 104 |
|
|
| 105 |
|
default: |
| 106 |
|
|
| 107 |
|
// Run parent disable step method |
| 108 |
|
return parent::disable_step($old_state); |
| 109 |
|
|
| 110 |
|
break; |
| 111 |
|
} |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
/** |
| 115 |
|
* Single purge step that reverts any included and installed migrations |
|
@@ 120-144 (lines=25) @@
|
| 117 |
|
* @param mixed $old_state State returned by previous call of this method |
| 118 |
|
* @return mixed Returns false after last step, otherwise temporary state |
| 119 |
|
*/ |
| 120 |
|
public function purge_step($old_state) |
| 121 |
|
{ |
| 122 |
|
switch ($old_state) |
| 123 |
|
{ |
| 124 |
|
case '': // Empty means nothing has run yet |
| 125 |
|
|
| 126 |
|
// Purge notifications |
| 127 |
|
return $this->notification_handler('purge', array( |
| 128 |
|
'ernadoo.phpbbdirectory.notification.type.directory_website', |
| 129 |
|
'ernadoo.phpbbdirectory.notification.type.directory_website_approved', |
| 130 |
|
'ernadoo.phpbbdirectory.notification.type.directory_website_disapproved', |
| 131 |
|
'ernadoo.phpbbdirectory.notification.type.directory_website_error_cron', |
| 132 |
|
'ernadoo.phpbbdirectory.notification.type.directory_website_in_queue', |
| 133 |
|
)); |
| 134 |
|
|
| 135 |
|
break; |
| 136 |
|
|
| 137 |
|
default: |
| 138 |
|
|
| 139 |
|
// Run parent purge step method |
| 140 |
|
return parent::purge_step($old_state); |
| 141 |
|
|
| 142 |
|
break; |
| 143 |
|
} |
| 144 |
|
} |
| 145 |
|
|
| 146 |
|
/** |
| 147 |
|
* Notification handler to call notification enable/disable/purge steps |