コード例 #1
0
ファイル: umil_manual_example.php プロジェクト: phpbb/umil
 // Update to 0.3.1
 case '0.3.0':
     // Now to add some permission settings.  Showing both the one at a time and "multicall" options
     $umil->permission_add('a_test_mod', true);
     $umil->permission_add(array(array('f_test_mod', false), array('u_test_mod', true)));
     // How about we give some default permissions then as well?
     $umil->permission_set(array(array('ROLE_ADMIN_FULL', 'a_test_mod'), array('ROLE_USER_FULL', 'u_test_mod'), array('GUESTS', 'u_test_mod', 'group'), array('ROLE_FORUM_STANDARD', 'f_test_mod')));
     // No breaks
     // Update to 0.7.0
 // No breaks
 // Update to 0.7.0
 case '0.3.1':
     // Lets change our test_enable to false
     $umil->config_update('test_enable', false);
     // Lets remove some of those permission settings we added before
     $umil->permission_remove(array(array('f_test_mod', false), array('u_test_mod', true)));
     // Now to add a table (this uses the layout from develop/create_schema_files.php and from phpbb_db_tools)
     $umil->table_add('phpbb_test', array('COLUMNS' => array('test_id' => array('UINT', NULL, 'auto_increment'), 'test_text' => array('VCHAR_UNI', ''), 'test_bool' => array('BOOL', 0)), 'PRIMARY_KEY' => 'test_id', 'KEYS' => array('test_bool' => array('INDEX', 'test_bool'))));
     // Update to 0.9.0
 // Update to 0.9.0
 case '0.7.0':
     // Lets add a new column to the phpbb_test table named test_time
     $umil->table_column_add('phpbb_test', 'test_time', array('TIMESTAMP', 0));
     // Lets make the test_time column we just added an index
     $umil->table_index_add('phpbb_test', 'test_time', 'test_time');
     // Alright, now lets add some modules to the ACP
     $umil->module_add(array(array('acp', 'ACP_CAT_DOT_MODS', 'ACP_CAT_TEST_MOD'), array('acp', 'ACP_CAT_TEST_MOD', array('module_basename' => 'board', 'modes' => array('settings', 'features'))), array('acp', 'ACP_CAT_TEST_MOD', array('module_basename' => 'board', 'module_langname' => 'ACP_AVATAR_SETTINGS', 'module_mode' => 'avatar', 'module_auth' => 'acl_a_board'))));
     // Update to 0.9.1
 // Update to 0.9.1
 case '0.9.0':
     // This is done in the custom function from umil_auto_example
コード例 #2
0
ファイル: style.php プロジェクト: kairion/customisation-db
 /**
  * Uninstall the type
  */
 public function uninstall()
 {
     if (isset(phpbb::$config['titania_num_mods'])) {
         if (!class_exists('umil')) {
             include PHPBB_ROOT_PATH . 'umil/umil.' . PHP_EXT;
         }
         $umil = new umil(true, phpbb::$db);
         // Permissions
         $umil->permission_remove(array('u_titania_mod_style_queue_discussion', 'u_titania_mod_style_queue', 'u_titania_mod_style_validate', 'u_titania_mod_style_moderate'));
         // Mod count holder
         $umil->config_remove('titania_num_styles');
     }
 }
コード例 #3
0
 /**
  * Uninstall the type
  */
 public function uninstall()
 {
     if (isset(phpbb::$config['titania_num_official_tools'])) {
         if (!class_exists('umil')) {
             include PHPBB_ROOT_PATH . 'umil/umil.' . PHP_EXT;
         }
         $umil = new umil(true, phpbb::$db);
         // Permissions
         $umil->permission_remove(array('u_titania_mod_official_tool_moderate'));
         // Offical Tool count holder
         $umil->config_remove('titania_num_official_tools');
     }
 }