~cjsmo/ampache/ampache

« back to all changes in this revision

Viewing changes to admin/modules.php

  • Committer: Afterster
  • Date: 2015-11-07 07:09:23 UTC
  • mfrom: (3952.1.1)
  • Revision ID: git-v1:88b4662919026b030698448b7cdf6c8dc0cb9897
Merge branch 'Psy-Virus-develop' into develop

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
        show_confirmation($title ,$body, $url);
56
56
    break;
57
57
    case 'install_catalog_type':
58
 
        $type = (string) scrub_in($_REQUEST['type']);
 
58
        $type    = (string) scrub_in($_REQUEST['type']);
59
59
        $catalog = Catalog::create_catalog_type($type);
60
60
        if ($catalog == null) {
61
61
            Error::add('general', T_('Install Failed, Catalog Error'));
72
72
        show_confirmation($title ,$body, $url);
73
73
    break;
74
74
    case 'confirm_uninstall_localplay':
75
 
        $type = (string) scrub_in($_REQUEST['type']);
76
 
        $url = AmpConfig::get('web_path') . '/admin/modules.php?action=uninstall_localplay&type=' . $type;
 
75
        $type  = (string) scrub_in($_REQUEST['type']);
 
76
        $url   = AmpConfig::get('web_path') . '/admin/modules.php?action=uninstall_localplay&type=' . $type;
77
77
        $title = T_('Are you sure you want to remove this plugin?');
78
 
        $body = '';
 
78
        $body  = '';
79
79
        show_confirmation($title,$body,$url,1);
80
80
    break;
81
81
    case 'confirm_uninstall_catalog_type':
82
 
        $type = (string) scrub_in($_REQUEST['type']);
83
 
        $url = AmpConfig::get('web_path') . '/admin/modules.php?action=uninstall_catalog_type&type=' . $type;
 
82
        $type  = (string) scrub_in($_REQUEST['type']);
 
83
        $url   = AmpConfig::get('web_path') . '/admin/modules.php?action=uninstall_catalog_type&type=' . $type;
84
84
        $title = T_('Are you sure you want to remove this plugin?');
85
 
        $body = '';
 
85
        $body  = '';
86
86
        show_confirmation($title,$body,$url,1);
87
87
    break;
88
88
    case 'uninstall_localplay':
125
125
        if (!$plugin->install()) {
126
126
            debug_event('plugins','Error: Plugin Install Failed, ' . $_REQUEST['plugin'],'1');
127
127
            $url    = AmpConfig::get('web_path') . '/admin/modules.php?action=show_plugins';
128
 
            $title = T_('Unable to Install Plugin');
129
 
            $body = '';
 
128
            $title  = T_('Unable to Install Plugin');
 
129
            $body   = '';
130
130
            show_confirmation($title,$body,$url);
131
131
            break;
132
132
        }
135
135
        User::rebuild_all_preferences();
136
136
 
137
137
        /* Show Confirmation */
138
 
        $url    = AmpConfig::get('web_path') . '/admin/modules.php?action=show_plugins';
 
138
        $url      = AmpConfig::get('web_path') . '/admin/modules.php?action=show_plugins';
139
139
        $title    = T_('Plugin Activated');
140
 
        $body    = '';
 
140
        $body     = '';
141
141
        show_confirmation($title,$body,$url);
142
142
    break;
143
143
    case 'confirm_uninstall_plugin':
144
 
        $plugin = scrub_in($_REQUEST['plugin']);
145
 
        $url    = AmpConfig::get('web_path') . '/admin/modules.php?action=uninstall_plugin&plugin=' . $plugin;
 
144
        $plugin   = scrub_in($_REQUEST['plugin']);
 
145
        $url      = AmpConfig::get('web_path') . '/admin/modules.php?action=uninstall_plugin&plugin=' . $plugin;
146
146
        $title    = T_('Are you sure you want to remove this plugin?');
147
 
        $body    = '';
 
147
        $body     = '';
148
148
        show_confirmation($title,$body,$url,1);
149
149
    break;
150
150
    case 'uninstall_plugin':