aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration/data/v310/profilefield_icq.php
blob: 2c8c8c511f66d8d830e1a9e67597d2826404ba3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
*
* @package migration
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

namespace phpbb\db\migration\data\v310;

class profilefield_icq extends \phpbb\db\migration\profilefield_base_migration
{
	static public function depends_on()
	{
		return array(
			'\phpbb\db\migration\data\v310\profilefield_contact_field',
		);
	}

	protected $profilefield_name = 'phpbb_icq';

	protected $profilefield_database_type = array('VCHAR', '');

	protected $profilefield_data = array(
		'field_name'			=> 'phpbb_icq',
		'field_type'			=> 'profilefields.type.string',
		'field_ident'			=> 'phpbb_icq',
		'field_length'			=> '20',
		'field_minlen'			=> '3',
		'field_maxlen'			=> '15',
		'field_novalue'			=> '',
		'field_default_value'	=> '',
		'field_validation'		=> '[0-9]+',
		'field_required'		=> 0,
		'field_show_novalue'	=> 0,
		'field_show_on_reg'		=> 0,
		'field_show_on_pm'		=> 1,
		'field_show_on_vt'		=> 1,
		'field_show_profile'	=> 1,
		'field_hide'			=> 0,
		'field_no_view'			=> 0,
		'field_active'			=> 1,
		'field_is_contact'		=> 1,
		'field_contact_desc'	=> 'SEND_ICQ_MESSAGE',
		'field_contact_url'		=> 'https://www.icq.com/people/%s/',
	);

	protected $user_column_name = 'user_icq';
}
4 255 256 257 258 259 260 261 262 263 264 265 266 267
# 
# 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 Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 2000 Netscape Communications Corporation.  All
# Rights Reserved.
# 
# Contributor(s): Dan Mosedale <dmose@mozilla.org>
#                 Terry Weissman <terry@mozilla.org>
#                 Dave Miller <justdave@syndicomm.com>

# This object models a set of relations between one item and a group
# of other items.  An example is the set of relations between one bug
# and the users CCed on that bug.  Currently, the relation objects are
# expected to be bugzilla userids.  However, this could and perhaps
# should be generalized to work with non userid objects, such as
# keywords associated with a bug.  That shouldn't be hard to do; it
# might involve turning this into a virtual base class, and having
# UserSet and KeywordSet types that inherit from it.

use strict;

# XXX - mod_perl
# Everything that uses Bugzilla::RelationSet should already have globals.pl
# loaded so we don't want to load it here.  Doing so causes a loop in Perl
# because globals.pl turns around and does a 'use Bugzilla::RelationSet'
# See http://bugzilla.mozilla.org/show_bug.cgi?id=72862
#require "../globals.pl";

package Bugzilla::RelationSet;

# create a new empty Bugzilla::RelationSet
#
sub new {
  my $type = shift();

  # create a ref to an empty hash and bless it
  #
  my $self = {};
  bless $self, $type;

  # construct from a comma-delimited string
  # 
  if ($#_ == 0) {
    $self->mergeFromString($_[0]);
  }
  # unless this was a constructor for an empty list, somebody screwed up.
  #
  elsif ( $#_ != -1 ) {
    confess("invalid number of arguments");
  }

  # bless as a Bugzilla::RelationSet
  #