Permalink
Browse files

some more meat to installer

  • Loading branch information...
1 parent 05e1524 commit 919f3a4a74b9d7c25ec842ca8e867f60bee1d080 slam committed May 25, 2010
Showing with 35 additions and 1 deletion.
  1. +35 −1 zafenio/pninit.php
View
@@ -1,8 +1,42 @@
<?php
-function pnphpbb3_init() {
+function zafenio_init() {
/* TODO */
+ $dom = ZLanguage::getModuleDomain('zafenio');
return LogUtil::registerStatus('Stub only');
}
+function zafenio_upgrade()
+{
+ /* TODO */
+ $dom = ZLanguage::getModuleDomain('zafenio');
+ return LogUtil::registerStatus('Stub only');
+}
+
+function zafenio_delete()
+{
+ $dom = ZLanguage::getModuleDomain('zafenio');
+ /* Delete the module tables - example, still TODO */
+ if (!DBUtil::dropTable('zafenio_pages')) {
+ return LogUtil::registerError(__('Error! Table deletion failed.', $dom).' (zafenio_pages)');
+ }
+
+ if (!DBUtil::dropTable('zafenio_links')) {
+ return LogUtil::registerError(__('Error! Table deletion failed.', $dom).' (zafenio_links)');
+ }
+
+ if (!DBUtil::dropTable('zafenio_referrers')) {
+ return LogUtil::registerError(__('Error! Table deletion failed.', $dom).' (zafenio_referrers)');
+ }
+
+ /* Delete the module vars */
+ pnModDelVar('zafenio');
+
+ /* Delete the Admin module register */
+ pnModDBInfoLoad('Admin');
+ DBUtil::deleteObjectByID('admin_module', (int)pnModGetIdFromName('zafenio'), 'mid');
+
+ return true;
+}
+
?>

0 comments on commit 919f3a4

Please sign in to comment.