aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration/tool/tool_interface.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-08-07 12:21:46 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-08-07 17:28:21 +0200
commit4f23bb711ca457efba370d7ac67394e0db59b578 (patch)
tree5b1ba64693ad0b2059d0ebd989a14605586500c7 /phpBB/phpbb/db/migration/tool/tool_interface.php
parent9b36b5283cc29f59428206726f666554b0e0a358 (diff)
downloadforums-4f23bb711ca457efba370d7ac67394e0db59b578.tar
forums-4f23bb711ca457efba370d7ac67394e0db59b578.tar.gz
forums-4f23bb711ca457efba370d7ac67394e0db59b578.tar.bz2
forums-4f23bb711ca457efba370d7ac67394e0db59b578.tar.xz
forums-4f23bb711ca457efba370d7ac67394e0db59b578.zip
[ticket/12822] Remove "None" option from avatar select boxes
This option is just used for deleting avatars for which we already have a checkbox. PHPBB3-12822
Diffstat (limited to 'phpBB/phpbb/db/migration/tool/tool_interface.php')
0 files changed, 0 insertions, 0 deletions
55' href='#n155'>155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
#!/usr/bin/perl -wT
# -*- Mode: perl; indent-tabs-mode: nil; cperl-indent-level: 4 -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Albert Ting
#
# Contributor(s): Albert Ting <alt@sonic.net>
#                 Max Kanat-Alexander <mkanat@bugzilla.org>
#
# Direct any questions on this source code to mozilla.org

use strict;
use lib ".";

use Bugzilla;
use Bugzilla::Constants;
use Bugzilla::Util;
use Bugzilla::Error;
use Bugzilla::Classification;
use Bugzilla::Token;

my $dbh = Bugzilla->dbh;
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
local our $vars = {};

sub LoadTemplate {
    my $action = shift;
    my $cgi = Bugzilla->cgi;
    my $template = Bugzilla->template;

    $action =~ /(\w+)/;
    $action = $1;
    print $cgi->header();
    $template->process("admin/classifications/$action.html.tmpl", $vars)
      || ThrowTemplateError($template->error());
    exit;
}

#
# Preliminary checks:
#

Bugzilla->login(LOGIN_REQUIRED);

print $cgi->header();

exists Bugzilla->user->groups->{'editclassifications'}
  || ThrowUserError("auth_failure", {group  => "editclassifications",
                                     action => "edit",
                                     object => "classifications"});

ThrowUserError("auth_classification_not_enabled") 
    unless Bugzilla->params->{"useclassification"};

#
# often used variables
#
my $action     = trim($cgi->param('action')         || '');
my $class_name = trim($cgi->param('classification') || '');
my $token      = $cgi->param('token');

#
# action='' -> Show nice list of classifications
#

unless ($action) {
    my @classifications =
        Bugzilla::Classification::get_all_classifications();

    $vars->{'classifications'} = \@classifications;
    LoadTemplate("select");
}

#
# action='add' -> present form for parameters for new classification
#
# (next action will be 'new')
#

if ($action eq 'add') {