Removing old tests and translations directories
This commit is contained in:
parent
433e7eec80
commit
dfa2e142a7
53 changed files with 0 additions and 20508 deletions
|
@ -1,156 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Administration menu functionality tests.
|
||||
*
|
||||
* Note: When using $this->assertPattern(), be sure to use the 's' modifier for
|
||||
* the PCRE pattern, since admin menu's output spans over multiple lines.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Test menu links depending on user permissions.
|
||||
*/
|
||||
class AdminMenuPermissionsTestCase extends DrupalWebTestCase {
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => t('Menu link permissions'),
|
||||
'description' => t('Verify that menu is displayed according to user permissions.'),
|
||||
'group' => t('Administration menu'),
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp('admin_menu');
|
||||
admin_menu_exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that the links are added to the page (no JS testing).
|
||||
*/
|
||||
function testPermissions() {
|
||||
// Anonymous users should not see the menu.
|
||||
$this->assertNoRaw('<div id="admin-menu"', t('Admin menu not displayed to anonymous.'));
|
||||
|
||||
// Create a new user who can access administration menu, but without the
|
||||
// permission 'display drupal links'.
|
||||
$admin_user = $this->drupalCreateUser(array('administer site configuration', 'access administration pages', 'administer nodes', 'access administration menu'));
|
||||
$this->drupalLogin($admin_user);
|
||||
|
||||
// Check that the user can see the admin links, but not the drupal links.
|
||||
$this->assertRaw('<div id="admin-menu"', t('Administration menu is displayed.'));
|
||||
$this->drupalGet('node');
|
||||
$this->assertPattern('@<div id="admin-menu".*admin/content/node@s', t('Administer content link found.'));
|
||||
$this->assertNoPattern('@<div id="admin-menu".*http://drupal.org@s', t('Drupal links not found.'));
|
||||
$this->assertNoPattern('@<div id="admin-menu".*admin/build/contact@s', t('Contact module link not found.'));
|
||||
|
||||
// Create a new user with the permission 'display drupal links'.
|
||||
$admin_user2 = $this->drupalCreateUser(array('administer site configuration', 'access administration pages', 'administer nodes', 'access administration menu', 'display drupal links'));
|
||||
$this->drupalLogin($admin_user2);
|
||||
$this->drupalGet('node');
|
||||
$this->assertPattern('@<div id="admin-menu".*http://drupal.org@s', t('Drupal links found.'));
|
||||
$this->assertNoPattern('@<div id="admin-menu".*admin/build/contact@s', t('Contact module link not found.'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test menu links depending on installed modules.
|
||||
*/
|
||||
class AdminMenuModulesTestCase extends DrupalWebTestCase {
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => t('Module menu links'),
|
||||
'description' => t('Verify that menu contains links according to enabled modules.'),
|
||||
'group' => t('Administration menu'),
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp('admin_menu', 'contact');
|
||||
admin_menu_exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that the links are added to the page (no JS testing).
|
||||
*/
|
||||
function testContactModuleLinks() {
|
||||
// Create a new user without 'administer site-wide contact form' permission.
|
||||
$admin_user = $this->drupalCreateUser(array('access administration pages', 'access administration menu'));
|
||||
$this->drupalLogin($admin_user);
|
||||
|
||||
// Verify that proper links are displayed.
|
||||
$this->assertRaw('<div id="admin-menu"', t('Administration menu is displayed.'));
|
||||
$this->drupalGet('node');
|
||||
$this->assertNoPattern('@<div id="admin-menu".*admin/build/contact@s', t('Contact module link not found.'));
|
||||
|
||||
// Create a new user with 'administer site-wide contact form' permission.
|
||||
$admin_user = $this->drupalCreateUser(array('access administration pages', 'access administration menu', 'administer site-wide contact form'));
|
||||
$this->drupalLogin($admin_user);
|
||||
|
||||
// Verify that proper links are displayed.
|
||||
$this->drupalGet('node');
|
||||
$this->assertPattern('@<div id="admin-menu".*admin/build/contact@s', t('Contact module link found.'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test contained links in administration menu.
|
||||
*/
|
||||
class AdminMenuLinksTestCase extends DrupalWebTestCase {
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => t('Menu links'),
|
||||
'description' => t('Verify that menu contains proper links.'),
|
||||
'group' => t('Administration menu'),
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp('admin_menu');
|
||||
admin_menu_exit();
|
||||
// Create and log in a full-blown administrative user.
|
||||
$permissions = module_invoke_all('perm');
|
||||
$admin_user = $this->drupalCreateUser($permissions);
|
||||
$this->admin_user = $this->drupalLogin($admin_user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test link contents.
|
||||
*/
|
||||
function testLinkContents() {
|
||||
// Create a content-type with special characters.
|
||||
$info = array(
|
||||
'type' => 'special',
|
||||
'name' => 'Cool & Special',
|
||||
'module' => 'node',
|
||||
'description' => '',
|
||||
);
|
||||
$info = (object)_node_type_set_defaults($info);
|
||||
node_type_save($info);
|
||||
$this->drupalPost('admin/settings/performance', array(), t('Clear cached data'));
|
||||
|
||||
// Fetch a page.
|
||||
$this->drupalGet('node');
|
||||
$this->assertRaw('<div id="admin-menu"', t('Administration menu is displayed.'));
|
||||
|
||||
// Verify that proper links are displayed.
|
||||
// We are explicitly NOT using t() here, since the purpose is to test our
|
||||
// custom link titles and 't' option.
|
||||
$links = array(
|
||||
url('admin/content/node-type/page') => strtr('Edit !content-type', array('!content-type' => t('Page'))),
|
||||
url('admin/content/node-type/special') => strtr('Edit !content-type', array('!content-type' => t('Cool & Special'))),
|
||||
);
|
||||
foreach ($links as $url => $title) {
|
||||
$this->assertFieldByXPath('//div[@id="admin-menu"]//a[@href="' . $url . '"]', $title, t('!link-title content-type link found.', array('!link-title' => $title)));
|
||||
}
|
||||
$links = array(
|
||||
url('node/add/page') => t('Page'),
|
||||
url('node/add/special') => t('Cool & Special'),
|
||||
);
|
||||
foreach ($links as $url => $title) {
|
||||
$this->assertFieldByXPath('//div[@id="admin-menu"]//a[@href="' . $url . '"]', $title, t('Create content » !link-title link found.', array('!link-title' => $title)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
<?php
|
||||
// $Id: better_formats_anonymous_user.test,v 1.1.2.1 2009/07/25 16:23:44 dragonwize Exp $
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Tests for the Better Formats module.
|
||||
*
|
||||
*/
|
||||
|
||||
class BetterFormatsTestCase extends DrupalWebTestCase {
|
||||
/**
|
||||
* Implementation of getInfo().
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => t('Better formats tests'),
|
||||
'description' => t('Test some of the BetterFormats features.'),
|
||||
'group' => t('Better Formats'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of setUp().
|
||||
*/
|
||||
function setUp() {
|
||||
parent::setUp('better_formats');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test various behaviors for anonymous users.
|
||||
*/
|
||||
function testBetterFormatsFunctionalTest() {
|
||||
// Create a user with permission to view the actions administration pages.
|
||||
$admin = $this->drupalCreateUser(array('administer permissions', 'administer filters'));
|
||||
$this->drupalLogin($admin);
|
||||
|
||||
// Hide the format tips link.
|
||||
$this->setPermission('anonymous user', array('show more format tips link' => FALSE, 'access comments' => TRUE, 'access content' => TRUE, 'post comments' => TRUE, 'post comments without approval' => TRUE));
|
||||
$this->node = $this->drupalCreateNode(array('type' => 'story', 'promote' => 1, 'comment' => 2));
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet('comment/reply/' . $this->node->nid);
|
||||
$this->assertNoText('More information about formatting options.', 'Show more format tips link removed.');
|
||||
|
||||
// Default for comments, hiding format selection on comments.
|
||||
$this->drupalLogin($admin);
|
||||
// Let anon use full html - it's crazy, but it's just simpletest
|
||||
$edit = array();
|
||||
$edit['roles[1]'] = TRUE;
|
||||
$this->drupalPost('admin/settings/filters/2', $edit, t('Save configuration'));
|
||||
|
||||
// Set full html as default for anon on comments - again, crazy, but...
|
||||
$edit = array();
|
||||
$edit['comment-1[format]'] = 2;
|
||||
$this->drupalPost('admin/settings/filters/defaults', $edit, t('Save defaults'));
|
||||
|
||||
$this->setPermission('anonymous user', array('show format selection for comments' => FALSE, 'create page content' => TRUE));
|
||||
$this->drupalLogout();
|
||||
|
||||
// Now, do we see the signature for Full HTML on the comment page?
|
||||
$this->drupalGet('comment/reply/' . $this->node->nid);
|
||||
$this->assertNoText('Allowed HTML tags:', 'Filter tips removed on comments.');
|
||||
$this->assertText('Web page addresses and e-mail addresses turn into links automatically.', 'Filter tips removed on comments.');
|
||||
|
||||
// And do we see the Filtered HTML on a node page?
|
||||
$this->drupalGet('node/add/page');
|
||||
$this->assertText('Allowed HTML tags:', 'Filter tips still on a page.');
|
||||
|
||||
// Collapsible format selection collapsed by default.
|
||||
$this->drupalLogin($admin);
|
||||
$this->setPermission('anonymous user', array('show format selection for comments' => TRUE));
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet('comment/reply/' . $this->node->nid);
|
||||
$this->assertText('Filtered HTML', 'Allow format selection on comments.');
|
||||
$this->assertRaw('<fieldset class=" collapsible collapsed"><legend>Input format</legend>', 'Collapsible format selection fieldset found.');
|
||||
$this->assertRaw('<input type="radio" id="edit-format-2-1" name="format" value="2" checked="checked" class="form-radio" /> Full HTML', 'Default for comments to Full HTML.');
|
||||
|
||||
// Not collapsed by default.
|
||||
$this->drupalLogin($admin);
|
||||
$this->setPermission('anonymous user', array('collapse format fieldset by default' => FALSE));
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet('comment/reply/' . $this->node->nid);
|
||||
$this->assertRaw('<fieldset class=" collapsible"><legend>Input format</legend>', 'Collapsible format selection fieldset found.');
|
||||
|
||||
// Not even collapsible.
|
||||
$this->drupalLogin($admin);
|
||||
$this->setPermission('anonymous user', array('collapsible format selection' => FALSE));
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet('comment/reply/' . $this->node->nid);
|
||||
$this->assertRaw('<fieldset><legend>Input format</legend>', 'Collapsible format selection fieldset found.');
|
||||
|
||||
// Check to see that the show format selection on nodes works.
|
||||
$this->drupalLogin($admin);
|
||||
$this->setPermission('anonymous user', array('show format selection for nodes' => FALSE));
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet('node/add/page');
|
||||
$this->assertNoRaw('<input type="radio" id="edit-format-1-1" name="format" value="1" checked="checked" class="form-radio" /> Filtered HTML</label>', 'No radios on a page.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Set permission.
|
||||
*
|
||||
* @param string $role User role to set permissions for.
|
||||
* @param array $permissions Key-value array of permissions to set.
|
||||
*/
|
||||
function setPermission($role, $permissions) {
|
||||
// Get role id (rid) for specified role.
|
||||
$rid = db_result(db_query("SELECT rid FROM {role} WHERE name = '%s'", array('%s' => $role)));
|
||||
if ($rid === FALSE) {
|
||||
$this->fail(t(' [permission] Role "' . $role . '" not found.'));
|
||||
}
|
||||
|
||||
// Create edit array from permission.
|
||||
$edit = array();
|
||||
foreach ($permissions as $name => $value) {
|
||||
$edit[$rid . '[' . $name . ']'] = $value;
|
||||
}
|
||||
|
||||
$this->drupalPost('admin/user/permissions', $edit, t('Save permissions'));
|
||||
$this->assertText(t('The changes have been saved.'), t(' [permission] Saved changes.'));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,177 +0,0 @@
|
|||
# $Id: uk.po,v 1.1.2.2 2009/05/18 21:52:00 podarok Exp $
|
||||
#
|
||||
# Ukrainian translation of Drupal (general)
|
||||
# Copyright YEAR NAME <EMAIL@ADDRESS>
|
||||
# Generated from files:
|
||||
# better-formats-defaults-admin-form.tpl.php,v 1.3.2.2 2009/03/17 08:16:52 dragonwize
|
||||
# better_formats_defaults.admin.inc,v 1.3.2.5 2009/03/17 08:16:52 dragonwize
|
||||
# better_formats_settings.admin.inc,v 1.6.2.3 2009/02/25 06:44:17 dragonwize
|
||||
# better_formats.module,v 1.23.2.9 2009/03/18 15:24:30 dragonwize
|
||||
# better_formats.info,v 1.1.2.2 2009/02/25 06:44:17 dragonwize
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: better_formats uk Ukrainian Translation\n"
|
||||
"POT-Creation-Date: 2009-05-19 00:12+0300\n"
|
||||
"PO-Revision-Date: 2009-05-19 00:40+0200\n"
|
||||
"Last-Translator: podarok <podarok@ua.fm>\n"
|
||||
"Language-Team: uk <podarok@ua.fm>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-Language: Ukrainian\n"
|
||||
"X-Poedit-Country: UKRAINE\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#: better-formats-defaults-admin-form.tpl.php:24
|
||||
msgid "Only formats that a role has permission to use are shown."
|
||||
msgstr "Відображаються лише доступні для ролі формати"
|
||||
|
||||
#: better-formats-defaults-admin-form.tpl.php:26
|
||||
msgid "Node Defaults"
|
||||
msgstr "Базове для Нод"
|
||||
|
||||
#: better-formats-defaults-admin-form.tpl.php:30;54
|
||||
msgid "Role"
|
||||
msgstr "Роль"
|
||||
|
||||
#: better-formats-defaults-admin-form.tpl.php:31;55
|
||||
msgid "Default Format"
|
||||
msgstr "Базовий формат"
|
||||
|
||||
#: better-formats-defaults-admin-form.tpl.php:32;56
|
||||
msgid "Weight"
|
||||
msgstr "Вага"
|
||||
|
||||
#: better-formats-defaults-admin-form.tpl.php:50
|
||||
msgid "Comment Defaults"
|
||||
msgstr "Базове для коментарів"
|
||||
|
||||
#: better_formats_defaults.admin.inc:30
|
||||
msgid "Save defaults"
|
||||
msgstr "Зберегти базово"
|
||||
|
||||
#: better_formats_defaults.admin.inc:59
|
||||
msgid "Role does not have access to selected format."
|
||||
msgstr "Роль немає доступу до обраного формату"
|
||||
|
||||
#: better_formats_defaults.admin.inc:84
|
||||
msgid "Defaults have been saved."
|
||||
msgstr "Базові параметри збережено"
|
||||
|
||||
#: better_formats_defaults.admin.inc:171
|
||||
msgid "Site default"
|
||||
msgstr "Базове для сайту"
|
||||
|
||||
#: better_formats_settings.admin.inc:19
|
||||
msgid "Display"
|
||||
msgstr "Відображення"
|
||||
|
||||
#: better_formats_settings.admin.inc:24
|
||||
msgid "Selection title"
|
||||
msgstr "Вибір назви"
|
||||
|
||||
#: better_formats_settings.admin.inc:25
|
||||
msgid "Change the format selection title. Defaults to \"Input format\""
|
||||
msgstr "Змінити заголовок вибору формату. Базово \"Формат вводу\""
|
||||
|
||||
#: better_formats_settings.admin.inc:30
|
||||
msgid "More format tips link text"
|
||||
msgstr "Текст посилання \"Більше форматів\""
|
||||
|
||||
#: better_formats_settings.admin.inc:31
|
||||
msgid "Change the format full tips link text. Defaults to \"More information about formatting options\""
|
||||
msgstr "Змінити текст посилання \"інформація про формати\". Базово \"Більше інформації про можливості форматування\""
|
||||
|
||||
#: better_formats_settings.admin.inc:37
|
||||
msgid "Control"
|
||||
msgstr "Керування"
|
||||
|
||||
#: better_formats_settings.admin.inc:41
|
||||
msgid "Control formats per node type"
|
||||
msgstr "Керування форматами в залежності вид типу матеріалу"
|
||||
|
||||
#: better_formats_settings.admin.inc:42
|
||||
msgid "Control formats allowed and default formats per node type. Global settings will be used until a content type admin page is saved."
|
||||
msgstr "Керування форматами дозволено і базово формати залежать від типу матеріалу. Глобальні параметри будуть використані до моменту збереження адміністратором типу матеріалу."
|
||||
|
||||
#: better_formats.module:18
|
||||
msgid "See the module README.txt file in the better_formats module directory for help."
|
||||
msgstr "Читайте README.txt модуля better_formats для додаткової допомоги"
|
||||
|
||||
#: better_formats.module:22
|
||||
msgid "Set the global default formats per role for NEW nodes and comments. These settings will be applied to all nodes and comments in the site unless overriden by specific content type defaults."
|
||||
msgstr "Встановлення глобально базових форматів в залежності від ролі для нових матеріалів та коментарів. Ці параметрі будуть використані до всіх матеріалів та коментарів до моменту переназначення базово для специфічних типів матеріалів."
|
||||
|
||||
#: better_formats.module:23
|
||||
msgid "Arrange the roles to provide weight that will determine what format is selected when a user has more than one role. Remember, that all logged in users are automatically given the authenticated user role in addition to their other assigned roles. For example, if you have an admin role place it at the top and generally you would want your anonymous user role at the bottom."
|
||||
msgstr "Розміщення ролей для надання ваги, що буде визначати який формат обрано, якщо в користувача є кілька ролей. Пам'ятайте, що всі залоговані користувачі автоматично є \"зареєстрованими ролями\" на додаток до їхніх назначених ролей. Для прикладу, якщо Ви помістите роль адміна на верх списка, то роль анонімного користувача потрібно розташовувати в самому низу."
|
||||
|
||||
#: better_formats.module:153
|
||||
msgid "Input format settings"
|
||||
msgstr "Параметри формату вводу"
|
||||
|
||||
#: better_formats.module:164
|
||||
msgid "Allowed formats"
|
||||
msgstr "Дозволені формати"
|
||||
|
||||
#: better_formats.module:167
|
||||
msgid "Limit the formats users have to choose from even if they have permission to use that format. This will NOT allow a user to use a format they do not have access rights to use. It will only hide additional formats they do have access rights to. If no boxes are checked, all formats that the user has permission to use will be allowed."
|
||||
msgstr "Обмеження форматів, дозволених користувачам, навіть якщо вони мають доступ використання. Це не дозволить користувачу використовувати формат, заборонений правами! Це лише приховає додаткові формати, які дозволено! Якщо не відмічено жодне - всі формати, що дозволені користувачу будуть увімкнені."
|
||||
|
||||
#: better_formats.module:503
|
||||
msgid "Input format"
|
||||
msgstr "Формат вводу"
|
||||
|
||||
#: better_formats.module:561;569
|
||||
msgid "Formatting guidelines"
|
||||
msgstr "Рекомендації щодо форматування"
|
||||
|
||||
#: better_formats.module:603
|
||||
msgid "More information about formatting options"
|
||||
msgstr "Детальніше про опції форматування"
|
||||
|
||||
#: better_formats.module:37
|
||||
msgid "show format selection"
|
||||
msgstr "показувати вібир формату"
|
||||
|
||||
#: better_formats.module:38
|
||||
msgid "show format tips"
|
||||
msgstr "показувати підказки для формату"
|
||||
|
||||
#: better_formats.module:39
|
||||
msgid "show more format tips link"
|
||||
msgstr "показувати посилання \"більше форматів\""
|
||||
|
||||
#: better_formats.module:40
|
||||
msgid "collapse format fieldset by default"
|
||||
msgstr "базово - звернути поле форматів"
|
||||
|
||||
#: better_formats.module:41
|
||||
msgid "collapsible format selection"
|
||||
msgstr "вибір форматів - з можливістю звертання"
|
||||
|
||||
#: better_formats.module:52
|
||||
msgid "Settings"
|
||||
msgstr "Налаштування"
|
||||
|
||||
#: better_formats.module:53;63
|
||||
msgid "Manage input formats"
|
||||
msgstr "Керування форматами вводу"
|
||||
|
||||
#: better_formats.module:62
|
||||
msgid "Defaults"
|
||||
msgstr "Базове"
|
||||
|
||||
#: better_formats.module:0
|
||||
msgid "better_formats"
|
||||
msgstr "better_formats"
|
||||
|
||||
#: better_formats.info:0
|
||||
msgid "Better Formats"
|
||||
msgstr "Вдосконалені Формати"
|
||||
|
||||
#: better_formats.info:0
|
||||
msgid "Enhances the core input format system by managing input format defaults and settings."
|
||||
msgstr "Розширює базову систему форматів можливістю керування вхідними форматами і параметрами"
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
# $Id: calendar_ical.cs.po,v 1.1.2.1 2010/10/22 20:06:37 wojtha Exp $
|
||||
#
|
||||
# Czech translation of Calendar (6.x-2.2)
|
||||
# Copyright (c) 2010 by the Czech translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (6.x-2.2)\n"
|
||||
"POT-Creation-Date: 2010-10-22 20:03+0000\n"
|
||||
"PO-Revision-Date: 2010-10-07 16:49+0000\n"
|
||||
"Language-Team: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((((n%10)==1)&&((n%100)!=11))?(0):(((((n%10)>=2)&&((n%10)<=4))&&(((n%100)<10)||((n%100)>=20)))?(1):2));\n"
|
||||
|
||||
msgid "Title"
|
||||
msgstr "Nadpis"
|
||||
msgid "Submit"
|
||||
msgstr "Uložit"
|
||||
msgid "Description"
|
||||
msgstr "Popis"
|
||||
msgid "Name"
|
||||
msgstr "Jméno"
|
||||
msgid "Url"
|
||||
msgstr "Url"
|
||||
msgid "Location"
|
||||
msgstr "Místo"
|
||||
msgid "Feed type"
|
||||
msgstr "Typ zdroje"
|
||||
msgid "Expire iCal cache"
|
||||
msgstr "Expirace iCal mezipaměti."
|
||||
msgid ""
|
||||
"iCal feeds are cached to improve performance. Set an expiration time "
|
||||
"for cached feeds."
|
||||
msgstr ""
|
||||
"Pro zlepšení výkonu jsou iCal zdroje ukládány do mezipaměti. "
|
||||
"Nastavte čas expirace."
|
||||
msgid "iCal Feeds"
|
||||
msgstr "iCal zdroje (Feeds)"
|
||||
msgid ""
|
||||
"Use this section to set up iCal feeds that should be displayed in this "
|
||||
"calendar. They will be shown along with any internal items that match "
|
||||
"the calendar criteria."
|
||||
msgstr ""
|
||||
"Tato sekce slouží pro nastavení iCal zdrojů, které budou v "
|
||||
"kalendáři zobrazeny. Data načtená ze zdrojů budou součástí "
|
||||
"všech interních položek, které odpovídají kritériím "
|
||||
"kalendáře."
|
||||
msgid "The name of a feed to include in this calendar."
|
||||
msgstr "Název zdroje, který má být zahrnut do kalendáře."
|
||||
msgid ""
|
||||
"The external feed url or internal file path and name. Change "
|
||||
"'webcal://' to 'http://'."
|
||||
msgstr ""
|
||||
"URL externího zdroje nebo interní cesta a jméno souboru. Změňte "
|
||||
"'webcal://' na 'http://'."
|
||||
msgid "Add to calendar"
|
||||
msgstr "Přidat do kalendáře"
|
||||
msgid "Calendar iCal"
|
||||
msgstr "Kalendář iCal"
|
||||
msgid "Attach to"
|
||||
msgstr "Přiložit k"
|
||||
msgid "Stripe color"
|
||||
msgstr "Barva pruhu"
|
||||
msgid ""
|
||||
"The hex color value (like #ffffff) to use for this feed's calendar "
|
||||
"stripe."
|
||||
msgstr ""
|
||||
"Barva v šestnáctkovém zápisu (např. #ffffff), která se má "
|
||||
"použít pro tento pruh."
|
||||
msgid "Adds ical functionality to Calendar views."
|
||||
msgstr "Přidá podporu iCal zdrojů do kalendářových pohledů."
|
||||
msgid "Multiple displays"
|
||||
msgstr "Více zobrazení"
|
||||
msgid "Using the site name"
|
||||
msgstr "Použití jména webu"
|
||||
msgid "Use the site name for the title"
|
||||
msgstr "Jako název použít název webu"
|
||||
msgid "iCal feed"
|
||||
msgstr "iCal zdroj"
|
||||
msgid "Display the view as an iCal feed."
|
||||
msgstr "Zobrazit výstup z pohledu jako iCal zdroj."
|
||||
msgid "Generates an iCal feed from a view."
|
||||
msgstr "Jako výstup z pohledu generovat iCal zdroj."
|
||||
msgid "iCal settings"
|
||||
msgstr "Nastavení pro iCal"
|
||||
msgid "The ical icon will be shown only on the selected displays."
|
||||
msgstr "Ikona ical bude viditelná pouze u vybraných zobrazení."
|
||||
msgid ""
|
||||
"This view will be displayed by visiting this path on your site. It is "
|
||||
"recommended that the path be something like \"path/%/%/ical\", putting "
|
||||
"one % in the path for each argument you have defined in the view."
|
||||
msgstr ""
|
||||
"Na zde definované adrese bude zobrazen konfigurovaný pohled. Je "
|
||||
"vhodné, aby adresa měla tvar \"path/%/%/ical\", kde % reprezentuje "
|
||||
"jednotlivé argumenty."
|
||||
msgid ""
|
||||
"A Calendar period display will not work without a Date argument or a "
|
||||
"Date filter."
|
||||
msgstr ""
|
||||
"Pokud nebude definován argument s datumem nebo datumový filtr, potom "
|
||||
"nebude zobrazení časového intervalu (period display) pracovat."
|
||||
msgid ""
|
||||
"Map the View fields to the values they should represent in the iCal "
|
||||
"feed. Only fields that have been added to the view are available to "
|
||||
"use in this way. You can add additional fields to the view and mark "
|
||||
"them 'Exclude from display' if you only want them in the iCal feed."
|
||||
msgstr ""
|
||||
"Namapujte hodnoty z iCal zdroje na relevantní pole. Mapovat lze pouze "
|
||||
"ta pole, která byla přidána v konfiguraci pohledu (view). Pokud si "
|
||||
"přejete pracovat s poli pouze v rámci mapování s výhodou můžete "
|
||||
"použít volby 'nezobrazovat' ('Exclude from display')."
|
||||
msgid "The @style style requires a Date argument or a Date filter."
|
||||
msgstr "Styl @style vyžaduje argument nebo filtr typu \"datum\"."
|
||||
msgid "The @style style requires a Title field for the iCal export."
|
||||
msgstr "Styl @style vyžaduje pole 'Nadpis' pro iCal export."
|
|
@ -1,70 +0,0 @@
|
|||
# Hungarian translation of Calendar (all releases)
|
||||
# Copyright (c) 2009 by the Hungarian translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (all releases)\n"
|
||||
"POT-Creation-Date: 2009-11-10 16:39+0000\n"
|
||||
"PO-Revision-Date: 2009-11-10 14:07+0000\n"
|
||||
"Language-Team: Hungarian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
|
||||
msgid "Title"
|
||||
msgstr "Cím"
|
||||
msgid "Description"
|
||||
msgstr "Leírás"
|
||||
msgid "Location"
|
||||
msgstr "Hely"
|
||||
msgid "Attach to"
|
||||
msgstr "Csatolás ehhez"
|
||||
msgid "Multiple displays"
|
||||
msgstr "Öszzetett képernyők"
|
||||
msgid "Using the site name"
|
||||
msgstr "Használva a webhely nevét"
|
||||
msgid "Use the site name for the title"
|
||||
msgstr "A webhely nevét használja címnek"
|
||||
msgid "iCal feed"
|
||||
msgstr "iCal hírcsatorna"
|
||||
msgid "Display the view as an iCal feed."
|
||||
msgstr "Nézet megjelenítése iCal hírcsatornaként."
|
||||
msgid "Generates an iCal feed from a view."
|
||||
msgstr "iCal hírcsatorna előállítása nézetből."
|
||||
msgid "iCal settings"
|
||||
msgstr "iCal beállításai"
|
||||
msgid "The ical icon will be shown only on the selected displays."
|
||||
msgstr "Az ical ikon csak a kiválasztott képernyőkön fog megjelenni."
|
||||
msgid ""
|
||||
"This view will be displayed by visiting this path on your site. It is "
|
||||
"recommended that the path be something like \"path/%/%/ical\", putting "
|
||||
"one % in the path for each argument you have defined in the view."
|
||||
msgstr ""
|
||||
"Ez a nézet ezen az útvonalon lesz megtekinthető az oldalon. "
|
||||
"Javasolt az elérési út „path/%/%/ical” szerű megadása, "
|
||||
"egy-egy % jelet elhelyezve az elérési útban minden, a nézetben "
|
||||
"meghatározott argumentumhoz."
|
||||
msgid ""
|
||||
"A Calendar period display will not work without a Date argument or a "
|
||||
"Date filter."
|
||||
msgstr ""
|
||||
"Naptári időszak képernyő nem működik egy Dátum argumentum vagy "
|
||||
"egy Dátum szűrő nélkül."
|
||||
msgid ""
|
||||
"Map the View fields to the values they should represent in the iCal "
|
||||
"feed. Only fields that have been added to the view are available to "
|
||||
"use in this way. You can add additional fields to the view and mark "
|
||||
"them 'Exclude from display' if you only want them in the iCal feed."
|
||||
msgstr ""
|
||||
"Leképezi a View mezőket az iCal hírcsatornában ábrázolandó "
|
||||
"értékekre. Ezen a módon csak a nézethez hozzáadott mezők lesznek "
|
||||
"elérhetőek. További mezőket lehet hozzáadni a nézethez, amiket "
|
||||
"„Megjelenítésből kizárt”-nak kell jelölni, ha azokat csak az "
|
||||
"iCal hírcsatornában kívánjuk megjeleníteni."
|
||||
msgid "The @style style requires a Date argument or a Date filter."
|
||||
msgstr ""
|
||||
"@style stílushoz szükséges egy Dátum argumentum vagy egy Dátum "
|
||||
"szűrő."
|
||||
msgid "The @style style requires a Title field for the iCal export."
|
||||
msgstr "@style stílusnak szüksége van egy Cím mezőre az iCal exporthoz."
|
|
@ -1,169 +0,0 @@
|
|||
# $Id: calendar_ical.pot,v 1.1.2.2 2009/02/17 11:06:21 karens Exp $
|
||||
#
|
||||
# LANGUAGE translation of Drupal (general)
|
||||
# Copyright YEAR NAME <EMAIL@ADDRESS>
|
||||
# Generated from files:
|
||||
# calendar_ical.views.inc,v 1.1.2.6 2009/02/16 23:46:22 karens
|
||||
# calendar_ical_admin.inc,v 1.1.2.2 2008/10/02 20:23:49 karens
|
||||
# calendar_plugin_display_ical.inc,v 1.1.2.5 2008/11/25 16:12:36 karens
|
||||
# calendar_plugin_style_ical.inc,v 1.1.2.13 2009/02/16 11:39:37 karens
|
||||
# calendar_ical.module,v 1.1.2.6 2008/11/24 15:48:15 karens
|
||||
# calendar_ical.info,v 1.1.2.1 2008/09/05 11:03:42 karens
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"POT-Creation-Date: 2009-02-17 05:03-0600\n"
|
||||
"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
|
||||
"Last-Translator: NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
#: calendar_ical.views.inc:30;42;64
|
||||
msgid "iCal feed"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical.views.inc:31
|
||||
msgid "Display the view as an iCal feed."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical.views.inc:65
|
||||
msgid "Generates an iCal feed from a view."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:22
|
||||
msgid "Expire iCal cache"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:24
|
||||
msgid "iCal feeds are cached to improve performance. Set an expiration time for cached feeds."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:30
|
||||
msgid "iCal Feeds"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:31
|
||||
msgid "Use this section to set up iCal feeds that should be displayed in this calendar. They will be shown along with any internal items that match the calendar criteria."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:42
|
||||
msgid "Feed type"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:47
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:50
|
||||
msgid "The name of a feed to include in this calendar."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:53
|
||||
msgid "Url"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:57
|
||||
msgid "The external feed url or internal file path and name. Change 'webcal://' to 'http://'."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:61
|
||||
msgid "Stripe color"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:67
|
||||
msgid "The hex color value (like #ffffff) to use for this feed's calendar stripe."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical_admin.inc:77
|
||||
msgid "Submit"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_display_ical.inc:81
|
||||
msgid "iCal settings"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_display_ical.inc:85
|
||||
msgid "Using the site name"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_display_ical.inc:93
|
||||
msgid "Multiple displays"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_display_ical.inc:103
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_display_ical.inc:108;135
|
||||
msgid "Attach to"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_display_ical.inc:127
|
||||
msgid "Use the site name for the title"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_display_ical.inc:144
|
||||
msgid "The ical icon will be shown only on the selected displays."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_display_ical.inc:150
|
||||
msgid "This view will be displayed by visiting this path on your site. It is recommended that the path be something like \"path/%/%/ical\", putting one % in the path for each argument you have defined in the view."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_display_ical.inc:203
|
||||
msgid "A Calendar period display will not work without a Date argument or a Date filter."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_style_ical.inc:70
|
||||
msgid "Map the View fields to the values they should represent in the iCal feed. Only fields that have been added to the view are available to use in this way. You can add additional fields to the view and mark them 'Exclude from display' if you only want them in the iCal feed."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_style_ical.inc:74
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_style_ical.inc:81
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_style_ical.inc:87
|
||||
msgid "Location"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_style_ical.inc:107
|
||||
msgid "The @style style requires a Date argument or a Date filter."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_style_ical.inc:120
|
||||
msgid "The @style style requires a Title field for the iCal export."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_plugin_style_ical.inc:134
|
||||
msgid "The date field '@field' used by the display '@display_title' cannot be set to 'Group multiple values'."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical.module:29;29
|
||||
msgid "Add to calendar"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical.module:0
|
||||
msgid "calendar_ical"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical.info:0
|
||||
msgid "Calendar iCal"
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical.info:0
|
||||
msgid "Adds ical functionality to Calendar views."
|
||||
msgstr ""
|
||||
|
||||
#: calendar_ical.info:0
|
||||
msgid "Date/Time"
|
||||
msgstr ""
|
||||
|
|
@ -1,235 +0,0 @@
|
|||
# $Id: includes.cs.po,v 1.1.2.1 2010/10/22 20:06:37 wojtha Exp $
|
||||
#
|
||||
# Czech translation of Calendar (6.x-2.2)
|
||||
# Copyright (c) 2010 by the Czech translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (6.x-2.2)\n"
|
||||
"POT-Creation-Date: 2010-10-22 20:03+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 22:09+0000\n"
|
||||
"Language-Team: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((((n%10)==1)&&((n%100)!=11))?(0):(((((n%10)>=2)&&((n%10)<=4))&&(((n%100)<10)||((n%100)>=20)))?(1):2));\n"
|
||||
|
||||
msgid "Edit"
|
||||
msgstr "Upravit"
|
||||
msgid "Maximum items"
|
||||
msgstr "Maximální počet položek"
|
||||
msgid "Custom"
|
||||
msgstr "Vlastní"
|
||||
msgid "Unlimited"
|
||||
msgstr "Neomezené"
|
||||
msgid "Full name"
|
||||
msgstr "Celé jméno"
|
||||
msgid "Hour"
|
||||
msgstr "Hodina"
|
||||
msgid "No link"
|
||||
msgstr "Žádný odkaz"
|
||||
msgid "First letter of name"
|
||||
msgstr "První písmeno jména"
|
||||
msgid "First two letters of name"
|
||||
msgstr "První dvě písmena jména"
|
||||
msgid "Abbreviated name"
|
||||
msgstr "Zkrácené jméno"
|
||||
msgid "Show week numbers"
|
||||
msgstr "Zobrazit čísla týdnů"
|
||||
msgid "3 items"
|
||||
msgstr "3 položky"
|
||||
msgid "5 items"
|
||||
msgstr "5 položek"
|
||||
msgid "10 items"
|
||||
msgstr "10 položek"
|
||||
msgid ""
|
||||
"Maximum number of items to show in calendar cells, used to keep the "
|
||||
"calendar from expanding to a huge size when there are lots of items in "
|
||||
"one day. "
|
||||
msgstr ""
|
||||
"Maximální počet položek zobrazených v buňce kalendáře. "
|
||||
"Slouží k omezení rozměrů kalendáře při větším počtu "
|
||||
"položek v jednom dni. "
|
||||
msgid "Too many items"
|
||||
msgstr "Příliš mnoho položek"
|
||||
msgid "Show maximum, add 'more' link"
|
||||
msgstr "Zobrazit maximální počet, připojit odkaz 'více'"
|
||||
msgid "Hide all, add link to day"
|
||||
msgstr "Skrýt vše, přidat odkaz na den"
|
||||
msgid ""
|
||||
"Behavior when there are more than the above number of items in a "
|
||||
"single day. When there more items than this limit, a link to the day "
|
||||
"view will be displayed."
|
||||
msgstr ""
|
||||
"Pokud je počet denních položek vyšší než definuje limit, potom "
|
||||
"je zobrazen odkaz do pohledu reprezentujícího den."
|
||||
msgid "Calendar page"
|
||||
msgstr "Stránka kalendáře"
|
||||
msgid ""
|
||||
"Calendar page. Attach Calendar period attachments to this page, set to "
|
||||
"show the year, month, day, and week views."
|
||||
msgstr ""
|
||||
"Stránka kalendáře. Přidat ke stránce s obdobím kalendáře, "
|
||||
"určenou k zobrazení ročního, měsíčního, denního nebo "
|
||||
"týdenního pohledu."
|
||||
msgid "Calendar block"
|
||||
msgstr "Blok kalendáře"
|
||||
msgid ""
|
||||
"Calendar page. Attach a Calendar period attachment to this block, set "
|
||||
"to show the year, month, day, or week view."
|
||||
msgstr ""
|
||||
"Stránka kalendáře. Přidat k bloku přílohu s obdobím "
|
||||
"kalendáře, určenou k zobrazení ročního, měsíčního, denního "
|
||||
"nebo týdenního pohledu."
|
||||
msgid ""
|
||||
"An attachment for a Year, Month, Day, or Week calendar display, using "
|
||||
"any style you choose. Attach to a Calendar page and/or a Calendar "
|
||||
"block."
|
||||
msgstr ""
|
||||
"Příloha pro zobrazení kalendáře na rok, měsíc, den nebo týden "
|
||||
"používá styl, který jste vybral. Přiložte ke stránce a/nebo "
|
||||
"bloku kalendáře."
|
||||
msgid "Calendar page year, month, week, or day view"
|
||||
msgstr "Pohled stránky kalendáře pro rok, měsíc, týden nebo den"
|
||||
msgid "Calendar navigation"
|
||||
msgstr "Navigace kalendáře"
|
||||
msgid "Creates back/next navigation and calendar links."
|
||||
msgstr "Vytvoří navigaci \"zpět/další\" a odkazy kalendáře."
|
||||
msgid "Displays Views results in a calendar."
|
||||
msgstr "Zobrazuje výsledek Views v kalendáři."
|
||||
msgid "A Calendar period display will not work without a Date argument."
|
||||
msgstr ""
|
||||
"Zobrazení období v kalendáři nebude fungovat bez argumentu typu "
|
||||
"\"datum\"."
|
||||
msgid "Select the calendar time period for this display."
|
||||
msgstr "Vyberte časové období kalendáře pro toto zobrazení."
|
||||
msgid ""
|
||||
"The Calendar period display '@display_title' will not work without a "
|
||||
"Date argument."
|
||||
msgstr ""
|
||||
"Pohled na období kalendáře '@display_title' nebude fungovat bez "
|
||||
"data, jako argumentu."
|
||||
msgid ""
|
||||
"The Calendar display '@display_title' will not work without a Date "
|
||||
"argument."
|
||||
msgstr ""
|
||||
"Pohled na kalendář '@display_title' nebude fungovat bez data, jako "
|
||||
"argumentu."
|
||||
msgid "Legend Content Types"
|
||||
msgstr "Typy obsahu legendy"
|
||||
msgid "Legend Vocabularies"
|
||||
msgstr "Slovníky legendy"
|
||||
msgid "Legend Terms"
|
||||
msgstr "Termíny legendy"
|
||||
msgid "Date changer"
|
||||
msgstr "Změna datumu"
|
||||
msgid "Add new date link"
|
||||
msgstr "Přidej nový odkaz na datum"
|
||||
msgid "Display a popup calendar date selector?"
|
||||
msgstr "Zobrazit popup kalendář pro výběr data?"
|
||||
msgid ""
|
||||
"Display a link to add a new date of the specified content type. "
|
||||
"Displayed only to users with appropriate permissions."
|
||||
msgstr ""
|
||||
"Zobrazit odkaz pro přidání nového data zadaného typu obsahu. "
|
||||
"Zobrazí se pouze uživatelům s odpovídajícím oprávněním."
|
||||
msgid "Content Type Legend Colors"
|
||||
msgstr "Barevná legenda typů obsahu"
|
||||
msgid ""
|
||||
"<div class=\"form-item\"><label>Content Type</label><p>Set a hex color "
|
||||
"value (like #ffffff) to use in the calendar legend for each content "
|
||||
"type. Types with empty values will have no stripe in the calendar and "
|
||||
"will not be added to the legend.</p></div>"
|
||||
msgstr ""
|
||||
"<div class=\"form-item\"><label>Typ obsahu</label><p>Nastavte "
|
||||
"šestnáctkovou hodnotu barvy (např. #ffffff) pro každý typ obsahu, "
|
||||
"který je v kalendáři použit. Pokud nebude typu přiřazena barva, "
|
||||
"potom nebude tento typ v kalendáři nijak zvýrazněn a ani nebude "
|
||||
"zahrnut do legendy.</p></div>"
|
||||
msgid "Vocabulary Legend Types"
|
||||
msgstr "Typy slovníků v legendě"
|
||||
msgid ""
|
||||
"<div class=\"form-item\"><label>Vocabularies</label>Select "
|
||||
"vocabularies to use for setting calendar legend colors by taxonomy "
|
||||
"term. This works best for vocabularies with only a limited number of "
|
||||
"possible terms.</div>"
|
||||
msgstr ""
|
||||
"<div class=\"form-item\"><label>Slovníky</label>Vyberte slovník "
|
||||
"jehož termíny chcete barevně odlišovat. Je vhodné používat "
|
||||
"slovníky s omezeným počtem termínů.</div>"
|
||||
msgid "Taxonomy Legend Colors"
|
||||
msgstr "Barvy taxonomie v legendě"
|
||||
msgid ""
|
||||
"<div class=\"form-item warning\">Please select Legend vocabularies "
|
||||
"first!</div>"
|
||||
msgstr ""
|
||||
"<div class=\"form-item warning\">Nejdříve prosím zvolte slovníky "
|
||||
"legendy!</div>"
|
||||
msgid ""
|
||||
"<div class=\"form-item\"><label>Taxonomy Terms</label><p>Set a hex "
|
||||
"color value (like #ffffff) to use in the calendar legend for each "
|
||||
"taxonomy term. Terms with empty values will have no stripe in the "
|
||||
"calendar and will not be added to the legend.</p></div>"
|
||||
msgstr ""
|
||||
"<div class=\"form-item\"><label>Termíny taxonomie</label><p>Nastavte "
|
||||
"šestnáctkovou hodnotu barvy (např. #ffffff) pro každý termín, "
|
||||
"který je v kalendáři použít. Pokud nebude termínu přiřazena "
|
||||
"barva, potom nebude tento termín v kalendáři nijak zvýrazněn a "
|
||||
"ani nebude zahrnut do legendy.</p></div>"
|
||||
msgid "The @style style requires a Date argument."
|
||||
msgstr "Styl @style vyžaduje argument typu \"datum\"."
|
||||
msgid ""
|
||||
"The date argument date fields must be added to this query. You can "
|
||||
"exclude them if you do not want them displayed in the calendar."
|
||||
msgstr ""
|
||||
"Pole, které slouží jako argument datumu musí být součástí "
|
||||
"dotazu. Avšak není nutné jej zobrazovat."
|
||||
msgid "Calendar day of week names"
|
||||
msgstr "Názvy dnů v kalendáři"
|
||||
msgid "The way day of week names should be displayed in a calendar."
|
||||
msgstr ""
|
||||
"Způsob jakým mají být v kalendáři zobrazena názvy dní v "
|
||||
"týdnu."
|
||||
msgid ""
|
||||
"Whether or not to show week numbers in the left column of calendar "
|
||||
"weeks and months."
|
||||
msgstr ""
|
||||
"Uvádět čísla týdnů v levém sloupci při zobrazení týdne nebo "
|
||||
"měsíce?"
|
||||
msgid "No items"
|
||||
msgstr "Žádné položky"
|
||||
msgid "Time grouping"
|
||||
msgstr "Seskupení podle času"
|
||||
msgid "Group items together into time periods based on their start time."
|
||||
msgstr ""
|
||||
"Seskup položky do časových období podle jejich počátečního "
|
||||
"času."
|
||||
msgid "Half hour"
|
||||
msgstr "Půl hodiny"
|
||||
msgid "Custom time grouping"
|
||||
msgstr "Vlastní seskupování podle času"
|
||||
msgid ""
|
||||
"When choosing the 'custom' Time grouping option above, create custom "
|
||||
"time period groupings as a comma-separated list of 24-hour times in "
|
||||
"the format HH:MM:SS, like '00:00:00,08:00:00,18:00:00'. Be sure to "
|
||||
"start with '00:00:00'. All items after the last time will go in the "
|
||||
"final group."
|
||||
msgstr ""
|
||||
"Když je výše zvoleno vlastní seskupování dle času, je nutné "
|
||||
"vytvořit vlastní časové intervaly jako čárkami oddělený seznam "
|
||||
"ve 24-hodinovém formátu HH:MM:SS (např. "
|
||||
"'00:00:00,08:00:00,18:00:00'). Ujistěte se, že začínáte časem "
|
||||
"'00:00:00'. Všechny položky po posledním čase budou zařazeny do "
|
||||
"konečné skupiny."
|
||||
msgid "Field grouping"
|
||||
msgstr "Seskupování polí"
|
||||
msgid ""
|
||||
"Optionally group items into columns by a field value, for instance "
|
||||
"select the content type to show items for each content type in their "
|
||||
"own column, or use a location field to organize items into columns by "
|
||||
"location."
|
||||
msgstr ""
|
||||
"Volitelně je možné seskupit položky do sloupců dle hodnoty pole. "
|
||||
"Např. vyberte typ obsahu pro zobrazení počtu položek každého "
|
||||
"typu obsahu ve vlastním sloupci, nebo použijte políčko místa pro "
|
||||
"roztřídění položek do sloupců dle místa."
|
|
@ -1,28 +0,0 @@
|
|||
# $Id: jcalendar.cs.po,v 1.1.2.1 2010/10/22 20:06:37 wojtha Exp $
|
||||
#
|
||||
# Czech translation of Calendar (6.x-2.2)
|
||||
# Copyright (c) 2010 by the Czech translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (6.x-2.2)\n"
|
||||
"POT-Creation-Date: 2010-10-22 20:03+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 20:42+0000\n"
|
||||
"Language-Team: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((((n%10)==1)&&((n%100)!=11))?(0):(((((n%10)>=2)&&((n%10)<=4))&&(((n%100)<10)||((n%100)>=20)))?(1):2));\n"
|
||||
|
||||
msgid "Creates a popup for calendar dates."
|
||||
msgstr "Vytvoří popup okno pro data kalendáře"
|
||||
msgid "Calendar Popup"
|
||||
msgstr "Calendar Popup"
|
||||
msgid ""
|
||||
"Replaces the links to calendar items with a javascript popup that "
|
||||
"gracefully regresses if javascript is not enabled"
|
||||
msgstr ""
|
||||
"Nahradí odkaz na položku kalendáře vyskakovacím oknem. Vyžaduje "
|
||||
"povolený javascript."
|
||||
msgid "Get Calendar Node"
|
||||
msgstr "Získej uzel kalendáře"
|
|
@ -1,27 +0,0 @@
|
|||
# Hungarian translation of Calendar (all releases)
|
||||
# Copyright (c) 2009 by the Hungarian translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (all releases)\n"
|
||||
"POT-Creation-Date: 2009-11-10 16:39+0000\n"
|
||||
"PO-Revision-Date: 2009-10-31 09:55+0000\n"
|
||||
"Language-Team: Hungarian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
|
||||
msgid "Creates a popup for calendar dates."
|
||||
msgstr "Hozzárendel egy felugró ablakot a naptár napjaihoz."
|
||||
msgid "Calendar Popup"
|
||||
msgstr "Calendar Popup"
|
||||
msgid ""
|
||||
"Replaces the links to calendar items with a javascript popup that "
|
||||
"gracefully regresses if javascript is not enabled"
|
||||
msgstr ""
|
||||
"Egy javscript felugró ablakra cseréli a naptár elemek "
|
||||
"hivatkozásait, ami elegánsan eltűnik, ha a javascript nem "
|
||||
"engedélyezett."
|
||||
msgid "Get Calendar Node"
|
||||
msgstr "Naptár tartalom lekérdezése"
|
|
@ -1,49 +0,0 @@
|
|||
# $Id: jcalendar.pot,v 1.1.2.1 2009/02/17 11:06:21 karens Exp $
|
||||
#
|
||||
# LANGUAGE translation of Drupal (general)
|
||||
# Copyright YEAR NAME <EMAIL@ADDRESS>
|
||||
# Generated from files:
|
||||
# jcalendar.module,v 1.1.4.15 2009/01/10 20:14:16 karens
|
||||
# jcalendar.info,v 1.1.4.2 2008/06/23 14:55:01 karens
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"POT-Creation-Date: 2009-02-17 05:04-0600\n"
|
||||
"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
|
||||
"Last-Translator: NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
#: jcalendar.module:18
|
||||
msgid "Creates a popup for calendar dates."
|
||||
msgstr ""
|
||||
|
||||
#: jcalendar.module:90
|
||||
msgid "more"
|
||||
msgstr ""
|
||||
|
||||
#: jcalendar.module:48
|
||||
msgid "Get Calendar Node"
|
||||
msgstr ""
|
||||
|
||||
#: jcalendar.module:0
|
||||
msgid "jcalendar"
|
||||
msgstr ""
|
||||
|
||||
#: jcalendar.info:0
|
||||
msgid "Calendar Popup"
|
||||
msgstr ""
|
||||
|
||||
#: jcalendar.info:0
|
||||
msgid "Replaces the links to calendar items with a javascript popup that gracefully regresses if javascript is not enabled"
|
||||
msgstr ""
|
||||
|
||||
#: jcalendar.info:0
|
||||
msgid "Date/Time"
|
||||
msgstr ""
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# $Id: theme.cs.po,v 1.1.2.1 2010/10/22 20:06:37 wojtha Exp $
|
||||
#
|
||||
# Czech translation of Calendar (6.x-2.2)
|
||||
# Copyright (c) 2010 by the Czech translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (6.x-2.2)\n"
|
||||
"POT-Creation-Date: 2010-10-22 20:03+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 21:22+0000\n"
|
||||
"Language-Team: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((((n%10)==1)&&((n%100)!=11))?(0):(((((n%10)>=2)&&((n%10)<=4))&&(((n%100)<10)||((n%100)>=20)))?(1):2));\n"
|
||||
|
||||
msgid "Item"
|
||||
msgstr "Položka"
|
||||
msgid "Items"
|
||||
msgstr "Položky"
|
||||
msgid "Key"
|
||||
msgstr "Klíč"
|
||||
msgid "Add+"
|
||||
msgstr "Přidat+"
|
||||
msgid "All times"
|
||||
msgstr "Všechny časy"
|
||||
msgid "Before @time"
|
||||
msgstr "Před @time"
|
||||
msgid "Empty day"
|
||||
msgstr "Den bez události"
|
|
@ -1,102 +0,0 @@
|
|||
# $Id$
|
||||
#
|
||||
# LANGUAGE translation of Drupal (general)
|
||||
# Copyright YEAR NAME <EMAIL@ADDRESS>
|
||||
# Generated from files:
|
||||
# calendar.module,v 1.121.2.35 2009/02/14 16:51:50 karens
|
||||
# calendar.info,v 1.8 2008/04/23 23:42:53 karens
|
||||
# calendar.install,v 1.13.2.10 2009/02/15 13:39:01 karens
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"POT-Creation-Date: 2009-02-17 05:01-0600\n"
|
||||
"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
|
||||
"Last-Translator: NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
#: calendar.module:28
|
||||
msgid "<p>View complete documentation at !link.</p>"
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:141
|
||||
msgid "Calendar Legend."
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:147
|
||||
msgid "Calendar Legend"
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:159
|
||||
msgid "Year"
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:159
|
||||
msgid "Month"
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:159
|
||||
msgid "Day"
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:159
|
||||
msgid "Week"
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:339
|
||||
msgid "Change date"
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:423
|
||||
msgid "The Date argument in this view must be set up to provide a default value set to the current date. Edit the argument, find 'Action to take if argument is not present.', choose 'Provide default argument', then select 'Current date'."
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:460
|
||||
msgid " is not a valid hex color"
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:501 calendar.info:0
|
||||
msgid "Calendar"
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:503
|
||||
msgid "View the calendar."
|
||||
msgstr ""
|
||||
|
||||
#: calendar.module:0
|
||||
msgid "calendar"
|
||||
msgstr ""
|
||||
|
||||
#: calendar.install:146;169;185
|
||||
msgid "Calendar module cannot be updated until after Views has been updated. Please return to <a href=\"@update-php\">update.php</a> and run the remaining updates."
|
||||
msgstr ""
|
||||
|
||||
#: calendar.install:147;170;186
|
||||
msgid "calendar.module has updates, but cannot be updated until views.module is updated first."
|
||||
msgstr ""
|
||||
|
||||
#: (duplicate) calendar.install:26 ;35
|
||||
msgid "Calendar requirements"
|
||||
msgstr ""
|
||||
|
||||
#: (duplicate) calendar.install:27
|
||||
msgid "The Calendar module requires a more current version of the Date API. Please check for a newer version."
|
||||
msgstr ""
|
||||
|
||||
#: (duplicate) calendar.install:36
|
||||
msgid "The Calendar module requires the latest version of the Date API, be sure you are installing the latest versions of both modules."
|
||||
msgstr ""
|
||||
|
||||
#: calendar.info:0
|
||||
msgid "Views plugin to display views containing dates as Calendars."
|
||||
msgstr ""
|
||||
|
||||
#: calendar.info:0
|
||||
msgid "Date/Time"
|
||||
msgstr ""
|
||||
|
|
@ -1,578 +0,0 @@
|
|||
# $Id$
|
||||
#
|
||||
# LANGUAGE translation of Drupal (general)
|
||||
# Copyright 2009 NAME <EMAIL@ADDRESS>
|
||||
# Generated from files:
|
||||
# calendar.module,v 1.121.2.38 2009/03/17 18:03:36 karens
|
||||
# calendar.info,v 1.8 2008/04/23 23:42:53 karens
|
||||
# calendar.views.inc,v 1.1.2.9 2009/01/23 21:05:41 karens
|
||||
# calendar.install,v 1.13.2.11 2009/03/17 18:03:36 karens
|
||||
# calendar_ical.info,v 1.1.2.1 2008/09/05 11:03:42 karens
|
||||
# jcalendar.info,v 1.1.4.2 2008/06/23 14:55:01 karens
|
||||
# calendar_ical.views.inc,v 1.1.2.6 2009/02/16 23:46:22 karens
|
||||
# calendar_ical_admin.inc,v 1.1.2.2 2008/10/02 20:23:49 karens
|
||||
# calendar_plugin_display_ical.inc,v 1.1.2.5 2008/11/25 16:12:36 karens
|
||||
# calendar_view_plugin_style.inc,v 1.1.2.19 2009/02/17 18:09:35 karens
|
||||
# calendar_plugin_style_ical.inc,v 1.1.2.17 2009/04/28 22:47:29 karens
|
||||
# calendar_plugin_style.inc,v 1.1.2.15 2009/05/11 23:52:15 karens
|
||||
# calendar_ical.module,v 1.1.2.6 2008/11/24 15:48:15 karens
|
||||
# calendar_plugin_display_attachment.inc,v 1.1.2.17 2009/03/17 18:03:36 karens
|
||||
# calendar_plugin_display_page.inc,v 1.1.2.20 2009/07/24 19:44:09 karens
|
||||
# calendar_plugin_display_block.inc,v 1.1.2.10 2008/12/06 14:56:15 karens
|
||||
# jcalendar.module,v 1.1.4.16 2009/07/28 21:38:07 karens
|
||||
# calendar-month-multiple-node.tpl.php,v 1.1.2.5 2009/02/14 16:51:50 karens
|
||||
# calendar-week-multiple-node.tpl.php,v 1.1.2.4 2008/11/20 12:29:14 karens
|
||||
# calendar-day.tpl.php,v 1.7.2.9 2009/07/28 21:50:50 karens
|
||||
# calendar-week.tpl.php,v 1.5.2.6 2009/02/16 23:46:22 karens
|
||||
# theme.inc,v 1.10.2.72 2009/07/02 14:42:08 karens
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"POT-Creation-Date: 2009-10-19 14:31+0200\n"
|
||||
"PO-Revision-Date: 2009-10-19 18:32+0100\n"
|
||||
"Last-Translator: Thomas Zahreddin <thomas@voicehero.net>\n"
|
||||
"Language-Team: German <tz@it-arts.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Poedit-Language: German\n"
|
||||
"X-Poedit-Country: Germany\n"
|
||||
"X-Poedit-SourceCharset: utf8\n"
|
||||
|
||||
#: calendar.module:28
|
||||
msgid "<p>View complete documentation at !link.</p>"
|
||||
msgstr "<a href=\"!link\"> Komplette Dokumentation</a></p>"
|
||||
|
||||
#: calendar.module:138
|
||||
msgid "Calendar Legend."
|
||||
msgstr "Kalender Legende."
|
||||
|
||||
#: calendar.module:144
|
||||
msgid "Calendar Legend"
|
||||
msgstr "Kalender Legende."
|
||||
|
||||
#: calendar.module:156
|
||||
msgid "Year"
|
||||
msgstr "Jahr"
|
||||
|
||||
#: calendar.module:156
|
||||
msgid "Month"
|
||||
msgstr "Monat"
|
||||
|
||||
#: calendar.module:156
|
||||
msgid "Day"
|
||||
msgstr "Tag"
|
||||
|
||||
#: calendar.module:156
|
||||
msgid "Week"
|
||||
msgstr "Woche"
|
||||
|
||||
#: calendar.module:336
|
||||
msgid "Change date"
|
||||
msgstr "Datum ändern"
|
||||
|
||||
#: calendar.module:394
|
||||
msgid "The Date argument in this view must be set up to provide a default value set to the current date. Edit the argument, find 'Action to take if argument is not present.', choose 'Provide default argument', then select 'Current date'."
|
||||
msgstr "Für das Datum als Argument muss in dieser Ansicht ein Standardwert eingerichtet werden z.B. das aktuelle Datum. Legen Sie fest, wie sich das System verhält, 'Wenn kein Argument vorhanden ist, dann ... \", wird dieses durch das \"Standard-Argument \" ersetzt, z.B. das aktuelles Datum ."
|
||||
|
||||
#: calendar.module:431
|
||||
msgid " is not a valid hex color"
|
||||
msgstr " Keine gültige Farbe (im Hex-Format)"
|
||||
|
||||
#: calendar.module:472
|
||||
#: calendar.info:0
|
||||
#: includes/calendar.views.inc:195
|
||||
msgid "Calendar"
|
||||
msgstr "Kalender"
|
||||
|
||||
#: calendar.module:474
|
||||
msgid "View the calendar."
|
||||
msgstr "Kalender anzeigen"
|
||||
|
||||
#: calendar.install:147;170;186
|
||||
msgid "Calendar module cannot be updated until after Views has been updated. Please return to <a href=\"@update-php\">update.php</a> and run the remaining updates."
|
||||
msgstr "Calendar-Modul kann erst aktualisiert werden, nachdem Views aktualisiert wurde. Bitte auf <a href=\\\"@update-php\\\">update.php</a> die ausstehenden Updates durchfürhren."
|
||||
|
||||
#: calendar.install:148;171;187
|
||||
msgid "calendar.module has updates, but cannot be updated until views.module is updated first."
|
||||
msgstr "Bitte das Views Modul für diese Version des Calendar.module aktualisieren."
|
||||
|
||||
#: (duplicate) calendar.install:26
|
||||
#: ;35
|
||||
msgid "Calendar requirements"
|
||||
msgstr "Anforderungen des Moduls Calendar"
|
||||
|
||||
#: (duplicate) calendar.install:27
|
||||
msgid "The Calendar module requires a more current version of the Date API. Please check for a newer version."
|
||||
msgstr "Das Calendar Modul ist auf eine aktuelle Version des Moduls Date API angewiesen. Bitte prüfen Sie die Version beider Module. Bitte überprüfen Sie für eine neuere Version."
|
||||
|
||||
#: (duplicate) calendar.install:36
|
||||
msgid "The Calendar module requires the latest version of the Date API, be sure you are installing the latest versions of both modules."
|
||||
msgstr "[fuzzy] Das Calendar Modul ist auf eine aktuelle Version des Moduls Date API angewiesen. Bitte prüfen Sie die Version beider Module."
|
||||
|
||||
#: calendar.info:0
|
||||
msgid "Views plugin to display views containing dates as Calendars."
|
||||
msgstr "Plugin für Views zur Anzeige von Kalendern."
|
||||
|
||||
#: calendar.info:0
|
||||
#: calendar_ical/calendar_ical.info:0
|
||||
#: jcalendar/jcalendar.info:0
|
||||
msgid "Date/Time"
|
||||
msgstr "Datum / Zeit"
|
||||
|
||||
#: calendar_ical/calendar_ical.views.inc:30;42;64
|
||||
msgid "iCal feed"
|
||||
msgstr "ical NewsFeed"
|
||||
|
||||
#: calendar_ical/calendar_ical.views.inc:31
|
||||
msgid "Display the view as an iCal feed."
|
||||
msgstr "Die Ansicht als Newsfeed anzeigen, mit ical-Daten."
|
||||
|
||||
#: calendar_ical/calendar_ical.views.inc:65
|
||||
msgid "Generates an iCal feed from a view."
|
||||
msgstr " Generiert einen ical-Newsfeed aus einer Ansicht."
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:22
|
||||
msgid "Expire iCal cache"
|
||||
msgstr "iCal Cache leeren"
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:24
|
||||
msgid "iCal feeds are cached to improve performance. Set an expiration time for cached feeds."
|
||||
msgstr "iCal-Feeds zwischenspeichern, um die Leistung zu verbessern. Legen Sie eine Ablaufzeit für NewsFeeds im Cache fest."
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:30
|
||||
msgid "iCal Feeds"
|
||||
msgstr "RSS-Newsfeeds mit iCal-Dateien"
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:31
|
||||
msgid "Use this section to set up iCal feeds that should be displayed in this calendar. They will be shown along with any internal items that match the calendar criteria."
|
||||
msgstr "Einen iCal-Feed einrichten, dessen Einträge in diesem Kalender angezeigt werden. Sie werden mit den Kalendereinträgen, die den Kriterien entsprechen, zusammen angezeigt."
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:42
|
||||
msgid "Feed type"
|
||||
msgstr "Typ des RSS-Newsfeed"
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:47
|
||||
msgid "Name"
|
||||
msgstr "Name"
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:50
|
||||
msgid "The name of a feed to include in this calendar."
|
||||
msgstr "Der Name eines RSS-Newsfeeds, der in einen Kalender aufgenommen wird."
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:53
|
||||
msgid "Url"
|
||||
msgstr "URL"
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:57
|
||||
msgid "The external feed url or internal file path and name. Change 'webcal://' to 'http://'."
|
||||
msgstr "Die Feed-URL externe oder interne Dateipfade und -namen. Wandele \"webcal://' zu 'http:// '."
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:61
|
||||
msgid "Stripe color"
|
||||
msgstr "Die Farbe der Streifen"
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:67
|
||||
msgid "The hex color value (like #ffffff) to use for this feed's calendar stripe."
|
||||
msgstr "Eine Farbe hexadezimal z.B. #ffffff angegeben, um einen RSS-Newsfeed eines Kalenders mit Streifen zu versehen."
|
||||
|
||||
#: calendar_ical/calendar_ical_admin.inc:77
|
||||
msgid "Submit"
|
||||
msgstr "Speichern"
|
||||
|
||||
#: calendar_ical/calendar_plugin_display_ical.inc:81
|
||||
msgid "iCal settings"
|
||||
msgstr "iCal Einstellungen"
|
||||
|
||||
#: calendar_ical/calendar_plugin_display_ical.inc:85
|
||||
msgid "Using the site name"
|
||||
msgstr "Der Name der Website wird verwendet"
|
||||
|
||||
#: calendar_ical/calendar_plugin_display_ical.inc:93
|
||||
msgid "Multiple displays"
|
||||
msgstr "Mehrere Anzeigen"
|
||||
|
||||
#: calendar_ical/calendar_plugin_display_ical.inc:103
|
||||
#: includes/calendar_view_plugin_style.inc:87
|
||||
msgid "None"
|
||||
msgstr "Keine"
|
||||
|
||||
#: calendar_ical/calendar_plugin_display_ical.inc:108;135
|
||||
msgid "Attach to"
|
||||
msgstr "Anhängen an"
|
||||
|
||||
#: calendar_ical/calendar_plugin_display_ical.inc:127
|
||||
msgid "Use the site name for the title"
|
||||
msgstr "Den Namen der Website für den Titel verwenden."
|
||||
|
||||
#: calendar_ical/calendar_plugin_display_ical.inc:144
|
||||
msgid "The ical icon will be shown only on the selected displays."
|
||||
msgstr "Die iCal Symbol wird nur auf den ausgewählten Displays angezeigt."
|
||||
|
||||
#: calendar_ical/calendar_plugin_display_ical.inc:150
|
||||
msgid "This view will be displayed by visiting this path on your site. It is recommended that the path be something like \"path/%/%/ical\", putting one % in the path for each argument you have defined in the view."
|
||||
msgstr "Diese Ansicht wird dem Benutzer unter diesem Pfad auf Ihrer Website angezeigt werden. Es wird empfohlen, dass die URL so etwas wie \"pfad_zur_Ansicht/%/%/ical\", enthält, jedes % ist eine Variable für das Modul Views."
|
||||
|
||||
#: calendar_ical/calendar_plugin_display_ical.inc:203
|
||||
msgid "A Calendar period display will not work without a Date argument or a Date filter."
|
||||
msgstr "Zur Anzeige eines Zeitraums im Kalender ist ein Datum oder ein Datumsfilter erforderlich."
|
||||
|
||||
#: calendar_ical/calendar_plugin_style_ical.inc:70
|
||||
msgid "Map the View fields to the values they should represent in the iCal feed. Only fields that have been added to the view are available to use in this way. You can add additional fields to the view and mark them 'Exclude from display' if you only want them in the iCal feed."
|
||||
msgstr "Felder aus der Ansicht Feldern im iCal-Feed zuordnen. Nur Felder, die der Ansicht hinzugefügt wurden, lassen sich in dieser Weise nutzen. Sie können zusätzliche Felder zur Ansicht hinzufügen und markieren diese mit \"Ausschließen aus der Anzeige\", wenn die Felder nur im iCal-Feed.erscheinen sollen."
|
||||
|
||||
#: calendar_ical/calendar_plugin_style_ical.inc:74
|
||||
msgid "Title"
|
||||
msgstr "Titel"
|
||||
|
||||
#: calendar_ical/calendar_plugin_style_ical.inc:81
|
||||
msgid "Description"
|
||||
msgstr "Beschreibung"
|
||||
|
||||
#: calendar_ical/calendar_plugin_style_ical.inc:87
|
||||
msgid "Location"
|
||||
msgstr "Standort"
|
||||
|
||||
#: calendar_ical/calendar_plugin_style_ical.inc:107
|
||||
msgid "The @style style requires a Date argument or a Date filter."
|
||||
msgstr "@style erfordert ein Datum als Argument oder einen Datums Filter."
|
||||
|
||||
#: calendar_ical/calendar_plugin_style_ical.inc:120
|
||||
msgid "The @style style requires a Title field for the iCal export."
|
||||
msgstr "@style erfordert ein Feld Titel für iCal."
|
||||
|
||||
#: calendar_ical/calendar_plugin_style_ical.inc:134
|
||||
#: includes/calendar_plugin_style.inc:106
|
||||
msgid "The date field '@field' used by the display '@display_title' cannot be set to 'Group multiple values'."
|
||||
msgstr "Das Feld mit Datum '@field' verwendet zur Anzeige über '@display_title' kann nicht zum gruppieren verwendet werden."
|
||||
|
||||
#: calendar_ical/calendar_ical.module:29;29
|
||||
msgid "Add to calendar"
|
||||
msgstr "Zum Kalender hinzufügen"
|
||||
|
||||
#: calendar_ical/calendar_ical.info:0
|
||||
msgid "Calendar iCal"
|
||||
msgstr "Kalender iCal"
|
||||
|
||||
#: calendar_ical/calendar_ical.info:0
|
||||
msgid "Adds ical functionality to Calendar views."
|
||||
msgstr "iCals zu Kalenderansichten hinzufügen."
|
||||
|
||||
#: includes/calendar.views.inc:114;127
|
||||
msgid "Calendar page"
|
||||
msgstr "Kalenderblatt"
|
||||
|
||||
#: includes/calendar.views.inc:115
|
||||
msgid "Calendar page. Attach Calendar period attachments to this page, set to show the year, month, day, and week views."
|
||||
msgstr "Kalenderblatt Einen Kalender Zeitraum als Anhänge zu dieser Seite hinzufügen, kann auf Jahr, Monat, Tag und Woche gesetzt werden."
|
||||
|
||||
#: includes/calendar.views.inc:136;149
|
||||
msgid "Calendar block"
|
||||
msgstr "Kalender-Block"
|
||||
|
||||
#: includes/calendar.views.inc:137
|
||||
msgid "Calendar page. Attach a Calendar period attachment to this block, set to show the year, month, day, or week view."
|
||||
msgstr "Kalenderblatt Einen Kalender Zeitraum als Anhange zu diesem Block hinzufügen, kann auf Jahr, Monat, Tag und Woche gesetzt werden."
|
||||
|
||||
#: includes/calendar.views.inc:154
|
||||
#: includes/calendar_plugin_display_attachment.inc:185;224
|
||||
msgid "Calendar period"
|
||||
msgstr "Kalender Zeitraum"
|
||||
|
||||
#: includes/calendar.views.inc:155
|
||||
msgid "An attachment for a Year, Month, Day, or Week calendar display, using any style you choose. Attach to a Calendar page and/or a Calendar block."
|
||||
msgstr "Ein Anhang für ein Jahr, Monat, Tag oder Woche im Kalender anzeigen. Eine Kalender-Seite und / oder einen Kalender-Block hinzufügen."
|
||||
|
||||
#: includes/calendar.views.inc:165
|
||||
msgid "Calendar page year, month, week, or day view"
|
||||
msgstr "Kalender für Jahres-, Monats-, Wochen-oder Tagesansicht"
|
||||
|
||||
#: includes/calendar.views.inc:180
|
||||
msgid "Calendar navigation"
|
||||
msgstr "Kalender Navigation"
|
||||
|
||||
#: includes/calendar.views.inc:181
|
||||
msgid "Creates back/next navigation and calendar links."
|
||||
msgstr "Erstellt zurück-, weiter- und Kalender-Links."
|
||||
|
||||
#: includes/calendar.views.inc:196
|
||||
msgid "Displays Views results in a calendar."
|
||||
msgstr "Ansicht als Kalender ausgeben"
|
||||
|
||||
#: includes/calendar_plugin_display_attachment.inc:94
|
||||
msgid "A Calendar period display will not work without a Date argument."
|
||||
msgstr "Zur Anzeige eines Zeitraums ist ein Datum oder ein Datumsfilter erforderlich."
|
||||
|
||||
#: includes/calendar_plugin_display_attachment.inc:188
|
||||
msgid "Select the calendar time period for this display."
|
||||
msgstr "Wählen Sie den Kalender Zeitraum für diese Anzeige."
|
||||
|
||||
#: includes/calendar_plugin_display_attachment.inc:219
|
||||
#: includes/calendar_plugin_display_page.inc:79
|
||||
msgid "Calendar settings"
|
||||
msgstr "Die Einstellungen für Kalender"
|
||||
|
||||
#: includes/calendar_plugin_display_block.inc:26
|
||||
msgid "The Calendar period display '@display_title' will not work without a Date argument."
|
||||
msgstr "Zur Anzeige eines Zeitraums '@display_title' ist ein Datum oder ein Datumsfilter erforderlich."
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:22
|
||||
msgid "The Calendar display '@display_title' will not work without a Date argument."
|
||||
msgstr "Zur Anzeige eines Zeitraums '@display_title' ist ein Datum oder ein Datumsfilter erforderlich."
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:86
|
||||
msgid "Legend Content Types"
|
||||
msgstr "Legende für Inhaltstypen"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:87;92;97
|
||||
msgid "Edit"
|
||||
msgstr "Bearbeiten"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:91
|
||||
msgid "Legend Vocabularies"
|
||||
msgstr "Legende für Vokabularien"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:96
|
||||
msgid "Legend Terms"
|
||||
msgstr "Legende für Begriffe"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:103;125
|
||||
msgid "Date changer"
|
||||
msgstr "[fuzzy] !date – !username"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:109;135
|
||||
msgid "Add new date link"
|
||||
msgstr "Einen Link für Datum hinzufügen"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:116
|
||||
#: includes/calendar_view_plugin_style.inc:65
|
||||
msgid "No"
|
||||
msgstr "Nein"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:116
|
||||
#: includes/calendar_view_plugin_style.inc:65
|
||||
msgid "Yes"
|
||||
msgstr "Ja"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:130
|
||||
msgid "Display a popup calendar date selector?"
|
||||
msgstr "Einen Popup-Kalender zu Datumsauswahl anzeigen?"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:139
|
||||
msgid "No link"
|
||||
msgstr "Kein Link"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:140
|
||||
msgid "Display a link to add a new date of the specified content type. Displayed only to users with appropriate permissions."
|
||||
msgstr "Anzeigen eines Links, um ein Datum zu einem Inhaltstpy hinzuzufügen. Nur für Benutzer mit entsprechenden Berechtigungen anzeigen."
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:147
|
||||
msgid "Content Type Legend Colors"
|
||||
msgstr "Inhaltstyp Farblegende"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:149
|
||||
msgid "<div class=\"form-item\"><label>Content Type</label><p>Set a hex color value (like #ffffff) to use in the calendar legend for each content type. Types with empty values will have no stripe in the calendar and will not be added to the legend.</p></div>"
|
||||
msgstr "<div class=\\\"form-item\\\"> <label>Inhaltstyp</label><p> Legen Sie einen Hex-Farbwert (zB # FFFFFF) für die Legende des Kalenders an. Die Legende nimmt nur existierende Werte auf.</p></div>"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:182
|
||||
msgid "Vocabulary Legend Types"
|
||||
msgstr "Legende für Vokabularien"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:189
|
||||
msgid "<div class=\"form-item\"><label>Vocabularies</label>Select vocabularies to use for setting calendar legend colors by taxonomy term. This works best for vocabularies with only a limited number of possible terms.</div>"
|
||||
msgstr "<div class=\\\"form-item\\\"> Wählen Sie <label>Vokabularien</label> Vokabularien für die Legende von Kalendern auswählen, um die Farben durch Taxonomie Begriffe zu definieren. Dies funktioniert am besten mit Vokabularien, die eine begrenzten Anzahl von Begriffen enthalten.</div>"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:195
|
||||
msgid "Taxonomy Legend Colors"
|
||||
msgstr "Farben in der Legende für Taxonomie"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:198
|
||||
msgid "<div class=\"form-item warning\">Please select Legend vocabularies first!</div>"
|
||||
msgstr "<div class=\\\"form-item warning\\\"> Bitte wählen Sie für die Legende zuerst ein Vokabular! </div>"
|
||||
|
||||
#: includes/calendar_plugin_display_page.inc:200
|
||||
msgid "<div class=\"form-item\"><label>Taxonomy Terms</label><p>Set a hex color value (like #ffffff) to use in the calendar legend for each taxonomy term. Terms with empty values will have no stripe in the calendar and will not be added to the legend.</p></div>"
|
||||
msgstr "<div class=\\\"form-item\\\"> <label>Taxonomy Begriff</label> <p> Legen Sie einen Hex-Farbwert (zB # FFFFFF) für die Legende des Kalenders für jeden einzelnen Taxonomie-Begriff fest. Die Legende nimmt nur existierende Werte auf.</p></div>"
|
||||
|
||||
#: includes/calendar_plugin_style.inc:75
|
||||
msgid "The @style style requires a Date argument."
|
||||
msgstr "@style erfordert ein Datumsargument."
|
||||
|
||||
#: includes/calendar_plugin_style.inc:114
|
||||
msgid "The date argument date fields must be added to this query. You can exclude them if you do not want them displayed in the calendar."
|
||||
msgstr "Das Argument für das Datum muss dieser Abfrage hinzugefügt werden. Schließen Sie aus, was nicht im Kalender angezeigt werden soll."
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:55
|
||||
msgid "Calendar day of week names"
|
||||
msgstr "[fuzzy] Der Name des Wochentages"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:58
|
||||
msgid "First letter of name"
|
||||
msgstr "Ersten Buchstaben des Namens"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:58
|
||||
msgid "First two letters of name"
|
||||
msgstr "Die ersten beiden Buchstaben des Namens"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:58
|
||||
msgid "Abbreviated name"
|
||||
msgstr "Abgekürzter Name"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:58
|
||||
msgid "Full name"
|
||||
msgstr "Vollständiger Name"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:59
|
||||
msgid "The way day of week names should be displayed in a calendar."
|
||||
msgstr "Die Art und Weise, wie die Namen von Wochentagen in Kalendern angezeigt werden."
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:62
|
||||
msgid "Show week numbers"
|
||||
msgstr "Wochennummer anzeigen"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:66
|
||||
msgid "Whether or not to show week numbers in the left column of calendar weeks and months."
|
||||
msgstr "Wochennummer in der linken Spalte anzeigen bei Wochen und Monaten."
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:69
|
||||
msgid "Maximum items"
|
||||
msgstr "Maximale Anzahl von Elementen"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:71
|
||||
msgid "Unlimited"
|
||||
msgstr "Unbegrenzt"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:71
|
||||
msgid "No items"
|
||||
msgstr "Keine Einträge"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:71
|
||||
msgid "3 items"
|
||||
msgstr "3 Einträge"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:71
|
||||
msgid "5 items"
|
||||
msgstr "5 Einträge"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:71
|
||||
msgid "10 items"
|
||||
msgstr "10 Einträge"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:73
|
||||
msgid "Maximum number of items to show in calendar cells, used to keep the calendar from expanding to a huge size when there are lots of items in one day. "
|
||||
msgstr "Maximale Anzahl von Einträgen in Kalender Zellen, um den Kalender überschaubar zu halten, wenn es um sehr viele Termine an einem Tag gibt. "
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:76
|
||||
msgid "Too many items"
|
||||
msgstr "Zu viele Einträge"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:78
|
||||
msgid "Show maximum, add 'more' link"
|
||||
msgstr "Das Maximum und einen Link für weitere anzeigen"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:78
|
||||
msgid "Hide all, add link to day"
|
||||
msgstr "Alles ausblenden, Link für Tag hinzufügen"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:80
|
||||
msgid "Behavior when there are more than the above number of items in a single day. When there more items than this limit, a link to the day view will be displayed."
|
||||
msgstr "Verhalten, wenn es mehr als die oben Anzahl der Elemente in einem einzigen Tag. Wenn mehr Einträge für einen Tag vorhanden sind, als das Maximum vorsieht, so wir ein Link für den Tag eingeblendet."
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:83
|
||||
msgid "Time grouping"
|
||||
msgstr "Gruppierung nach Zeit"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:86
|
||||
msgid "Group items together into time periods based on their start time."
|
||||
msgstr "Einträge gruppieren nach der Zeit"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:87
|
||||
msgid "Hour"
|
||||
msgstr "Stunden"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:87
|
||||
msgid "Half hour"
|
||||
msgstr "Eine halbe Stunde"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:87
|
||||
msgid "Custom"
|
||||
msgstr "Benutzerdefiniert"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:90
|
||||
msgid "Custom time grouping"
|
||||
msgstr "Benutzerdefiniert nach Zeiträumen gruppieren"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:93
|
||||
msgid "When choosing the 'custom' Time grouping option above, create custom time period groupings as a comma-separated list of 24-hour times in the format HH:MM:SS, like '00:00:00,08:00:00,18:00:00'. Be sure to start with '00:00:00'. All items after the last time will go in the final group."
|
||||
msgstr "Bei der Wahl der benutzerdefinierten Zeiträume für die Gruppierungsoption oben, benutzerdefinierte Zeiträume als Komma-separierte Liste im 24-Stunden-Format HH: MM: SS, wie '00: 00:00,08:00:00, 18:00:00 angeben. Achten Sie darauf, mit '00:00:00 ' zu beginnen. Alle Einträge nach dem letzten Zeitraum erscheinen in der letzten Gruppe."
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:111
|
||||
msgid "Field grouping"
|
||||
msgstr "Gruppierungsfeld"
|
||||
|
||||
#: includes/calendar_view_plugin_style.inc:114
|
||||
msgid "Optionally group items into columns by a field value, for instance select the content type to show items for each content type in their own column, or use a location field to organize items into columns by location."
|
||||
msgstr "Optional Gruppieren von Elementen in Spalten durch einen Feldwert, zum Beispiel wählen Sie den Inhaltstyp, um Elemente für jedenInhaltstyp in einer eigenen Spalte zu zeigen oder einen Feld Ort verwenden, um Einträge in Spalten nach dem Ort zu ordnen."
|
||||
|
||||
#: jcalendar/jcalendar.module:18
|
||||
msgid "Creates a popup for calendar dates."
|
||||
msgstr "Ein Popup für Kalenderdaten erstellen."
|
||||
|
||||
#: jcalendar/jcalendar.module:90
|
||||
#: theme/calendar-month-multiple-node.tpl.php:25
|
||||
#: theme/calendar-week-multiple-node.tpl.php:24
|
||||
msgid "more"
|
||||
msgstr "Weiter"
|
||||
|
||||
#: jcalendar/jcalendar.module:48
|
||||
msgid "Get Calendar Node"
|
||||
msgstr "Kalendereintrag abrufen"
|
||||
|
||||
#: jcalendar/jcalendar.info:0
|
||||
msgid "Calendar Popup"
|
||||
msgstr "Kalender Popup "
|
||||
|
||||
#: jcalendar/jcalendar.info:0
|
||||
msgid "Replaces the links to calendar items with a javascript popup that gracefully regresses if javascript is not enabled"
|
||||
msgstr "Wenn Javascript verfügbar ist, werden Links zu Kalendereinträgen mit einem Javascript-Popup, ersetzt. Ist Javascript nicht verfügbar wird auf reguläre Links zurückgefallen."
|
||||
|
||||
#: theme/calendar-day.tpl.php:41
|
||||
#: theme/calendar-week.tpl.php:36
|
||||
msgid "Time"
|
||||
msgstr "Zeit"
|
||||
|
||||
#: theme/calendar-month-multiple-node.tpl.php:21
|
||||
#: theme/calendar-week-multiple-node.tpl.php:20
|
||||
msgid "Click to see all @count events"
|
||||
msgstr "Alle @count Termine anzeigen"
|
||||
|
||||
#: theme/theme.inc:59
|
||||
msgid "Add+"
|
||||
msgstr "[fuzzy] Hinzufügen"
|
||||
|
||||
#: theme/theme.inc:305;331;374
|
||||
msgid "Items"
|
||||
msgstr "Einträge"
|
||||
|
||||
#: theme/theme.inc:647
|
||||
msgid "All times"
|
||||
msgstr "Immer"
|
||||
|
||||
#: theme/theme.inc:651
|
||||
msgid "Before @time"
|
||||
msgstr "Vor @time"
|
||||
|
||||
#: theme/theme.inc:674
|
||||
msgid "Item"
|
||||
msgstr "Eintrag"
|
||||
|
||||
#: theme/theme.inc:675
|
||||
msgid "Key"
|
||||
msgstr "Schlüssel"
|
||||
|
||||
#: theme/theme.inc:721
|
||||
msgid "Empty day"
|
||||
msgstr "Tag ohne Eintrag"
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
# $Id: general.cs.po,v 1.1.2.1 2010/10/22 20:06:37 wojtha Exp $
|
||||
#
|
||||
# Czech translation of Calendar (6.x-2.2)
|
||||
# Copyright (c) 2010 by the Czech translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (6.x-2.2)\n"
|
||||
"POT-Creation-Date: 2010-10-22 20:03+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 20:42+0000\n"
|
||||
"Language-Team: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((((n%10)==1)&&((n%100)!=11))?(0):(((((n%10)>=2)&&((n%10)<=4))&&(((n%100)<10)||((n%100)>=20)))?(1):2));\n"
|
||||
|
||||
msgid "more"
|
||||
msgstr "více"
|
||||
msgid "Yes"
|
||||
msgstr "Ano"
|
||||
msgid "No"
|
||||
msgstr "Ne"
|
||||
msgid "None"
|
||||
msgstr "Žádné"
|
||||
msgid "Time"
|
||||
msgstr "Čas"
|
||||
msgid "Calendar"
|
||||
msgstr "Kalendář"
|
||||
msgid "Date/Time"
|
||||
msgstr "Datum/čas"
|
||||
msgid "Calendar settings"
|
||||
msgstr "Nastavení kalendáře"
|
||||
msgid "Click to see all @count events"
|
||||
msgstr "Klikněte pro zobrazení všech událostí - celkem: @count"
|
||||
msgid ""
|
||||
"The date field '@field' used by the display '@display_title' cannot be "
|
||||
"set to 'Group multiple values'."
|
||||
msgstr ""
|
||||
"V definici zobrazení '@display_title' nelze u pole reprezentujícího "
|
||||
"datum '@field' učinit nastavení 'Seskupit více hodnot'."
|
||||
msgid "Calendar period"
|
||||
msgstr "Období kalendáře"
|
|
@ -1,152 +0,0 @@
|
|||
# Hungarian translation of Calendar (all releases)
|
||||
# Copyright (c) 2009 by the Hungarian translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (all releases)\n"
|
||||
"POT-Creation-Date: 2009-11-10 16:39+0000\n"
|
||||
"PO-Revision-Date: 2009-11-10 14:13+0000\n"
|
||||
"Language-Team: Hungarian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
|
||||
msgid "Submit"
|
||||
msgstr "Beküldés"
|
||||
msgid "Item"
|
||||
msgstr "Elem"
|
||||
msgid "List"
|
||||
msgstr "Lista"
|
||||
msgid "more"
|
||||
msgstr "tovább"
|
||||
msgid "Yes"
|
||||
msgstr "Igen"
|
||||
msgid "No"
|
||||
msgstr "Nem"
|
||||
msgid "None"
|
||||
msgstr "Nincs"
|
||||
msgid "Name"
|
||||
msgstr "Név"
|
||||
msgid "Time"
|
||||
msgstr "Idő"
|
||||
msgid "Views"
|
||||
msgstr "Nézetek"
|
||||
msgid "Maximum items"
|
||||
msgstr "Maximális elemszám"
|
||||
msgid "Year"
|
||||
msgstr "Év"
|
||||
msgid "Url"
|
||||
msgstr "Webcím"
|
||||
msgid "Feed type"
|
||||
msgstr "Hírcsatorna típusa"
|
||||
msgid "Month"
|
||||
msgstr "Hónap"
|
||||
msgid "Unlimited"
|
||||
msgstr "Korlátlan"
|
||||
msgid "Calendar"
|
||||
msgstr "Naptár"
|
||||
msgid "Week"
|
||||
msgstr "Hét"
|
||||
msgid "Day"
|
||||
msgstr "Nap"
|
||||
msgid "Table"
|
||||
msgstr "Táblázat"
|
||||
msgid "Full name"
|
||||
msgstr "Teljes név"
|
||||
msgid "Key"
|
||||
msgstr "Kulcs"
|
||||
msgid "Teasers"
|
||||
msgstr "Bevezetők"
|
||||
msgid "Expire iCal cache"
|
||||
msgstr "iCal gyorsítótár lejárata"
|
||||
msgid ""
|
||||
"iCal feeds are cached to improve performance. Set an expiration time "
|
||||
"for cached feeds."
|
||||
msgstr ""
|
||||
"Az iCal hírcsatornák a teljesítmény javítása érdekében "
|
||||
"gyorsítótárazva vannak. Be kell állítani egy lejárati időt a "
|
||||
"gyorsítótárazott hírcsatornákhoz."
|
||||
msgid "iCal Feeds"
|
||||
msgstr "iCal hírcsatornák"
|
||||
msgid ""
|
||||
"Use this section to set up iCal feeds that should be displayed in this "
|
||||
"calendar. They will be shown along with any internal items that match "
|
||||
"the calendar criteria."
|
||||
msgstr ""
|
||||
"Itt lehet beállítani a naptárban megjeleníteni kívánt iCal "
|
||||
"hírcsatornákat. Azokkal a belső elemekkel együtt fognak "
|
||||
"megjelenni, amik megegyeznek a naptár feltételeivel."
|
||||
msgid "The name of a feed to include in this calendar."
|
||||
msgstr "A naptárba beillesztett hírcsatorna neve."
|
||||
msgid ""
|
||||
"The external feed url or internal file path and name. Change "
|
||||
"'webcal://' to 'http://'."
|
||||
msgstr ""
|
||||
"A külső hírcsatorna URL-je vagy a belső fájl elérési útja és "
|
||||
"neve. Módosítani kell a „webcal://” előtagot „http://” "
|
||||
"formára."
|
||||
msgid "Add to calendar"
|
||||
msgstr "Hozzáadás a naptárhoz"
|
||||
msgid "Calendar iCal"
|
||||
msgstr "iCal naptár"
|
||||
msgid "Date/Time"
|
||||
msgstr "Dátum/Idő"
|
||||
msgid "Calendar settings"
|
||||
msgstr "Naptár beállításai"
|
||||
msgid "First letter of name"
|
||||
msgstr "A név első betűje"
|
||||
msgid "First two letters of name"
|
||||
msgstr "A név első két betűje"
|
||||
msgid "Abbreviated name"
|
||||
msgstr "Rövidített név"
|
||||
msgid "Show week numbers"
|
||||
msgstr "Hetek számának megjelenítése"
|
||||
msgid "3 items"
|
||||
msgstr "3 elem"
|
||||
msgid "5 items"
|
||||
msgstr "5 elem"
|
||||
msgid "10 items"
|
||||
msgstr "10 elem"
|
||||
msgid ""
|
||||
"Maximum number of items to show in calendar cells, used to keep the "
|
||||
"calendar from expanding to a huge size when there are lots of items in "
|
||||
"one day. "
|
||||
msgstr ""
|
||||
"A naptár cellákban megjelenített elemek számának felső határa, "
|
||||
"megakadályozza a naptár nagyra növését ha egy napon nagyon sok "
|
||||
"elem van. "
|
||||
msgid "Too many items"
|
||||
msgstr "Túl sok elem"
|
||||
msgid "Show maximum, add 'more' link"
|
||||
msgstr "Maximum megjelenítése, „tovább” hivatkozás hozzáadása"
|
||||
msgid "Hide all, add link to day"
|
||||
msgstr "Összes elrejtése, hivatkozás hozzáadása a naphoz"
|
||||
msgid ""
|
||||
"Behavior when there are more than the above number of items in a "
|
||||
"single day. When there more items than this limit, a link to the day "
|
||||
"view will be displayed."
|
||||
msgstr ""
|
||||
"A viselkedés, ha a fentinél több elem van egy napon. Ha a "
|
||||
"korlátnál több elem van, egy, a napi nézetre mutató hivatkozás "
|
||||
"fog megjelenni."
|
||||
msgid "Stripe color"
|
||||
msgstr "Sáv színe"
|
||||
msgid ""
|
||||
"The hex color value (like #ffffff) to use for this feed's calendar "
|
||||
"stripe."
|
||||
msgstr ""
|
||||
"A hírcsatorna naptársávjához használt szín tizenhatos "
|
||||
"számrendszerbeli értéke (például #ffffff)."
|
||||
msgid "Click to see all @count events"
|
||||
msgstr "Kattintás az összes (@count) esemény megtekintéséhez"
|
||||
msgid "Adds ical functionality to Calendar views."
|
||||
msgstr "Ical hozzáadása a Calendar nézetekhez."
|
||||
msgid ""
|
||||
"The date field '@field' used by the display '@display_title' cannot be "
|
||||
"set to 'Group multiple values'."
|
||||
msgstr ""
|
||||
"„@display_title” képernyő által használt „@field” mezőn "
|
||||
"nem beállítható a „Több érték csoportosítása”."
|
||||
msgid "Calendar period"
|
||||
msgstr "Naptári időszak"
|
|
@ -1,198 +0,0 @@
|
|||
# Hungarian translation of Calendar (all releases)
|
||||
# Copyright (c) 2009 by the Hungarian translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (all releases)\n"
|
||||
"POT-Creation-Date: 2009-11-10 16:39+0000\n"
|
||||
"PO-Revision-Date: 2009-11-10 14:13+0000\n"
|
||||
"Language-Team: Hungarian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
|
||||
msgid "Edit"
|
||||
msgstr "Szerkesztés"
|
||||
msgid "Custom"
|
||||
msgstr "Egyedi"
|
||||
msgid "Hour"
|
||||
msgstr "Óra"
|
||||
msgid "No link"
|
||||
msgstr "Nincs hivatkozás"
|
||||
msgid "Calendar page"
|
||||
msgstr "Naptár oldal"
|
||||
msgid ""
|
||||
"Calendar page. Attach Calendar period attachments to this page, set to "
|
||||
"show the year, month, day, and week views."
|
||||
msgstr ""
|
||||
"Naptár oldal. Naptári időszak csatolmányok vannak az oldalhoz "
|
||||
"csatolva, amik az éves, havi, napi és heti nézetek "
|
||||
"megjelenítésére vannak beállítva."
|
||||
msgid "Calendar block"
|
||||
msgstr "Naptár blokk"
|
||||
msgid ""
|
||||
"Calendar page. Attach a Calendar period attachment to this block, set "
|
||||
"to show the year, month, day, or week view."
|
||||
msgstr ""
|
||||
"Naptár oldal. Egy Naptári időszak csatolmány van a blokkhoz "
|
||||
"csatolva, ami az éves, havi, napi és heti nézetek "
|
||||
"megjelenítésére van beállítva."
|
||||
msgid ""
|
||||
"An attachment for a Year, Month, Day, or Week calendar display, using "
|
||||
"any style you choose. Attach to a Calendar page and/or a Calendar "
|
||||
"block."
|
||||
msgstr ""
|
||||
"Egy csatolmány az Éves, Havi, Napi vagy Heti naptár "
|
||||
"megjelenítéséhez, tetszőlegesen választott stílussal. Egy "
|
||||
"Naptár oldalhoz és/vagy egy Naptár blokkhoz van csatolva."
|
||||
msgid "Calendar page year, month, week, or day view"
|
||||
msgstr "Naptár oldal éves, havi, heti vagy napi nézet."
|
||||
msgid "Calendar navigation"
|
||||
msgstr "Naptár navigáció"
|
||||
msgid "Creates back/next navigation and calendar links."
|
||||
msgstr ""
|
||||
"Előző/következő navigációt és naptári hivatkozásokat hoz "
|
||||
"létre."
|
||||
msgid "Displays Views results in a calendar."
|
||||
msgstr "Views eredmények megjelenítése egy naptárban."
|
||||
msgid "A Calendar period display will not work without a Date argument."
|
||||
msgstr ""
|
||||
"A naptári időszak képernyő nem működik dátum argumentum "
|
||||
"nélkül."
|
||||
msgid "Select the calendar time period for this display."
|
||||
msgstr "Naptári időszak kiválasztása ehhez a képernyőhöz."
|
||||
msgid ""
|
||||
"The Calendar period display '@display_title' will not work without a "
|
||||
"Date argument."
|
||||
msgstr ""
|
||||
"„@display_title” naptári időszak képernyő nem fog működni "
|
||||
"dátum argumentum nélkül."
|
||||
msgid ""
|
||||
"The Calendar display '@display_title' will not work without a Date "
|
||||
"argument."
|
||||
msgstr ""
|
||||
"„@display_title” naptárképernyő nem fog működni dátum "
|
||||
"argumentum nélkül."
|
||||
msgid "Legend Content Types"
|
||||
msgstr "Tartalomtípusok magyarázat"
|
||||
msgid "Legend Vocabularies"
|
||||
msgstr "Szótárak magyarázat"
|
||||
msgid "Legend Terms"
|
||||
msgstr "Kifejezések magyarázat"
|
||||
msgid "Date changer"
|
||||
msgstr "Dátumváltó"
|
||||
msgid "Add new date link"
|
||||
msgstr "Új dátumhivatkozás hozzáadása"
|
||||
msgid "Display a popup calendar date selector?"
|
||||
msgstr "Megjelenjen egy felugró-naptár dátumválasztó?"
|
||||
msgid ""
|
||||
"Display a link to add a new date of the specified content type. "
|
||||
"Displayed only to users with appropriate permissions."
|
||||
msgstr ""
|
||||
"Megjelenít egy hivatkozást amivel új dátumot lehet hozzáadni a "
|
||||
"meghatározott tartalomtípushoz. Csak a megfelelő jogosultságokkal "
|
||||
"rendelkező felhasználóknak jelenik meg."
|
||||
msgid "Content Type Legend Colors"
|
||||
msgstr "Tartalomtípus magyarázatok színei"
|
||||
msgid ""
|
||||
"<div class=\"form-item\"><label>Content Type</label><p>Set a hex color "
|
||||
"value (like #ffffff) to use in the calendar legend for each content "
|
||||
"type. Types with empty values will have no stripe in the calendar and "
|
||||
"will not be added to the legend.</p></div>"
|
||||
msgstr ""
|
||||
"<div class=\"form-item\"><label>Tartalomtípus</label><p>Egy szín "
|
||||
"tizenhatos számrendszerbeli értékét kell megadni (például "
|
||||
"#ffffff) ami a tartalomtípusoknál a naptár magyarázatban lesz "
|
||||
"használva. Azok a típusok, melyeknek értéke üres, nem lesznek "
|
||||
"csíkozva és nem lesznek hozzáadva a magyarázathoz.</p></div>"
|
||||
msgid "Vocabulary Legend Types"
|
||||
msgstr "Szótár magyarázattípusok"
|
||||
msgid ""
|
||||
"<div class=\"form-item\"><label>Vocabularies</label>Select "
|
||||
"vocabularies to use for setting calendar legend colors by taxonomy "
|
||||
"term. This works best for vocabularies with only a limited number of "
|
||||
"possible terms.</div>"
|
||||
msgstr ""
|
||||
"<div class=\"form-item\"><label>Szótárak</label>Ki kell választani "
|
||||
"a taxonómia kifejezésekhez tartozó naptár magyarázatok színeinek "
|
||||
"beállításához használt szótárat. Azoknál a szótáraknál "
|
||||
"működik a legjobban, ahol a lehetséges kifejezések száma "
|
||||
"korlátozott.</div>"
|
||||
msgid "Taxonomy Legend Colors"
|
||||
msgstr "Taxonómia magyarázatok színei"
|
||||
msgid ""
|
||||
"<div class=\"form-item warning\">Please select Legend vocabularies "
|
||||
"first!</div>"
|
||||
msgstr ""
|
||||
"<div class=\"form-item warning\">Először Szótár magyarázatot kell "
|
||||
"választani!</div>"
|
||||
msgid ""
|
||||
"<div class=\"form-item\"><label>Taxonomy Terms</label><p>Set a hex "
|
||||
"color value (like #ffffff) to use in the calendar legend for each "
|
||||
"taxonomy term. Terms with empty values will have no stripe in the "
|
||||
"calendar and will not be added to the legend.</p></div>"
|
||||
msgstr ""
|
||||
"<div class=\"form-item\"><label>Taxonómia kifejezések</label><p>Egy "
|
||||
"szín hexadecimális kódját kell megadni (pl. #ffffff) ami a "
|
||||
"taxonómia kifejezéseknél a naptár magyarázatban lesz használva. "
|
||||
"Az üres érétket tartalmazó kifejezések nem lesznek csíkozva a "
|
||||
"naptárban és nem lesznek hozzáadva a magyarázathoz.</p></div>"
|
||||
msgid "The @style style requires a Date argument."
|
||||
msgstr "@style stílushoz szükséges egy Dátum argumentum."
|
||||
msgid ""
|
||||
"The date argument date fields must be added to this query. You can "
|
||||
"exclude them if you do not want them displayed in the calendar."
|
||||
msgstr ""
|
||||
"A dátum argumentum dátummezőket hozzá kell adni ehhez a "
|
||||
"lekérdezéshez. A mezőket el lehet rejteni, ha nem kell "
|
||||
"megjeleníteni azokat a naptárban."
|
||||
msgid "Calendar day of week names"
|
||||
msgstr "A hét napjainak elnevezése a naptárban"
|
||||
msgid "The way day of week names should be displayed in a calendar."
|
||||
msgstr ""
|
||||
"A mód ahogy a hét napjainak neveit meg kell jeleníteni a "
|
||||
"naptárban."
|
||||
msgid ""
|
||||
"Whether or not to show week numbers in the left column of calendar "
|
||||
"weeks and months."
|
||||
msgstr ""
|
||||
"A hetek száma legyen-e mutatva a heti és havi naptárak bal oldali "
|
||||
"oszlopában."
|
||||
msgid "No items"
|
||||
msgstr "Nincsenek elemek"
|
||||
msgid "Time grouping"
|
||||
msgstr "Időcsoportosítás"
|
||||
msgid "Group items together into time periods based on their start time."
|
||||
msgstr "Elemek csoportosítása időszakok szerint a kezdési idő alapján."
|
||||
msgid "Half hour"
|
||||
msgstr "Fél óra"
|
||||
msgid "Custom time grouping"
|
||||
msgstr "Egyéni időcsoportosítás"
|
||||
msgid ""
|
||||
"When choosing the 'custom' Time grouping option above, create custom "
|
||||
"time period groupings as a comma-separated list of 24-hour times in "
|
||||
"the format HH:MM:SS, like '00:00:00,08:00:00,18:00:00'. Be sure to "
|
||||
"start with '00:00:00'. All items after the last time will go in the "
|
||||
"final group."
|
||||
msgstr ""
|
||||
"Ha az „egyéni” Időcsoportosítás lett fentebb kiválasztva, "
|
||||
"létre kell hozni egy egyéni időszak szerinti csoportosítást, ahol "
|
||||
"egy vesszővel elválasztott listában 24 órás időpontokat kell "
|
||||
"megadni ÓÓ:PP:MM formában, például így: "
|
||||
"„00:00:00,08:00:00,18:00:00”. A listának „00:00:00” "
|
||||
"értékkel kell kezdődnie. Az utolsó időpont utáni elemek az "
|
||||
"utolsó csoportba kerülnek."
|
||||
msgid "Field grouping"
|
||||
msgstr "Mezőcsoportosítás"
|
||||
msgid ""
|
||||
"Optionally group items into columns by a field value, for instance "
|
||||
"select the content type to show items for each content type in their "
|
||||
"own column, or use a location field to organize items into columns by "
|
||||
"location."
|
||||
msgstr ""
|
||||
"Az elemeket oszlopokba lehet csoportosítani egy mező értéke "
|
||||
"szerint, például a tartalomtípust kiválasztva, a "
|
||||
"tartalomtípusokhoz tartozó elemek a saját oszlopukban jelennek meg, "
|
||||
"vagy egy helyszín mezőt használva, az elemek helyszín szerint "
|
||||
"lesznek oszlopokba rendezve."
|
|
@ -1,30 +0,0 @@
|
|||
# $Id: installer.cs.po,v 1.1.2.1 2010/10/22 20:06:37 wojtha Exp $
|
||||
#
|
||||
# Czech translation of Calendar (6.x-2.2)
|
||||
# Copyright (c) 2010 by the Czech translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (6.x-2.2)\n"
|
||||
"POT-Creation-Date: 2010-10-22 20:03+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 20:42+0000\n"
|
||||
"Language-Team: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((((n%10)==1)&&((n%100)!=11))?(0):(((((n%10)>=2)&&((n%10)<=4))&&(((n%100)<10)||((n%100)>=20)))?(1):2));\n"
|
||||
|
||||
msgid "Calendar requirements"
|
||||
msgstr "Požadavky modulu Calendar"
|
||||
msgid ""
|
||||
"The Calendar module requires a more current version of the Date API. "
|
||||
"Please check for a newer version."
|
||||
msgstr ""
|
||||
"Modul Calendar vyžaduje novější verzi modulu Date API. Proveďte "
|
||||
"prosím aktualizaci."
|
||||
msgid ""
|
||||
"The Calendar module requires the latest version of the Date API, be "
|
||||
"sure you are installing the latest versions of both modules."
|
||||
msgstr ""
|
||||
"Modul Calendar vyžaduje poslední verzi modulu Date API, ujistěte se "
|
||||
"prosím, že instalujete poslední verze obou modulů."
|
|
@ -1,29 +0,0 @@
|
|||
# Hungarian translation of Calendar (all releases)
|
||||
# Copyright (c) 2009 by the Hungarian translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (all releases)\n"
|
||||
"POT-Creation-Date: 2009-11-10 16:39+0000\n"
|
||||
"PO-Revision-Date: 2009-10-31 09:56+0000\n"
|
||||
"Language-Team: Hungarian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
|
||||
msgid "Calendar requirements"
|
||||
msgstr "Calendar előfeltételei"
|
||||
msgid ""
|
||||
"The Calendar module requires a more current version of the Date API. "
|
||||
"Please check for a newer version."
|
||||
msgstr ""
|
||||
"A Calendar modulnak a Date API frissebb verziójára van szüksége. "
|
||||
"Telepíteni kell egy újabb verziót."
|
||||
msgid ""
|
||||
"The Calendar module requires the latest version of the Date API, be "
|
||||
"sure you are installing the latest versions of both modules."
|
||||
msgstr ""
|
||||
"A Naptár modulhoz a Date API legfrissebb változata szükséges. Meg "
|
||||
"kell győződni arról, hogy mindkét modul legfrissebb verziója van "
|
||||
"telepítve."
|
|
@ -1,79 +0,0 @@
|
|||
# $Id: root.cs.po,v 1.1.2.1 2010/10/22 20:06:37 wojtha Exp $
|
||||
#
|
||||
# Czech translation of Calendar (6.x-2.2)
|
||||
# Copyright (c) 2010 by the Czech translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (6.x-2.2)\n"
|
||||
"POT-Creation-Date: 2010-10-22 20:03+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 20:43+0000\n"
|
||||
"Language-Team: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((((n%10)==1)&&((n%100)!=11))?(0):(((((n%10)>=2)&&((n%10)<=4))&&(((n%100)<10)||((n%100)>=20)))?(1):2));\n"
|
||||
|
||||
msgid "Year"
|
||||
msgstr "Rok"
|
||||
msgid "Month"
|
||||
msgstr "Měsíc"
|
||||
msgid "Week"
|
||||
msgstr "Týden"
|
||||
msgid "Day"
|
||||
msgstr "Den"
|
||||
msgid "<p>View complete documentation at !link.</p>"
|
||||
msgstr "<p>Kompletní dokumentace je na adrese !link.</p>"
|
||||
msgid "Calendar Legend."
|
||||
msgstr "Legenda kalendáře."
|
||||
msgid "Calendar Legend"
|
||||
msgstr "Legenda kalendáře"
|
||||
msgid " is not a valid hex color"
|
||||
msgstr " není platná barva v šestnáctkovém zápisu"
|
||||
msgid "Change date"
|
||||
msgstr "Změnit datum"
|
||||
msgid "Calendar requirements"
|
||||
msgstr "Požadavky modulu Calendar"
|
||||
msgid ""
|
||||
"The Calendar module requires a more current version of the Date API. "
|
||||
"Please check for a newer version."
|
||||
msgstr ""
|
||||
"Modul Calendar vyžaduje novější verzi modulu Date API. Proveďte "
|
||||
"prosím aktualizaci."
|
||||
msgid ""
|
||||
"The Calendar module requires the latest version of the Date API, be "
|
||||
"sure you are installing the latest versions of both modules."
|
||||
msgstr ""
|
||||
"Modul Calendar vyžaduje poslední verzi modulu Date API, ujistěte se "
|
||||
"prosím, že instalujete poslední verze obou modulů."
|
||||
msgid "Views plugin to display views containing dates as Calendars."
|
||||
msgstr ""
|
||||
"Plugin modulu Views pro zobrazování datumů prostřednictvím "
|
||||
"kalendářů."
|
||||
msgid ""
|
||||
"The Date argument in this view must be set up to provide a default "
|
||||
"value set to the current date. Edit the argument, find 'Action to take "
|
||||
"if argument is not present.', choose 'Provide default argument', then "
|
||||
"select 'Current date'."
|
||||
msgstr ""
|
||||
"V rámci tohoto pohledu je potřeba nastavit argument reprezentující "
|
||||
"datum tak, aby jeho výchozí hodnota odpovídala aktuálnímu datu. "
|
||||
"Upravte argument a vyhledejte položku 'Jakou akci spustit, pokud "
|
||||
"nebyl nalezen žádný argument', zvolte 'Poskytnout výchozí "
|
||||
"argument', z nabídky vyberte 'Aktuální datum'."
|
||||
msgid "View the calendar."
|
||||
msgstr "Zobrazit kalendář."
|
||||
msgid ""
|
||||
"Calendar module cannot be updated until after Views has been updated. "
|
||||
"Please return to <a href=\"@update-php\">update.php</a> and run the "
|
||||
"remaining updates."
|
||||
msgstr ""
|
||||
"Modul Calendar nemůže být aktualizován, dokud není aktualizován "
|
||||
"modul Views. Opakujte <a href=\"@update-php\">update.php</a> a "
|
||||
"spusťte zbývající aktualizace."
|
||||
msgid ""
|
||||
"calendar.module has updates, but cannot be updated until views.module "
|
||||
"is updated first."
|
||||
msgstr ""
|
||||
"Modul kalendář má k dispozici aktualizace, ale nebude aktualizován "
|
||||
"dokud nebude nejdříve aktualizován modul Views."
|
|
@ -1,294 +0,0 @@
|
|||
# Hungarian translation of Calendar (all releases)
|
||||
# Copyright (c) 2009 by the Hungarian translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (all releases)\n"
|
||||
"POT-Creation-Date: 2009-11-10 16:39+0000\n"
|
||||
"PO-Revision-Date: 2009-11-10 14:07+0000\n"
|
||||
"Language-Team: Hungarian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
|
||||
msgid "Setup"
|
||||
msgstr "Beállítás"
|
||||
msgid "Nodes"
|
||||
msgstr "Tartalmak"
|
||||
msgid "Display options"
|
||||
msgstr "Megjelenítési beállítások"
|
||||
msgid "next"
|
||||
msgstr "előző"
|
||||
msgid "Mon"
|
||||
msgstr "h"
|
||||
msgid "Tue"
|
||||
msgstr "k"
|
||||
msgid "Wed"
|
||||
msgstr "sze"
|
||||
msgid "Thu"
|
||||
msgstr "cs"
|
||||
msgid "Fri"
|
||||
msgstr "p"
|
||||
msgid "Sat"
|
||||
msgstr "szo"
|
||||
msgid "Sun"
|
||||
msgstr "v"
|
||||
msgid "all day"
|
||||
msgstr "egész nap"
|
||||
msgid "All day"
|
||||
msgstr "Egész nap"
|
||||
msgid "Full Nodes"
|
||||
msgstr "Teljes nézet"
|
||||
msgid "You can only set on Default Sort on one field."
|
||||
msgstr "Az Alapértelmezett rendezésnél csak egy mező adható meg."
|
||||
msgid "The Calendar View requires at least one field."
|
||||
msgstr ""
|
||||
msgid "Calendar arguments must be set to 'Display All Values'."
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"The Calendar requres as arguments Calendar: Year, Calendar: Month, and "
|
||||
"Calendar: Day, or Calendar: Year and Calendar: Week"
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"Calendar CCK Date fields must be set to 'Do not group multiple "
|
||||
"values'."
|
||||
msgstr ""
|
||||
msgid "Time format"
|
||||
msgstr "Időformátum"
|
||||
msgid "The format to use for the time-only date display."
|
||||
msgstr ""
|
||||
msgid "Year display"
|
||||
msgstr "Év képernyő"
|
||||
msgid "Month display"
|
||||
msgstr "Hónap képernyő"
|
||||
msgid "Week display"
|
||||
msgstr "Hét képernyő"
|
||||
msgid "Day display"
|
||||
msgstr "Nap képernyő"
|
||||
msgid "Block display"
|
||||
msgstr "Blokk képernyő"
|
||||
msgid "Wildcard argument"
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"A character or short text string to use for empty calendar arguments. "
|
||||
"For instance, 'all' would create the url 2007/12/all to show all days "
|
||||
"in December of 2007. Note that non-ASCII characters will not display "
|
||||
"correctly in urls."
|
||||
msgstr ""
|
||||
msgid "Calendar: Year"
|
||||
msgstr "Calendar: Év"
|
||||
msgid "Filter by the calendar year (YYYY)."
|
||||
msgstr ""
|
||||
msgid "Calendar: Month"
|
||||
msgstr "Calendar: Hónap"
|
||||
msgid ""
|
||||
"Filter by the calendar month (1-12). Place this argument after a "
|
||||
"'Year' argument."
|
||||
msgstr ""
|
||||
msgid "Calendar: Day"
|
||||
msgstr "Calendar: Nap"
|
||||
msgid ""
|
||||
"Filter by the calendar day (1-31). Place this argument after a 'Year' "
|
||||
"and a 'Month' argument."
|
||||
msgstr ""
|
||||
msgid "Calendar: Week"
|
||||
msgstr "Calendar: Hét"
|
||||
msgid ""
|
||||
"Filter by the week number (1-52). Place this argument after a 'Year' "
|
||||
"argument and use a 'W' in front of the week number in the url."
|
||||
msgstr ""
|
||||
msgid "calendar"
|
||||
msgstr "naptár"
|
||||
msgid ""
|
||||
"Calendar view of any date field, add a date field to the view to use "
|
||||
"it."
|
||||
msgstr ""
|
||||
msgid "<p>View complete documentation at !link.</p>"
|
||||
msgstr "<p>A teljes dokumentáció itt !link található.</p>"
|
||||
msgid "Calendar setup."
|
||||
msgstr "Naptár beállítása."
|
||||
msgid "Calendar Legend."
|
||||
msgstr "Naptár magyarázat."
|
||||
msgid "Switch Calendar."
|
||||
msgstr "Naptár váltása."
|
||||
msgid "Calendar Legend"
|
||||
msgstr "Naptár magyarázat"
|
||||
msgid "Switch Calendar"
|
||||
msgstr "Naptár váltása"
|
||||
msgid "Switch"
|
||||
msgstr "Váltás"
|
||||
msgid "iCal"
|
||||
msgstr "iCal"
|
||||
msgid "iCal setup."
|
||||
msgstr "iCal beállítása."
|
||||
msgid "Calendar: iCal Feed"
|
||||
msgstr "Calendar: iCal hírcsatorna"
|
||||
msgid "<h3>Stripe options</h3>"
|
||||
msgstr "<h3>Csíkozás beállításai</h3>"
|
||||
msgid "Stripe"
|
||||
msgstr "Csíkozás"
|
||||
msgid "The color stripe to use for this feed (not working yet)."
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"Add this as the last argument to a calendar view to provide an iCal "
|
||||
"feed of the view."
|
||||
msgstr ""
|
||||
msgid "Week @week @year"
|
||||
msgstr "@year @week. hét"
|
||||
msgid "Week of @date"
|
||||
msgstr "@date hete"
|
||||
msgid "prev"
|
||||
msgstr "következő"
|
||||
msgid "view this item"
|
||||
msgstr "megtekintés"
|
||||
msgid "!month / !day"
|
||||
msgstr "!month / !day"
|
||||
msgid ""
|
||||
"Adds date calendar themes to views that can display any type of date "
|
||||
"field, and creates default calendar views."
|
||||
msgstr ""
|
||||
msgid "Adds ical functionality to calendar views."
|
||||
msgstr ""
|
||||
msgid " is not a valid hex color"
|
||||
msgstr " érvénytelen hexadecimális szín"
|
||||
msgid "Dates"
|
||||
msgstr "Dátumok"
|
||||
msgid "The Calendar View requires at least one date field."
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"The Calendar requires as arguments Calendar: Year, Calendar: Month, "
|
||||
"and Calendar: Day, or Calendar: Year and Calendar: Week"
|
||||
msgstr ""
|
||||
msgid "Mini day name size"
|
||||
msgstr ""
|
||||
msgid "The way day of week names should be displayed in a mini calendar."
|
||||
msgstr ""
|
||||
msgid "Full day name size"
|
||||
msgstr ""
|
||||
msgid "The way day of week names should be displayed in a full size calendar."
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"Whether or not to display a clickable week number link on the left "
|
||||
"side of each calendar week."
|
||||
msgstr ""
|
||||
msgid "Popup date selector"
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"Whether or not to display a popup date selector to change the calendar "
|
||||
"period. (Only works when the Date Popup module is enabled.)"
|
||||
msgstr ""
|
||||
msgid "Truncate length"
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"Truncate size for titles in month and week view so things fit better "
|
||||
"into the calendar cell. For instance, change the title from 'Very Very "
|
||||
"Very Long Name' to something like 'Very Very...'."
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"Choose the way the calendar entries should be displayed. Selecting "
|
||||
"'None' will hide links to that option."
|
||||
msgstr ""
|
||||
msgid "Date year range"
|
||||
msgstr "Dátum évtartomány"
|
||||
msgid ""
|
||||
"Set the allowable minimum and maximum year range for this view, either "
|
||||
"a -X:+X offset from the current year, like '-3:+3' or an absolute "
|
||||
"minimum and maximum year, like '2005:2010'. When the argument is set "
|
||||
"to a date outside the range, the page will be returned as 'Page not "
|
||||
"found (404)'."
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"<h3>Content Type</h3><p>Set a hex color value (like #ffffff) to use in "
|
||||
"the calendar legend for each content type. Types with empty values "
|
||||
"will have no stripe in the calendar and will not be added to the "
|
||||
"legend.</p>"
|
||||
msgstr ""
|
||||
msgid "Legend colors"
|
||||
msgstr "Magyarázat színei"
|
||||
msgid "Date year range must be in the format -9:+9 or 2005:2010."
|
||||
msgstr "A dátum évtartományát -9:+9 vagy 2005:2010 formában kell megadni."
|
||||
msgid "Calendar settings have been updated."
|
||||
msgstr ""
|
||||
msgid "Calendar legend settings have been updated."
|
||||
msgstr ""
|
||||
msgid "Feed @delta"
|
||||
msgstr "@delta hírcsatorna"
|
||||
msgid "iCal url"
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"The ical url, either an external feed url or internal file path and "
|
||||
"name. Change 'webcal://' to 'http://'."
|
||||
msgstr ""
|
||||
msgid "Default link"
|
||||
msgstr ""
|
||||
msgid ""
|
||||
"A url to use to link back to ical items without a url, generally the "
|
||||
"public link to the calendar these items are coming from."
|
||||
msgstr ""
|
||||
msgid "Calendar Setup"
|
||||
msgstr ""
|
||||
msgid "Customize calendar settings options."
|
||||
msgstr ""
|
||||
msgid "Legend"
|
||||
msgstr ""
|
||||
msgid "Calendar Switcher."
|
||||
msgstr ""
|
||||
msgid "Calendar Switcher"
|
||||
msgstr ""
|
||||
msgid "Change date"
|
||||
msgstr "Dátum változtatása"
|
||||
msgid "‹ !period "
|
||||
msgstr ""
|
||||
msgid " !period ›"
|
||||
msgstr ""
|
||||
msgid "more»"
|
||||
msgstr ""
|
||||
msgid "Calendar requirements"
|
||||
msgstr "Calendar előfeltételei"
|
||||
msgid ""
|
||||
"The Calendar module requires a more current version of the Date API. "
|
||||
"Please check for a newer version."
|
||||
msgstr ""
|
||||
"A Calendar modulnak a Date API frissebb verziójára van szüksége. "
|
||||
"Telepíteni kell egy újabb verziót."
|
||||
msgid ""
|
||||
"The Calendar module requires the latest version of the Date API, be "
|
||||
"sure you are installing the latest versions of both modules."
|
||||
msgstr ""
|
||||
"A Naptár modulhoz a Date API legfrissebb változata szükséges. Meg "
|
||||
"kell győződni arról, hogy mindkét modul legfrissebb verziója van "
|
||||
"telepítve."
|
||||
msgid "Views plugin to display views containing dates as Calendars."
|
||||
msgstr ""
|
||||
"Views beépülő, dátumokat és naptárakat tartalmazó nézetek "
|
||||
"megjelenítéséhez."
|
||||
msgid ""
|
||||
"The Date argument in this view must be set up to provide a default "
|
||||
"value set to the current date. Edit the argument, find 'Action to take "
|
||||
"if argument is not present.', choose 'Provide default argument', then "
|
||||
"select 'Current date'."
|
||||
msgstr ""
|
||||
"A Dátum argumentumot ebben a nézetben úgy kell beállítani, hogy "
|
||||
"az alapértelmezett értéke az aktuális dátum legyen. Szerkeszteni "
|
||||
"kell az argumentumot, a „Műveletvégzés, ha az argumentum nincs "
|
||||
"jelen” részben ki kell választani az „Alapértelmezett "
|
||||
"argumentum megadása” beállítást és a „Jelenlegi dátum”-ot "
|
||||
"kell beállítani."
|
||||
msgid "View the calendar."
|
||||
msgstr "A naptár megtekintése."
|
||||
msgid ""
|
||||
"Calendar module cannot be updated until after Views has been updated. "
|
||||
"Please return to <a href=\"@update-php\">update.php</a> and run the "
|
||||
"remaining updates."
|
||||
msgstr ""
|
||||
"A Calendar modult nem lehet frissíteni amíg a Views nincs "
|
||||
"frissítve. Vissza kell térni az <a "
|
||||
"href=\"@update-php\">update.php</a>-hez és lefuttatni a hátralévő "
|
||||
"frissítéseket."
|
||||
msgid ""
|
||||
"calendar.module has updates, but cannot be updated until views.module "
|
||||
"is updated first."
|
||||
msgstr ""
|
||||
"A calendar.modul-hoz frissítések érhetőek el, de nem lehet "
|
||||
"frissíteni a views.modul frissítése előtt."
|
|
@ -1,24 +0,0 @@
|
|||
# Hungarian translation of Calendar (all releases)
|
||||
# Copyright (c) 2009 by the Hungarian translation team
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Calendar (all releases)\n"
|
||||
"POT-Creation-Date: 2009-11-10 16:39+0000\n"
|
||||
"PO-Revision-Date: 2009-10-30 17:25+0000\n"
|
||||
"Language-Team: Hungarian\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
|
||||
msgid "Items"
|
||||
msgstr "Elemek"
|
||||
msgid "Add+"
|
||||
msgstr "Hozzáadás+"
|
||||
msgid "All times"
|
||||
msgstr "Mindig"
|
||||
msgid "Before @time"
|
||||
msgstr "@time előtt"
|
||||
msgid "Empty day"
|
||||
msgstr "Üres nap"
|
|
@ -1,642 +0,0 @@
|
|||
<?php
|
||||
// $Id: content_taxonomy.test,v 1.1.2.6 2009/02/02 13:28:08 mh86 Exp $
|
||||
|
||||
|
||||
/**
|
||||
* Base Class for testing Content Taxonomy
|
||||
* extends the ContentCrudTestCase Class from CCK, which provides many useful helper functions
|
||||
*/
|
||||
class ContentTaxonomyTestCase extends ContentCrudTestCase {
|
||||
|
||||
function setUp() {
|
||||
$args = func_get_args();
|
||||
$modules = array_merge(array("optionwidgets", "content_taxonomy", "content_taxonomy_options", "content_taxonomy_autocomplete"), $args);
|
||||
call_user_func_array(array('parent','setUp'), $modules);
|
||||
$this->loginWithPermissions();
|
||||
$this->acquireContentTypes(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* helper function to create a vocabulary and terms
|
||||
*/
|
||||
function createTerms($count = 1) {
|
||||
$edit['name'] = $this->randomName(200);
|
||||
$edit['hierarchy'] = 2; // Hierarchy 0,1,2
|
||||
$edit['multiple'] = 1; // multiple 0,1
|
||||
$edit['required'] = 0; // required 0,1
|
||||
$edit['relations'] = 0;
|
||||
$edit['tags'] = 1;
|
||||
// exec save function
|
||||
taxonomy_save_vocabulary($edit);
|
||||
$vid = $edit['vid'];
|
||||
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
// create term
|
||||
$termname = $this->randomName(20);
|
||||
$data = array('name' => $termname, 'vid' => $vid);
|
||||
taxonomy_save_term($data);
|
||||
$terms[] = taxonomy_get_term($data['tid']);
|
||||
}
|
||||
return $terms;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* helper assertion function, which checks if the node field array is built correctly
|
||||
*/
|
||||
function assertNodeMultiValues($node, $field_name, $terms_in = array(), $terms_out = array()) {
|
||||
$tids = array();
|
||||
if (is_array($node->{$field_name})) {
|
||||
foreach ($node->{$field_name} as $key => $value) {
|
||||
$tids[$value['value']] = $value['value'];
|
||||
}
|
||||
}
|
||||
foreach ($terms_in as $term) {
|
||||
$this->assertTrue(in_array($term->tid, $tids), 'Term correctly in node field');
|
||||
}
|
||||
|
||||
foreach ($terms_out as $term) {
|
||||
$this->assertTrue(!in_array($term->tid, $tids), 'Term correctly in node field');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Base Class for testing Content Taxonomy,
|
||||
* extends the ContentCrudTestCase Class from CCK, which provides many useful helper functions
|
||||
*/
|
||||
class ContentTaxonomyTest extends ContentTaxonomyTestCase {
|
||||
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Content Taxonomy - Saving'),
|
||||
'description' => t('Tests basic saving'),
|
||||
'group' => t('Content Taxonomy'),
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
|
||||
function testContentTaxonomySaving() {
|
||||
$type = $this->content_types[0];
|
||||
$type_url = str_replace('_', '-', $type->type);
|
||||
|
||||
$terms = $this->createTerms(4);
|
||||
|
||||
$settings = array(
|
||||
'type' => 'content_taxonomy',
|
||||
'widget_type' => 'content_taxonomy_options',
|
||||
'vid' => $terms[0]->vid,
|
||||
'parent' => 0,
|
||||
'parent_php_code' => '',
|
||||
'show_depth' => 0,
|
||||
'save_term_node' => FALSE,
|
||||
'depth' => NULL,
|
||||
'hide_taxonomy_fields' => TRUE,
|
||||
);
|
||||
|
||||
$field = $this->createField($settings, 0);
|
||||
$field_name = $field['field_name'];
|
||||
|
||||
//Check if field get's exposed to the content type
|
||||
$this->drupalGET('node/add/'. $type_url);
|
||||
$this->assertRaw($field_name, 'Field found on content type form');
|
||||
$this->assertRaw($terms[0]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[1]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[2]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[3]->name, 'Option value found on content type form');
|
||||
|
||||
// Create a node with one value selected
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(20);
|
||||
$edit['body'] = $this->randomName(20);
|
||||
$edit[$field_name .'[value]'] = $terms[0]->tid;
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Save');
|
||||
$node = node_load(array('title' => $edit['title']));
|
||||
$in_term_node = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d", $node->nid));
|
||||
$this->assertFalse($in_term_node, "Terms not in term_node table");
|
||||
$this->assertEqual($node->{$field_name}[0]['value'], $terms[0]->tid, 'Terms saved');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[1]->name, 'Term not displayed');
|
||||
|
||||
//Edit the node and select a different value
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]'] = $terms[1]->tid;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$in_term_node = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d", $node->nid));
|
||||
$this->assertFalse($in_term_node, "Terms not in term_node table");
|
||||
$this->assertIdentical($node->{$field_name}[0]['value'], $terms[1]->tid, 'Terms updated');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[0]->name, 'Term not displayed');
|
||||
|
||||
//Edit the node and unselect the value (selecting '- None -').
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]'] = '';
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$in_term_node = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d", $node->nid));
|
||||
$this->assertFalse($in_term_node, "Terms not in term_node table");
|
||||
$this->assertIdentical($node->{$field_name}[0]['value'], NULL, 'Terms deleted');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertNoText($terms[0]->name, 'Terms not displayed');
|
||||
$this->assertNoText($terms[1]->name, 'Terms not displayed');
|
||||
|
||||
|
||||
//CREATE NEW FIELD MULTIPLE
|
||||
$settings['multiple'] = TRUE;
|
||||
$field = $this->createField($settings, 0);
|
||||
$field_name = $field['field_name'];
|
||||
|
||||
//Check if field get's exposed to the content type
|
||||
$this->drupalGET('node/add/'. $type_url);
|
||||
$this->assertRaw($field_name, 'Field found on content type form');
|
||||
$this->assertRaw($terms[0]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[1]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[2]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[3]->name, 'Option value found on content type form');
|
||||
|
||||
// Edit the node and select multiple values.
|
||||
$edit[$field_name .'[value]['. $terms[0]->tid .']'] = $terms[0]->tid;
|
||||
$edit[$field_name .'[value]['. $terms[1]->tid .']'] = $terms[1]->tid;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$in_term_node = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d", $node->nid));
|
||||
$this->assertFalse($in_term_node, "Terms not in term_node table");
|
||||
$tids = array();
|
||||
foreach ($node->{$field_name} as $key => $value) {
|
||||
$tids[$value['value']] = $value['value'];
|
||||
}
|
||||
if (!in_array($terms[0]->tid, $tids) || !in_array($terms[1]->tid, $tids)) {
|
||||
$this->fail("Terms saved");
|
||||
}
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[2]->name, 'Term not displayed');
|
||||
|
||||
//Edit the node and select different values
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]['. $terms[0]->tid .']'] = FALSE;
|
||||
$edit[$field_name.'[value]['. $terms[1]->tid .']'] = $terms[1]->tid;
|
||||
$edit[$field_name.'[value]['. $terms[2]->tid .']'] = $terms[2]->tid;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$in_term_node = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d", $node->nid));
|
||||
$this->assertFalse($in_term_node, "Terms not in term_node table");
|
||||
$tids = array();
|
||||
foreach ($node->{$field_name} as $key => $value) {
|
||||
$tids[$value['value']] = $value['value'];
|
||||
}
|
||||
if (!in_array($terms[2]->tid, $tids) || !in_array($terms[1]->tid, $tids)) {
|
||||
$this->fail("Terms updated");
|
||||
}
|
||||
if (in_array($terms[0]->tid, $tids)) {
|
||||
$this->fail("Terms updated");
|
||||
}
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
$this->assertText($terms[2]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[0]->name, 'Term1 not displayed');
|
||||
|
||||
//Edit the node and unselect values
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]['. $terms[1]->tid .']'] = FALSE;
|
||||
$edit[$field_name.'[value]['. $terms[2]->tid .']'] = FALSE;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$in_term_node = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d", $node->nid));
|
||||
$this->assertFalse($in_term_node, "Terms not in term_node table");
|
||||
$tids = array();
|
||||
foreach ($node->{$field_name} as $key => $value) {
|
||||
$tids[$value['value']] = $value['value'];
|
||||
}
|
||||
if (in_array($terms[2]->tid, $tids) || in_array($terms[1]->tid, $tids) || in_array($terms[0]->tid, $tids)) {
|
||||
$this->fail("Terms deleted");
|
||||
}
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertNoText($terms[1]->name, 'Terms not displayed');
|
||||
$this->assertNoText($terms[2]->name, 'Terms not displayed');
|
||||
$this->assertNoText($terms[0]->name, 'Terms not displayed');
|
||||
|
||||
|
||||
/**
|
||||
* Tests Saving in Term Node
|
||||
*/
|
||||
$ct = $this->content_types[1];
|
||||
$ct_url = str_replace('_', '-', $ct->type);
|
||||
|
||||
$settings['save_term_node'] = TRUE;
|
||||
$settings['multiple'] = FALSE;
|
||||
|
||||
//$terms = $this->createTerms(4);
|
||||
$field = $this->createField($settings, 1);
|
||||
$field_name = $field['field_name'];
|
||||
|
||||
//Check if field get's exposed to the content type
|
||||
$this->drupalGET('node/add/'. $ct_url);
|
||||
$this->assertRaw($field_name, 'Field found on content type form');
|
||||
$this->assertRaw($terms[0]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[1]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[2]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[3]->name, 'Option value found on content type form');
|
||||
|
||||
// Create a node with one value selected
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(20);
|
||||
$edit['body'] = $this->randomName(20);
|
||||
$edit[$field_name .'[value]'] = $terms[0]->tid;
|
||||
$this->drupalPost('node/add/'. $ct_url, $edit, 'Save');
|
||||
$node = node_load(array('title' => $edit['title']));
|
||||
$in_term_node = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d", $node->nid));
|
||||
$this->assertEqual($in_term_node, $terms[0]->tid, "Terms saved in term_node table");
|
||||
$this->assertEqual($node->{$field_name}[0]['value'], $terms[0]->tid, 'Terms saved');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[1]->name, 'Term not displayed');
|
||||
|
||||
//Edit the node and select a different value
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]'] = $terms[1]->tid;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$in_term_node = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d", $node->nid));
|
||||
$this->assertEqual($in_term_node, $terms[1]->tid, "Terms updated in term_node table");
|
||||
$this->assertEqual($node->{$field_name}[0]['value'], $terms[1]->tid, 'Terms updated');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[0]->name, 'Term not displayed');
|
||||
|
||||
//Edit the node and unselect the value (selecting '- None -').
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]'] = '';
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$in_term_node = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d", $node->nid));
|
||||
$this->assertFalse($in_term_node, "Terms deleted from term_node table");
|
||||
$this->assertIdentical($node->{$field_name}[0]['value'], NULL, 'Terms deleted');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertNoText($terms[0]->name, 'Terms not displayed');
|
||||
$this->assertNoText($terms[1]->name, 'Terms not displayed');
|
||||
|
||||
//CREATE NEW FIELD MULTIPLE
|
||||
$settings['multiple'] = TRUE;
|
||||
$field = $this->createField($settings, 1);
|
||||
$field_name = $field['field_name'];
|
||||
|
||||
//Check if field get's exposed to the content type
|
||||
$this->drupalGET('node/add/'. $ct_url);
|
||||
$this->assertRaw($field_name, 'Field found on content type form');
|
||||
$this->assertRaw($terms[0]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[1]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[2]->name, 'Option value found on content type form');
|
||||
$this->assertRaw($terms[3]->name, 'Option value found on content type form');
|
||||
|
||||
// Edit the node and select multiple values.
|
||||
$edit[$field_name .'[value]['. $terms[0]->tid .']'] = $terms[0]->tid;
|
||||
$edit[$field_name .'[value]['. $terms[1]->tid .']'] = $terms[1]->tid;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$in_term_node1 = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d AND tid = %d", $node->nid, $terms[0]->tid));
|
||||
$this->assertEqual($in_term_node1, $terms[0]->tid, "Terms updated in term_node table");
|
||||
$in_term_node2 = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d AND tid = %d", $node->nid, $terms[1]->tid));
|
||||
$this->assertEqual($in_term_node2, $terms[1]->tid, "Terms updated in term_node table");
|
||||
$this->assertNodeMultiValues($node, $field_name, array($terms[0], $terms[1]));
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[2]->name, 'Term not displayed');
|
||||
|
||||
//Edit the node and select different values
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]['. $terms[0]->tid .']'] = FALSE;
|
||||
$edit[$field_name.'[value]['. $terms[1]->tid .']'] = $terms[1]->tid;
|
||||
$edit[$field_name.'[value]['. $terms[2]->tid .']'] = $terms[2]->tid;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$in_term_node = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d AND tid = %d", $node->nid, $terms[0]->tid));
|
||||
$this->assertFalse($in_term_node, "Term deleted term_node table");
|
||||
$in_term_node3 = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d AND tid = %d", $node->nid, $terms[2]->tid));
|
||||
$this->assertEqual($in_term_node3, $terms[2]->tid, "Terms updated in term_node table");
|
||||
$in_term_node2 = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d AND tid = %d", $node->nid, $terms[1]->tid));
|
||||
$this->assertEqual($in_term_node2, $terms[1]->tid, "Terms updated in term_node table");
|
||||
$this->assertNodeMultiValues($node, $field_name, array($terms[1], $terms[2]), array($terms[0]));
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
$this->assertText($terms[2]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[0]->name, 'Term1 not displayed');
|
||||
|
||||
//Edit the node and unselect values
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]['. $terms[1]->tid .']'] = FALSE;
|
||||
$edit[$field_name.'[value]['. $terms[2]->tid .']'] = FALSE;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$in_term_node1 = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d AND tid = %d", $node->nid, $terms[0]->tid));
|
||||
$this->assertFalse($in_term_node1, "Term deleted term_node table");
|
||||
$in_term_node2 = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d AND tid = %d", $node->nid, $terms[1]->tid));
|
||||
$this->assertFalse($in_term_node2, "Term deleted term_node table");
|
||||
$in_term_node3 = db_result(db_query("SELECT tid FROM {term_node} WHERE nid = %d AND tid = %d", $node->nid, $terms[2]->tid));
|
||||
$this->assertFalse($in_term_node3, "Term deleted term_node table");
|
||||
$this->assertNodeMultiValues($node, $field_name, array(), array($terms[0], $terms[1], $terms[2]));
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertNoText($terms[1]->name, 'Terms not displayed');
|
||||
$this->assertNoText($terms[2]->name, 'Terms not displayed');
|
||||
$this->assertNoText($terms[0]->name, 'Terms not displayed');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test Cases for Content Taxonomy Autocomplete
|
||||
*/
|
||||
class ContentTaxonomyAutocompleteTest extends ContentTaxonomyTestCase {
|
||||
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Content Taxonomy - Autocomplete'),
|
||||
'description' => t('Tests freetagging widget'),
|
||||
'group' => t('Content Taxonomy'),
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp("diff");
|
||||
}
|
||||
|
||||
function testAutocomplete() {
|
||||
$type = $this->content_types[1];
|
||||
$type_url = str_replace('_', '-', $type->type);
|
||||
$terms = $this->createTerms(4);
|
||||
|
||||
//single field
|
||||
$settings = array(
|
||||
'type' => 'content_taxonomy',
|
||||
'widget_type' => 'content_taxonomy_autocomplete',
|
||||
'vid' => $terms[0]->vid,
|
||||
'parent' => 0,
|
||||
'parent_php_code' => '',
|
||||
'show_depth' => 0,
|
||||
'save_term_node' => FALSE,
|
||||
'depth' => NULL,
|
||||
'hide_taxonomy_fields' => TRUE,
|
||||
);
|
||||
|
||||
$field = $this->createField($settings, 1);
|
||||
$field_name = $field['field_name'];
|
||||
|
||||
// Create a node with one value
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(20);
|
||||
$edit['body'] = $this->randomName(20);
|
||||
$edit[$field_name .'[value]'] = $terms[0]->name;
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Save');
|
||||
$node = node_load(array('title' => $edit['title']));
|
||||
$this->assertEqual($node->{$field_name}[0]['value'], $terms[0]->tid, 'Terms saved');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[1]->name, 'Term not displayed');
|
||||
|
||||
//Edit the node and select a different value
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]'] = $terms[1]->name;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$this->assertIdentical($node->{$field_name}[0]['value'], $terms[1]->tid, 'Terms updated');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[0]->name, 'Term not displayed');
|
||||
|
||||
//Edit the node and select 2 values for single field
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]'] = $terms[1]->name .", ". $terms[0]->name;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$this->assertText('You can provide only one value', 'Validated');
|
||||
$edit[$field_name.'[value]'] = $terms[1]->name;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$this->assertIdentical($node->{$field_name}[0]['value'], $terms[1]->tid, 'Terms updated');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[0]->name, 'Term not displayed');
|
||||
|
||||
//Add a new term
|
||||
$edit = array();
|
||||
$new_term_name = 'test';
|
||||
$edit['title'] = $this->randomName(20);
|
||||
$edit['body'] = $this->randomName(20);
|
||||
$edit[$field_name .'[value]'] = $new_term_name;
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Save');
|
||||
$new_term_tid = db_result(db_query("SELECT tid FROM {term_data} WHERE name = '%s' AND vid = %d", $new_term_name, $settings['vid']));
|
||||
$this->assertTrue(($new_term_tid > 0), "New term added to vocabulary");
|
||||
$node = node_load(array('title' => $edit['title']));
|
||||
$this->assertEqual($node->{$field_name}[0]['value'], $new_term_tid, 'Terms saved');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($new_term_name, 'Terms displayed');
|
||||
|
||||
//test Multi Field
|
||||
$type = $this->content_types[0];
|
||||
$type_url = str_replace('_', '-', $type->type);
|
||||
|
||||
//multi field
|
||||
$settings = array(
|
||||
'type' => 'content_taxonomy',
|
||||
'widget_type' => 'content_taxonomy_autocomplete',
|
||||
'vid' => $terms[0]->vid,
|
||||
'parent' => 0,
|
||||
'parent_php_code' => '',
|
||||
'show_depth' => 0,
|
||||
'save_term_node' => FALSE,
|
||||
'depth' => NULL,
|
||||
'hide_taxonomy_fields' => TRUE,
|
||||
'multiple' => TRUE,
|
||||
);
|
||||
|
||||
|
||||
$field = $this->createField($settings, 0);
|
||||
$field_name = $field['field_name'];
|
||||
|
||||
// Create a node with one value
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(20);
|
||||
$edit['body'] = $this->randomName(20);
|
||||
$edit[$field_name .'[value]'] = $terms[0]->name;
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Save');
|
||||
$node = node_load(array('title' => $edit['title']));
|
||||
$this->assertNodeMultiValues($node, $field_name, array($terms[0]));
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[1]->name, 'Term not displayed');
|
||||
|
||||
//Edit the node and select a different value
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]'] = $terms[1]->name;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$this->assertNodeMultiValues($node, $field_name, array($terms[1]), array($terms[0]));
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[0]->name, 'Term not displayed');
|
||||
|
||||
//Edit the node and select a second value
|
||||
$edit = array();
|
||||
$edit[$field_name.'[value]'] = $terms[1]->name .", ". $terms[0]->name;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$this->assertNodeMultiValues($node, $field_name, array($terms[0], $terms[1]));
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');
|
||||
|
||||
// Create a node with one value and test preview
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(20);
|
||||
$edit['body'] = $this->randomName(20);
|
||||
$edit[$field_name .'[value]'] = $terms[0]->name;
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Preview');
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Save');
|
||||
$node = node_load(array('title' => $edit['title']));
|
||||
$this->assertNodeMultiValues($node, $field_name, array($terms[0]));
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');
|
||||
|
||||
// Create a node with one value and test preview with a new term
|
||||
$new_term_name = 'test2';
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(20);
|
||||
$edit['body'] = $this->randomName(20);
|
||||
$edit[$field_name .'[value]'] = $new_term_name;
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Preview');
|
||||
$new_term_tid = db_result(db_query("SELECT tid FROM {term_data} WHERE name = '%s' AND vid = %d", $new_term_name, $settings['vid']));
|
||||
$this->assertTrue(($new_term_tid > 0), "Term in added to vocabulary");
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Save');
|
||||
$node = node_load(array('title' => $edit['title']));
|
||||
$this->assertNodeMultiValues($node, $field_name, array(taxonomy_get_term($new_term_tid)));
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($new_term_name, 'Terms displayed');
|
||||
|
||||
// Create a node with one value and test preview diff
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(20);
|
||||
$edit['body'] = $this->randomName(20);
|
||||
$edit[$field_name .'[value]'] = $terms[0]->name;
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Save');
|
||||
$node = node_load(array('title' => $edit['title']));
|
||||
|
||||
$edit = array();
|
||||
$edit['title'] = $node->title;
|
||||
$edit['body'] = str_replace('<!--break-->', '', $node->body);
|
||||
$edit[$field_name .'[value]'] = $terms[0]->name;
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Preview changes');
|
||||
$this->assertText('No visible changes', 'No visible changes');
|
||||
$this->assertRaw($terms[0]->name, 'Term in field');
|
||||
/* $this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$this->assertNodeMultiValues($node, $field_name, array($terms[0]));
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');*/
|
||||
|
||||
//CREATE NEW REQUIRED FIELD
|
||||
$settings['required'] = TRUE;
|
||||
$field = $this->createField($settings, 0);
|
||||
$field_name = $field['field_name'];
|
||||
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(20);
|
||||
$edit['body'] = $this->randomName(20);
|
||||
$edit[$field_name.'[value]'] = '';
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Save');
|
||||
$this->assertText($field_name .' field is required', 'Validated required field');
|
||||
$edit[$field_name.'[value]'] = $terms[1]->name;
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Save');
|
||||
$this->assertNoText($field_name .' field is required', 'Validation for required field successfully passed');
|
||||
$node = node_load(array('title' => $edit['title']));
|
||||
$this->assertNodeMultiValues($node, $field_name, array($terms[1]));
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[1]->name, 'Terms displayed');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Cases for Content Taxonomy Autocomplete
|
||||
*/
|
||||
class ContentTaxonomyAutocompletePermissionsTest extends ContentTaxonomyTestCase {
|
||||
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Content Taxonomy - Autocomplete with Permissions'),
|
||||
'description' => t('Tests freetagging widget with content permissions'),
|
||||
'group' => t('Content Taxonomy'),
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp("content_permissions");
|
||||
}
|
||||
|
||||
function testAutocomplete() {
|
||||
$type = $this->content_types[1];
|
||||
$type_url = str_replace('_', '-', $type->type);
|
||||
$terms = $this->createTerms(4);
|
||||
|
||||
//single field
|
||||
$settings = array(
|
||||
'type' => 'content_taxonomy',
|
||||
'widget_type' => 'content_taxonomy_autocomplete',
|
||||
'vid' => $terms[0]->vid,
|
||||
'parent' => 0,
|
||||
'parent_php_code' => '',
|
||||
'show_depth' => 0,
|
||||
'save_term_node' => FALSE,
|
||||
'depth' => NULL,
|
||||
'hide_taxonomy_fields' => TRUE,
|
||||
);
|
||||
|
||||
$field = $this->createField($settings, 1);
|
||||
$field_name = $field['field_name'];
|
||||
|
||||
$permissions = array('edit '. $field_name, 'view '. $field_name);
|
||||
$rids = db_query("SELECT rid FROM {role}");
|
||||
while($obj = db_fetch_object($rids)) {
|
||||
db_query("INSERT INTO {permission} (rid, perm) VALUES (%d, '%s')", $obj->rid, implode(', ', $permissions));
|
||||
}
|
||||
|
||||
// Create a node with one value with edit permissions
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(20);
|
||||
$edit['body'] = $this->randomName(20);
|
||||
$edit[$field_name .'[value]'] = $terms[0]->name;
|
||||
$this->drupalPost('node/add/'. $type_url, $edit, 'Save');
|
||||
$node = node_load(array('title' => $edit['title']));
|
||||
$this->assertEqual($node->{$field_name}[0]['value'], $terms[0]->tid, 'Terms saved');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');
|
||||
$this->assertNoText($terms[1]->name, 'Term not displayed');
|
||||
|
||||
//delete edit field perm
|
||||
$permissions_old = array('edit '. $field_name, 'view '. $field_name);
|
||||
$permissions_new = array('view '. $field_name);
|
||||
$rids = db_query("SELECT rid FROM {role}");
|
||||
while($obj = db_fetch_object($rids)) {
|
||||
db_query("DELETE FROM {permission WHERE rid = %d AND perm = '%s'", $obj->rid, implode(', ', $permissions_old));
|
||||
db_query("INSERT INTO {permission} (rid, perm) VALUES (%d, '%s')", $obj->rid, implode(', ', $permissions_new));
|
||||
}
|
||||
|
||||
//Edit the node, but without perm
|
||||
$edit = array();
|
||||
$this->drupalPost('node/'. $node->nid .'/edit', $edit, 'Save');
|
||||
$this->drupalGet('node/'. $node->nid .'/edit');
|
||||
$this->assertNoRaw($field_name, "Field hidden");
|
||||
$node = node_load($node->nid, NULL, TRUE);
|
||||
$this->assertIdentical($node->{$field_name}[0]['value'], $terms[0]->tid, 'Terms saved');
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($terms[0]->name, 'Terms displayed');
|
||||
}
|
||||
}
|
|
@ -1,298 +0,0 @@
|
|||
# $Id: fr.po,v 1.1.2.1 2009/04/07 10:52:21 slybud Exp $
|
||||
#
|
||||
# French translation of Drupal (general)
|
||||
# Copyright YEAR NAME <EMAIL@ADDRESS>
|
||||
# Generated from files:
|
||||
# content_taxonomy.module,v 1.2.2.15.2.17 2009/02/02 18:07:50 mh86
|
||||
# content_taxonomy_autocomplete.module,v 1.2.2.4.2.12 2009/02/02 17:26:38 mh86
|
||||
# content_taxonomy_options.module,v 1.1.4.7.2.4 2008/12/27 11:25:27 mh86
|
||||
# content_taxonomy_tree.module,v 1.1.2.4 2008/08/20 16:54:36 mh86
|
||||
# content_taxonomy.info,v 1.1.2.2.2.1 2008/04/30 08:05:19 mh86
|
||||
# content_taxonomy_autocomplete.info,v 1.1.2.4.2.1 2008/04/30 08:05:19 mh86
|
||||
# content_taxonomy_options.info,v 1.1.2.5.2.1 2008/04/30 08:05:19 mh86
|
||||
# content_taxonomy_tree.info,v 1.1.2.1 2008/04/30 08:05:19 mh86
|
||||
# includes/content_taxonomy.token.inc: n/a
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: french translation for drupal6 content_taxonomy module\n"
|
||||
"POT-Creation-Date: 2009-04-07 11:50+0200\n"
|
||||
"PO-Revision-Date: 2009-04-07 12:48+0100\n"
|
||||
"Last-Translator: Sylvain Moreau <sylvain.moreau@ows.fr>\n"
|
||||
"Language-Team: Sylvain Moreau, OWS <sylvain.moreau@ows.fr>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n>1);\n"
|
||||
|
||||
#: content_taxonomy.module:16
|
||||
msgid "Defines a CCK field type for referencing taxonomy terms. The fields are independent from vocabulary settings and can be configured through the CCK admin field pages. The Content Taxonomy Module provides different widget types, at the moment including Option Widgets (Radios / Checkboxes, Selects), Autocompletes, Tree). The widget modules have to be enabled separately."
|
||||
msgstr "Définit un type de champ CCK pour référencer les termes de taxonomie. Les champs sont indépendant des paramètres de vocabulaire et peuvent être configurés par les pages d'admin du champ CCK. Le module Content Taxonomy fournit différents types de widget, incluant pour le moment les Widgets Option (Boutons Radio/Cases à Cocher, Listes déroulantes), AutoComplétion et Arborescence. Les modules de wisget doivent être activés séparément."
|
||||
|
||||
#: content_taxonomy.module:49
|
||||
msgid "Content Taxonomy Fields"
|
||||
msgstr "Content Taxonomy Fields"
|
||||
|
||||
#: content_taxonomy.module:50
|
||||
msgid "Stores terms for nodes in the database."
|
||||
msgstr "Stocke des termes pour les noeuds dans la base de données."
|
||||
|
||||
#: content_taxonomy.module:69
|
||||
msgid "Save values additionally to the core taxonomy system (into the 'term_node' table)."
|
||||
msgstr "Enregistrer les valeurs en plus dans le système core de taxonomie (dans la table 'term_node')."
|
||||
|
||||
#: content_taxonomy.module:71
|
||||
msgid "If this option is set, saving of terms is additionally handled by the taxonomy module. So saved terms from Content Taxonomy fields will appear as any other terms saved by the core taxonomy module. Set this option if you are using any other taxonomy application, like tagadelic. Otherwise terms are only saved in the cck tables and can only be accessed via the node or a view"
|
||||
msgstr "Si cette option est activée, l'enregistrement des termes est géré en plus par le module taxonomy. Ainsi, les termes enregistrés dans les champs Content Taxonomy apparaîtront comme n'importe quels autres termes enregistrées par le module taxonomy. Activez cette option si vous utilisez d'autres appicatifs de taxonomie, tel que tagadelic. Dans le cas contraire, les termes sont uniquement enregistrés dans les tables cck, et ne peuvent être accessibles qu'au travers du noeud ou d'une vue."
|
||||
|
||||
#: content_taxonomy.module:80
|
||||
msgid "Vocabulary"
|
||||
msgstr "Vocabulaire"
|
||||
|
||||
#: content_taxonomy.module:84
|
||||
msgid "Terms of the selected vocabulary get exposed to the field"
|
||||
msgstr "Les termes du vocabulaire sélectionné sont exposés dans le champ"
|
||||
|
||||
#: content_taxonomy.module:89
|
||||
msgid "Advanced settings for hierarchical vocabularies"
|
||||
msgstr "Paramètres avancés pour des vocabulaires hiérarchiques"
|
||||
|
||||
#: content_taxonomy.module:94
|
||||
msgid "Parent Term"
|
||||
msgstr "Terme Parent"
|
||||
|
||||
#: content_taxonomy.module:98
|
||||
msgid "If any term is selected here, only child terms of the selected are going to be exposed the field. Otherwise the whole vocabulary selected above"
|
||||
msgstr "Si un terme est sélectionné ici, seuls les termes enfants de celui-ci seront exposés dans le filtre. Autrement, le vocabulaire complet sélectionné ci-dessus"
|
||||
|
||||
#: content_taxonomy.module:102
|
||||
msgid "Advanced PHP code"
|
||||
msgstr "code PHP avancé"
|
||||
|
||||
#: content_taxonomy.module:107
|
||||
msgid "PHP Code for selecting the parent term"
|
||||
msgstr "Code PHP pour la sélection du terme parent"
|
||||
|
||||
#: content_taxonomy.module:111
|
||||
msgid "Advanced usage only: PHP code that returns the parent term ID. Should not include <?php ?> delimiters. If this field is filled out, the ID returned by this code will override the selected parent above."
|
||||
msgstr "Usage avancé uniquement : code PHP retournant l'ID du terme parent. Ne doit pas contenir les délimiteurs <?php ?>. Si ce champ est rempli, l'ID retourné par ce code remplacera le parent sélectionné ci-dessus."
|
||||
|
||||
#: content_taxonomy.module:116
|
||||
msgid "Depth of taxonomy tree"
|
||||
msgstr "Profondeur de l'arbre de taxonomie"
|
||||
|
||||
#: content_taxonomy.module:118
|
||||
msgid "By setting a numeric value, the depth of the hierarchy shown can be limited. Leave this field blank to show the whole hierarchy."
|
||||
msgstr "En définissant une valeur numérique, la profondeur de la hiérarchie affichée peut être limitée. Laissez ce champ vide pour afficher la hiérarchie complète."
|
||||
|
||||
#: content_taxonomy.module:141
|
||||
msgid "@field-title term"
|
||||
msgstr "Terme @field-title"
|
||||
|
||||
#: content_taxonomy.module:198
|
||||
msgid "As Text"
|
||||
msgstr "En tant que Texte"
|
||||
|
||||
#: content_taxonomy.module:203
|
||||
msgid "As Link"
|
||||
msgstr "En tant que Lien"
|
||||
|
||||
#: content_taxonomy.module:354;362
|
||||
msgid "content"
|
||||
msgstr "contenu"
|
||||
|
||||
#: content_taxonomy.module:354
|
||||
msgid "Deleted field %field_name and its data."
|
||||
msgstr "Le champ %field_name et ses données ont été supprimés."
|
||||
|
||||
#: content_taxonomy.module:362
|
||||
msgid "Entries with term id = %tid have been deleted out of %table for field %field_name."
|
||||
msgstr "Les enregistrements avec l'id de terme = %tid ont été supprimés de la table %table pour le champ %field_name."
|
||||
|
||||
#: content_taxonomy.module:0
|
||||
msgid "content_taxonomy"
|
||||
msgstr "content_taxonomy"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:40
|
||||
msgid "Autocomplete (Freetagging)"
|
||||
msgstr "Autocomplétion (Étiquetage libre/Freetagging)"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:59
|
||||
msgid "Settings for Autocompletes"
|
||||
msgstr "Paramètres pour les Autocomplétions"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:65
|
||||
msgid "Freetagging settings"
|
||||
msgstr "Paramètres d'Etiquetage libre (Freetagging)"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:67
|
||||
msgid "Allow and insert new terms by the user into the vocabulary"
|
||||
msgstr "Autoriser et insérer de nouveaux termes par l'utilisateur dans le vocabulaire"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:68
|
||||
msgid "Deny any new terms"
|
||||
msgstr "Refuser tout nouveau terme"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:73
|
||||
msgid "Extra Parent for new terms"
|
||||
msgstr "Extra Parent pour les nouveaux termes"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:76
|
||||
msgid "This setting is only relevant if you have selected \"Allow and insert new terms by the user into the vocabulary\". If you select any term here, new terms will get children of the selected one, otherwise new terms get children of the parent term (root, if no parent selected) selected in the global settings."
|
||||
msgstr "Ce paramètre n'est significatif que si vous avez sélectionné \"Autoriser et insérer de nouveaux termes par l'utilisateur dans le vocabulaire\". Si vous sélectionner un terme ici, les nouveaux termes seront des enfants de celui-ci, sinon les nouveaux termes seront des enfants du terme parent (racine, si aucun parent sélectionné) sélectionné dans les paramètres globaux."
|
||||
|
||||
#: content_taxonomy_autocomplete.module:81
|
||||
msgid "Maximum length of autocomplete"
|
||||
msgstr "Longueur maximale de l'autocomplétion"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:85
|
||||
msgid "Defines how many characters can be typed into the autocomplete field. For values higher than 255, remember that one term name can not be longer than 255 (would be cutted), nevertheless it's not a problem for multiple values, separated by commas."
|
||||
msgstr "Définit combien de caractères peuvent être tapés dans le champ a autocomplétion. Pour des valeurs supérieures à 255, souvenez-vous qu'un nom de terme ne peut être plus long que 255 caractères (il sera coupé), cependant, ceci ne constitue pas un problème pour des valeurs multiples, séparées par des virgules."
|
||||
|
||||
#: content_taxonomy_autocomplete.module:97
|
||||
msgid "\"Maximum length\" must be a positive integer."
|
||||
msgstr "\"Longueur maximale\" doit être un entier positif."
|
||||
|
||||
#: content_taxonomy_autocomplete.module:214
|
||||
msgid "You can provide only one value"
|
||||
msgstr "Vous ne pouvez fournir qu'une seule valeur"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:219
|
||||
msgid "New tags are not allowed"
|
||||
msgstr "Les nouveaux tags ne sont pas autorisés"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:26
|
||||
msgid "Autocomplete"
|
||||
msgstr "Autocomplétion"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:0
|
||||
msgid "content_taxonomy_autocomplete"
|
||||
msgstr "content_taxonomy_autocomplete"
|
||||
|
||||
#: content_taxonomy_options.module:27
|
||||
msgid "Checkboxes/Radios"
|
||||
msgstr "Cases à cocher/Boutons Radio"
|
||||
|
||||
#: content_taxonomy_options.module:35
|
||||
msgid "Select List"
|
||||
msgstr "Liste Déroulante"
|
||||
|
||||
#: content_taxonomy_options.module:54
|
||||
msgid "Settings for Options"
|
||||
msgstr "Paramètres des Options"
|
||||
|
||||
#: content_taxonomy_options.module:60
|
||||
msgid "Indent child terms with ' - ' signs"
|
||||
msgstr "Indenter les termes enfants avec des signes ' - '"
|
||||
|
||||
#: content_taxonomy_options.module:62
|
||||
msgid "If this option is checked, a hierarchy gets visualized by indenting child terms, otherwise it's a flat list"
|
||||
msgstr "Si cette option est cochée, une hiérarchie est rendue visuelle par l'indentation des termes enfants, sinon ce sera une liste à plat"
|
||||
|
||||
#: content_taxonomy_options.module:65
|
||||
msgid "Parent term for OptGroups in select fields"
|
||||
msgstr "Terme parent pour les Groupes d'Options (OptGroups) dans les champs menu déroulant"
|
||||
|
||||
#: content_taxonomy_options.module:69
|
||||
msgid "This settings applies only for select fields. Select a parent term containg the grouping terms. Grouping terms should be parents of the selected terms (from the Global Settings)."
|
||||
msgstr "Ce paramètre s'applique uniquement pour les champs liste déroulante. Sélectionner un terme parent contenant les termes à grouper. Les termes à grouper doivent être parents des termes sélectionnés (dans la partie Paramètres Globaux)"
|
||||
|
||||
#: content_taxonomy_options.module:95
|
||||
msgid "N/A"
|
||||
msgstr "N/A"
|
||||
|
||||
#: content_taxonomy_options.module:97
|
||||
msgid "- None -"
|
||||
msgstr "- Aucun -"
|
||||
|
||||
#: content_taxonomy_options.module:0
|
||||
msgid "content_taxonomy_options"
|
||||
msgstr "content_taxonomy_options"
|
||||
|
||||
#: content_taxonomy_tree.module:24
|
||||
msgid "Tree"
|
||||
msgstr "Arborescence"
|
||||
|
||||
#: content_taxonomy_tree.module:43
|
||||
msgid "Settings for Trees"
|
||||
msgstr "Paramètres pour les Arborescences"
|
||||
|
||||
#: content_taxonomy_tree.module:49
|
||||
msgid "Expand whole tree by default"
|
||||
msgstr "Dérouler l'arborescence complète par défaut"
|
||||
|
||||
#: content_taxonomy_tree.module:51
|
||||
msgid "Otherwise only branches, where a term is selected get expanded by default"
|
||||
msgstr "Sinon, seules les branches où un terme est sélectionné sont déroulées par défaut"
|
||||
|
||||
#: content_taxonomy_tree.module:153
|
||||
msgid "!name field is required."
|
||||
msgstr "Le champ !name est obligatoire."
|
||||
|
||||
#: content_taxonomy_tree.module:0
|
||||
msgid "content_taxonomy_tree"
|
||||
msgstr "content_taxonomy_tree"
|
||||
|
||||
#: content_taxonomy.info:0
|
||||
msgid "Content Taxonomy"
|
||||
msgstr "Content Taxonomy"
|
||||
|
||||
#: content_taxonomy.info:0
|
||||
msgid "Defines a field type for taxonomy terms"
|
||||
msgstr "Définit un type de champ pour les termes de taxonomie"
|
||||
|
||||
#: content_taxonomy.info:0
|
||||
#: content_taxonomy_autocomplete.info:0
|
||||
#: content_taxonomy_options.info:0
|
||||
#: content_taxonomy_tree.info:0
|
||||
msgid "CCK"
|
||||
msgstr "CCK"
|
||||
|
||||
#: content_taxonomy_autocomplete.info:0
|
||||
msgid "Content Taxonomy Autocomplete"
|
||||
msgstr "Content Taxonomy Autocomplete"
|
||||
|
||||
#: content_taxonomy_autocomplete.info:0
|
||||
msgid "Defines a autocomplete widget type for content_taxonomy"
|
||||
msgstr "Définit un type de widget à autocomplétion pour content_taxonomy"
|
||||
|
||||
#: content_taxonomy_options.info:0
|
||||
msgid "Content Taxonomy Options"
|
||||
msgstr "Content Taxonomy Options"
|
||||
|
||||
#: content_taxonomy_options.info:0
|
||||
msgid "Defines a option widget type for content_taxonomy for selects, radios/checkboxes"
|
||||
msgstr "Définit un type de widget option pour content_taxonomy pour les listes déroulantes, les boutons radio et les cases à cocher"
|
||||
|
||||
#: content_taxonomy_tree.info:0
|
||||
msgid "Content Taxonomy Tree"
|
||||
msgstr "Content Taxonomy Tree"
|
||||
|
||||
#: content_taxonomy_tree.info:0
|
||||
msgid "Defines a dynamic tree widget for Content Taxonomy"
|
||||
msgstr "Définit un widget arborescence dynamique pour Content Taxonomy"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:10
|
||||
msgid "Name of top taxonomy term"
|
||||
msgstr "Nom du terme de taxonomie le plus haut"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:11
|
||||
msgid "ID of top taxonomy term"
|
||||
msgstr "ID du terme de taxonomie le plus haut"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:12
|
||||
msgid "Names of all taxonomy terms separated by commas"
|
||||
msgstr "Noms de tous les termes de taxonomie, séparés par des virgules"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:13
|
||||
msgid "IDs of all taxonomy terms separated by commas"
|
||||
msgstr "IDs de tous les termes de taxonomie, séparés par des virgules"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:14
|
||||
msgid "Name of terms vocabulary"
|
||||
msgstr "Nom du vocabulaire des termes"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:15
|
||||
msgid "ID of terms vocabulary"
|
||||
msgstr "ID du vocabulaire des termes"
|
||||
|
|
@ -1,413 +0,0 @@
|
|||
# Hungarian translation of content_taxonomy (6.x-1.0-rc1)
|
||||
# Copyright (c) 2009 by the Hungarian translation team
|
||||
# Generated from files:
|
||||
# content_taxonomy_tree.module,v 1.1.2.5 2009/05/14 16:58:22 mh86
|
||||
# content_taxonomy.module,v 1.2.2.15.2.23 2009/05/14 14:03:11 mh86
|
||||
# content_taxonomy_options.module,v 1.1.4.7.2.4 2008/12/27 11:25:27 mh86
|
||||
# content_taxonomy/includes/content_taxonomy.token.inc: n/a
|
||||
# content_taxonomy_autocomplete.module,v 1.2.2.4.2.15 2009/05/14 17:10:13 mh86
|
||||
# content_taxonomy.info,v 1.1.2.2.2.1 2008/04/30 08:05:19 mh86
|
||||
# content_taxonomy_autocomplete.info,v 1.1.2.4.2.1 2008/04/30 08:05:19 mh86
|
||||
# content_taxonomy_options.info,v 1.1.2.5.2.1 2008/04/30 08:05:19 mh86
|
||||
# content_taxonomy_tree.info,v 1.1.2.1 2008/04/30 08:05:19 mh86
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: content_taxonomy (6.x-1.0-rc1)\n"
|
||||
"POT-Creation-Date: 2009-05-16 15:49+0200\n"
|
||||
"PO-Revision-Date: 2009-05-15 09:43+0200\n"
|
||||
"Last-Translator: Balogh Zoltán\n"
|
||||
"Language-Team: Hungarian http://forditas.mindworks.hu\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
|
||||
#: content_taxonomy_tree.module:154
|
||||
msgid "!name field is required."
|
||||
msgstr "!name mező nincs kitöltve."
|
||||
|
||||
#: content_taxonomy.module:377,390
|
||||
msgid "content"
|
||||
msgstr "tartalom"
|
||||
|
||||
#: content_taxonomy_options.module:97
|
||||
msgid "- None -"
|
||||
msgstr "- Nincs -"
|
||||
|
||||
#: content_taxonomy_options.module:95
|
||||
msgid "N/A"
|
||||
msgstr "Nincs adat"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:10
|
||||
msgid "Name of top taxonomy term"
|
||||
msgstr "Legelső taxonómiakifejezés neve"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:11
|
||||
msgid "Unfiltered name of top taxonomy term. WARNING - raw user input."
|
||||
msgstr ""
|
||||
"A legelső taxonómiakifejezés szűretlen neve. Figyelem - nyers "
|
||||
"felhasználói bevitel."
|
||||
|
||||
#: includes/content_taxonomy.token.inc:12
|
||||
msgid "ID of top taxonomy term"
|
||||
msgstr "A legelső taxonómiakifejezés azonosítója"
|
||||
|
||||
#: content_taxonomy.module:81
|
||||
msgid "Vocabulary"
|
||||
msgstr "Szótár"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:26
|
||||
msgid "Autocomplete"
|
||||
msgstr "Automatikus kiegészítés"
|
||||
|
||||
#: content_taxonomy.info:0; content_taxonomy_autocomplete.info:0; content_taxonomy_options.info:0; content_taxonomy_tree.info:0
|
||||
msgid "CCK"
|
||||
msgstr "CCK"
|
||||
|
||||
#: content_taxonomy.module:16
|
||||
msgid ""
|
||||
"Defines a CCK field type for referencing taxonomy terms. The fields "
|
||||
"are independent from vocabulary settings and can be configured through "
|
||||
"the CCK admin field pages. The Content Taxonomy Module provides "
|
||||
"different widget types, at the moment including Option Widgets (Radios "
|
||||
"/ Checkboxes, Selects), Autocompletes, Tree). The widget modules have "
|
||||
"to be enabled separately."
|
||||
msgstr ""
|
||||
"Egy <em>CCK</em> mezőtípust ad, mely taxonómiakifejezésekre "
|
||||
"hivatkozik. A mezők függetlenek a szótárbeállításoktól, a "
|
||||
"<em>CCK</em> adminisztrációs oldalain lehet ezeket beállítani. A "
|
||||
"<em>Content Taxonomy</em> modul különböző felületi elemeket "
|
||||
"szolgáltat, jelenleg választógombok, jelölőnégyzetek, "
|
||||
"legördülő listák, automatikusan kiegészülő mezők és fák "
|
||||
"állnak rendelkezésre. A felületi elem modulokat külön kell "
|
||||
"engedélyezni."
|
||||
|
||||
#: content_taxonomy.module:49
|
||||
msgid "Content Taxonomy Fields"
|
||||
msgstr "Content Taxonomy mezők"
|
||||
|
||||
#: content_taxonomy.module:50
|
||||
msgid "Stores terms for nodes in the database."
|
||||
msgstr "A kifejezések tárolása a tartalomhoz az adatbázisban."
|
||||
|
||||
#: content_taxonomy.module:69
|
||||
msgid ""
|
||||
"Save values additionally to the core taxonomy system (into the "
|
||||
"'term_node' table)."
|
||||
msgstr ""
|
||||
"Az értékek mentése az alap taxonómia rendszerbe is (a "
|
||||
"„term_node” táblába)."
|
||||
|
||||
#: content_taxonomy.module:71
|
||||
msgid ""
|
||||
"If this option is set, saving of terms is additionally handled by the "
|
||||
"taxonomy module. So saved terms from Content Taxonomy fields will "
|
||||
"appear as any other terms saved by the core taxonomy module. Set this "
|
||||
"option if you are using any other taxonomy application, like "
|
||||
"tagadelic. Otherwise terms are only saved in the cck tables and can "
|
||||
"only be accessed via the node or a view"
|
||||
msgstr ""
|
||||
"Ha ez a lehetőség be van kapcsolva, a mentett kifejezések "
|
||||
"hozzáadódnak a taxonómia modulhoz is. Így a <em>Content "
|
||||
"Taxonomy</em> mezőkben elmentett kifejezések ugyanúgy fognak "
|
||||
"viselkedni, mint az alap taxonómia modullal elmentett bármelyik "
|
||||
"másik kifejezés. Be kell kapcsolni, ha bármilyen egyéb taxonómia "
|
||||
"alkalmazás is használatban van, mint például a <em>tagadelic</em>. "
|
||||
"Ellenkező esetben a kifejezések csak a <em>CCK</em> tábláiba "
|
||||
"lesznek elmentve, így ezeket csak a tartalommal vagy egy nézettel "
|
||||
"lehet elérni."
|
||||
|
||||
#: content_taxonomy.module:85
|
||||
msgid "Terms of the selected vocabulary get exposed to the field"
|
||||
msgstr "A kiválasztott szótár kifejezései megjelennek a mezőben"
|
||||
|
||||
#: content_taxonomy.module:90
|
||||
msgid "Advanced settings for hierarchical vocabularies"
|
||||
msgstr "Haladó beállítások hierarhikus szótáraknak"
|
||||
|
||||
#: content_taxonomy.module:95
|
||||
msgid "Parent Term"
|
||||
msgstr "Szülő kifejezés"
|
||||
|
||||
#: content_taxonomy.module:99
|
||||
msgid ""
|
||||
"If any term is selected here, only child terms of the selected are "
|
||||
"going to be exposed the field. Otherwise the whole vocabulary selected "
|
||||
"above"
|
||||
msgstr ""
|
||||
"Ha itt bármilyen kifejezés ki van választva, akkor csak ennek a "
|
||||
"gyermekei fognak megjelenni a mezőben. Egyébként a feljebb "
|
||||
"kiválasztott teljes szótár."
|
||||
|
||||
#: content_taxonomy.module:103
|
||||
msgid "Advanced PHP code"
|
||||
msgstr "Haladó PHP kód"
|
||||
|
||||
#: content_taxonomy.module:108
|
||||
msgid "PHP Code for selecting the parent term"
|
||||
msgstr "PHP kód a szülő kifejezés kiválasztásához"
|
||||
|
||||
#: content_taxonomy.module:112
|
||||
msgid ""
|
||||
"Advanced usage only: PHP code that returns the parent term ID. Should "
|
||||
"not include <?php ?> delimiters. If this field is filled out, "
|
||||
"the ID returned by this code will override the selected parent above."
|
||||
msgstr ""
|
||||
"Csak haladóknak: PHP kód, ami visszaadja a szülő kifejezés "
|
||||
"azonosítóját. Nem szükséges <?php ?> elemek közé zárni. "
|
||||
"Ha ez a mező ki van töltve, akkor a kód által visszaadott "
|
||||
"azonosító felülír minden fentebb kiválasztott szülő értéket."
|
||||
|
||||
#: content_taxonomy.module:117
|
||||
msgid "Depth of taxonomy tree"
|
||||
msgstr "A taxonómia fa mélysége"
|
||||
|
||||
#: content_taxonomy.module:119
|
||||
msgid ""
|
||||
"By setting a numeric value, the depth of the hierarchy shown can be "
|
||||
"limited. Leave this field blank to show the whole hierarchy."
|
||||
msgstr ""
|
||||
"Egy numerikus értéket megadva a megjelenő hierarhia mélysége "
|
||||
"korlátozható. Üresen hagyva megjelenik a teljes hierarhia."
|
||||
|
||||
#: content_taxonomy.module:201
|
||||
msgid "As Text"
|
||||
msgstr "Mint szöveg"
|
||||
|
||||
#: content_taxonomy.module:206
|
||||
msgid "As Link"
|
||||
msgstr "Mint hivatkozás"
|
||||
|
||||
#: content_taxonomy.module:377
|
||||
msgid "Deleted field %field_name and its data."
|
||||
msgstr "%field_name mező az adataival együtt törölve."
|
||||
|
||||
#: content_taxonomy.module:390
|
||||
msgid ""
|
||||
"Entries with term id = %tid have been deleted out of %table for field "
|
||||
"%field_name."
|
||||
msgstr ""
|
||||
"%tid azonosítójú bejegyzések törölve lettek (Tábla: %table, "
|
||||
"mezőnév: %field_name)."
|
||||
|
||||
#: content_taxonomy.module:0
|
||||
msgid "content_taxonomy"
|
||||
msgstr "content_taxonomy"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:40
|
||||
msgid "Autocomplete (Freetagging)"
|
||||
msgstr "Automatikus kiegészítés (szabadszavas cimkézés)"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:59
|
||||
msgid "Settings for Autocompletes"
|
||||
msgstr "Beállítások az automatikus kiegészítéshez"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:65
|
||||
msgid "Freetagging settings"
|
||||
msgstr "Szabadszavas cimkézés beállítások"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:67
|
||||
msgid "Allow and insert new terms by the user into the vocabulary"
|
||||
msgstr ""
|
||||
"Engedélyezi, hogy felhasználók új kifejezéseket adjanak a "
|
||||
"szótárhoz"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:68
|
||||
msgid "Deny any new terms"
|
||||
msgstr "Új kifejezések tiltása"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:73
|
||||
msgid "Extra Parent for new terms"
|
||||
msgstr "Extra szülő az új kifejezéseknek"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:76
|
||||
msgid ""
|
||||
"This setting is only relevant if you have selected \"Allow and insert "
|
||||
"new terms by the user into the vocabulary\". If you select any term "
|
||||
"here, new terms will get children of the selected one, otherwise new "
|
||||
"terms get children of the parent term (root, if no parent selected) "
|
||||
"selected in the global settings."
|
||||
msgstr ""
|
||||
"Ez a beállítás csak akkor hatásos, ha az „Engedélyezi, hogy "
|
||||
"felhasználók új kifejezéseket adjanak a szótárhoz” lehetőség "
|
||||
"van kiválasztva. Ha itt bármilyen kifejezés ki van választva, "
|
||||
"akkor az új kifejezések a kiválasztott kifejezés gyermekei "
|
||||
"lesznek, ellenkező esetben a szülőt az általános beállítások "
|
||||
"határozzák meg. Ha nincs szülő kiválasztva, akkor a gyökér lesz "
|
||||
"az."
|
||||
|
||||
#: content_taxonomy_autocomplete.module:81
|
||||
msgid "Maximum length of autocomplete"
|
||||
msgstr "Az automatikus kiegészítés maximális hossza"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:85
|
||||
msgid ""
|
||||
"Defines how many characters can be typed into the autocomplete field. "
|
||||
"For values higher than 255, remember that one term name can not be "
|
||||
"longer than 255 (would be cutted), nevertheless it's not a problem for "
|
||||
"multiple values, separated by commas."
|
||||
msgstr ""
|
||||
"Megadható, hogy hány karaktert lehessen begépelni az automatikusan "
|
||||
"kiegészülő mezőbe. 255-nél nagyobb érték megadásakor tudni "
|
||||
"kell, hogy a kifejezés nem lehet 255 karakternél hosszabb (le lesz "
|
||||
"vágva). Azonban ez nem jelent problémát a vesszővel elválasztott, "
|
||||
"többszörös értékek esetén."
|
||||
|
||||
#: content_taxonomy_autocomplete.module:97
|
||||
msgid "\"Maximum length\" must be a positive integer."
|
||||
msgstr "A „maximális hossz” értéknek pozitív egésznek kell lennie."
|
||||
|
||||
#: content_taxonomy_autocomplete.module:213
|
||||
msgid "You can provide only one value"
|
||||
msgstr "Csak egy értéket lehet megadni"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:221
|
||||
msgid "New tags are not allowed"
|
||||
msgstr "Az új elemek nem engedélyezettek"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:0
|
||||
msgid "content_taxonomy_autocomplete"
|
||||
msgstr "content_taxonomy_autocomplete"
|
||||
|
||||
#: content_taxonomy_options.module:27
|
||||
msgid "Checkboxes/Radios"
|
||||
msgstr "Jelölőnégyzetek/választógombok"
|
||||
|
||||
#: content_taxonomy_options.module:35
|
||||
msgid "Select List"
|
||||
msgstr "Legördülő lista"
|
||||
|
||||
#: content_taxonomy_options.module:54
|
||||
msgid "Settings for Options"
|
||||
msgstr "Lehetőségek beállítása"
|
||||
|
||||
#: content_taxonomy_options.module:60
|
||||
msgid "Indent child terms with ' - ' signs"
|
||||
msgstr "Gyermek kifejezések bekezdése „ - ” jelekkel"
|
||||
|
||||
#: content_taxonomy_options.module:62
|
||||
msgid ""
|
||||
"If this option is checked, a hierarchy gets visualized by indenting "
|
||||
"child terms, otherwise it's a flat list"
|
||||
msgstr ""
|
||||
"Ha ez a lehetőség be van kapcsolva, a hierarhia megjelenítésekor a "
|
||||
"gyermek kifejezések bekezdve jelennek meg, ellenkező esetben csak "
|
||||
"egyszerű lista lesz."
|
||||
|
||||
#: content_taxonomy_options.module:65
|
||||
msgid "Parent term for OptGroups in select fields"
|
||||
msgstr ""
|
||||
"Szülő kifejezés az <em>OptGroups</em> számára a legördülő "
|
||||
"listákban"
|
||||
|
||||
#: content_taxonomy_options.module:69
|
||||
msgid ""
|
||||
"This settings applies only for select fields. Select a parent term "
|
||||
"containg the grouping terms. Grouping terms should be parents of the "
|
||||
"selected terms (from the Global Settings)."
|
||||
msgstr ""
|
||||
"Ezek a beállítások csak a legördülő listákra vonatkoznak. Ki "
|
||||
"lehet választani egy szülő kifejezést a kifejezések "
|
||||
"csoportosításához. A kifejezések csoportosításához kellenek "
|
||||
"szülők a kiválasztott kifejezéseknek (az általános "
|
||||
"beállításokból)."
|
||||
|
||||
#: content_taxonomy_options.module:0
|
||||
msgid "content_taxonomy_options"
|
||||
msgstr "content_taxonomy_options"
|
||||
|
||||
#: content_taxonomy_tree.module:24
|
||||
msgid "Tree"
|
||||
msgstr "Fa"
|
||||
|
||||
#: content_taxonomy_tree.module:43
|
||||
msgid "Settings for Trees"
|
||||
msgstr "Fa beállítások"
|
||||
|
||||
#: content_taxonomy_tree.module:49
|
||||
msgid "Expand whole tree by default"
|
||||
msgstr "Alapértelmezésben kibontja a teljes fát"
|
||||
|
||||
#: content_taxonomy_tree.module:51
|
||||
msgid ""
|
||||
"Otherwise only branches, where a term is selected get expanded by "
|
||||
"default"
|
||||
msgstr ""
|
||||
"Különben csak azok a csoportok nyílnak ki alapértelmezéseben, "
|
||||
"ahol a kifejezés ki van választva"
|
||||
|
||||
#: content_taxonomy_tree.module:0
|
||||
msgid "content_taxonomy_tree"
|
||||
msgstr "content_taxonomy_tree"
|
||||
|
||||
#: content_taxonomy.info:0
|
||||
msgid "Content Taxonomy"
|
||||
msgstr "Content Taxonomy"
|
||||
|
||||
#: content_taxonomy.info:0
|
||||
msgid "Defines a field type for taxonomy terms"
|
||||
msgstr "Mezőtípust ad a taxonómiakifejezéseknek"
|
||||
|
||||
#: content_taxonomy_autocomplete.info:0
|
||||
msgid "Content Taxonomy Autocomplete"
|
||||
msgstr "Content Taxonomy automatikus kiegészítéssel"
|
||||
|
||||
#: content_taxonomy_autocomplete.info:0
|
||||
msgid "Defines a autocomplete widget type for content_taxonomy"
|
||||
msgstr ""
|
||||
"Automatikusan kiegészülő mező felületi elemet ad a <em>Content "
|
||||
"Taxonomy</em> modulhoz"
|
||||
|
||||
#: content_taxonomy_options.info:0
|
||||
msgid "Content Taxonomy Options"
|
||||
msgstr "Content Taxonomy lehetőségek"
|
||||
|
||||
#: content_taxonomy_options.info:0
|
||||
msgid ""
|
||||
"Defines a option widget type for content_taxonomy for selects, "
|
||||
"radios/checkboxes"
|
||||
msgstr ""
|
||||
"Legördülő lista, választógomb és jelölőnégyzet felületi "
|
||||
"elemeket ad a <em>Content Taxonomy</em> modulhoz"
|
||||
|
||||
#: content_taxonomy_tree.info:0
|
||||
msgid "Content Taxonomy Tree"
|
||||
msgstr "Content Taxonomy Tree"
|
||||
|
||||
#: content_taxonomy_tree.info:0
|
||||
msgid "Defines a dynamic tree widget for Content Taxonomy"
|
||||
msgstr "Dinamikus fa felületi elemet ad a <em>Content Taxonomy</em> modulhoz"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:13
|
||||
msgid "Names of all taxonomy terms separated by commas"
|
||||
msgstr "Minden taxonómiakifejezés neve, vesszőkkel elválasztva"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:15
|
||||
msgid "IDs of all taxonomy terms separated by commas"
|
||||
msgstr "Minden taxonómiakifejezés azonosítója, vesszőkkel elválasztva"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:16
|
||||
msgid "Name of terms vocabulary"
|
||||
msgstr "A kifejezések szótárának neve"
|
||||
|
||||
#: includes/content_taxonomy.token.inc:17
|
||||
msgid "ID of terms vocabulary"
|
||||
msgstr "A kifejezések szótárának azonosítója"
|
||||
|
||||
#: content_taxonomy.module:142
|
||||
msgid "@field-title term"
|
||||
msgstr "@field-title kifejezés"
|
||||
|
||||
#: content_taxonomy_autocomplete.module:217; content_taxonomy_tree.module:157
|
||||
msgid "%name: this field cannot hold more than @count values."
|
||||
msgstr "%name: ez a mező nem tartalmazhat több, mint @count értéket."
|
||||
|
||||
#: includes/content_taxonomy.token.inc:14
|
||||
msgid ""
|
||||
"Unfiltered names of all taxonomy terms separated by commas. WARNING - "
|
||||
"raw user input."
|
||||
msgstr ""
|
||||
"Vesszőkkel elválasztva minden taxonómiakifejezés szűretlen neve. "
|
||||
"Figyelem - nyers felhasználói bevitel."
|
||||
|
|
@ -1,222 +0,0 @@
|
|||
# $Id: ja.po,v 1.1.2.1 2008/05/31 08:16:58 imagine Exp $
|
||||
#
|
||||
# Japanese translation of Drupal (content_taxonomy)
|
||||
# Copyright 2008 0829 <hixarg+0829@gmail.com>
|
||||
# Generated from files:
|
||||
# content_taxonomy.info,v 1.1.2.2.2.1 2008/04/30 08:05:19 mh86 Exp
|
||||
# content_taxonomy.module,v 1.2.2.15.2.1 2008/04/30 08:05:19 mh86 Exp
|
||||
# content_taxonomy_autocomplete.info,v 1.1.2.4.2.1 2008/04/30 08:05:19 mh86 Exp
|
||||
# content_taxonomy_autocomplete.module,v 1.2.2.4.2.1 2008/04/30 08:05:19 mh86 Exp
|
||||
# content_taxonomy_options.info,v 1.1.2.5.2.1 2008/04/30 08:05:19 mh86 Exp
|
||||
# content_taxonomy_options.module,v 1.1.4.7.2.1 2008/04/30 08:05:19 mh86 Exp
|
||||
# content_taxonomy_tree.info,v 1.1.2.1 2008/04/30 08:05:19 mh86 Exp
|
||||
# content_taxonomy_tree.module,v 1.1.2.1 2008/04/30 08:05:19 mh86 Exp
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Drupal 6.x\n"
|
||||
"POT-Creation-Date: 2008-05-11 16:35+0900\n"
|
||||
"PO-Revision-Date: 2008-05-22 01:27+0900\n"
|
||||
"Last-Translator: 0829 <hixarg+0829@gmail.com>\n"
|
||||
"Language-Team: DRUPAL*DRUPAL <hixarg+0829@gmail.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.info:0
|
||||
msgid "Content Taxonomy"
|
||||
msgstr "コンテンツタクソノミー"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.info:0
|
||||
msgid "Defines a field type for taxonomy terms"
|
||||
msgstr "タクソノミータームのフィールドタイプを定義します。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.info:0
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.info:0
|
||||
#: modules/content_taxonomy/content_taxonomy_options.info:0
|
||||
#: modules/content_taxonomy/content_taxonomy_tree.info:0
|
||||
msgid "CCK"
|
||||
msgstr "CCK"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:16
|
||||
msgid "Defines a field type for referencing a taxonomy term. <em>Note: Requires content.module.</em>"
|
||||
msgstr "タクソノミータームを参照するためのフィールドタイプを定義します。 <strong>注: コンテンツモジュール(CCK)が必要です。</strong>"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:40
|
||||
msgid "Content Taxonomy Fields"
|
||||
msgstr "コンテンツタクソノミーフィールド"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:41
|
||||
msgid "Stores terms for the nodes in the database."
|
||||
msgstr "ノードに関連付けられたタームをデータベースに保存します。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:60
|
||||
msgid "Save values additionally in the term_node table."
|
||||
msgstr "term_node テーブルにも値を追加保存する"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:62
|
||||
msgid "If this option is set, saving of terms is additionally handled by the taxonomy module. So saved terms from Content Taxonomy fields will appear as any other terms saved by the core taxonomy module. Set this option if you are using any other taxonomy application, like tagadelic. Otherwise terms are only saved in the cck tables and can only be accessed via the node or a view"
|
||||
msgstr "このオプションをセットした場合、タームの保存はタクソノミーモジュールによってさらに処理されます。 そのため、コンテンツタクソノミーフィールドを使用して保存されたタームはコアのタクソノミーモジュールによって保存された他のタームと同様に扱われます。 Tagadelic モジュールのような他のタクソノミー関連モジュールを使用している場合は、このオプションをセットしてください。 セットしない場合、タームは cck テーブルだけに保存され、ノードやビューを通してのみアクセス可能となります。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:67
|
||||
msgid "Specify terms to show"
|
||||
msgstr "表示するタームの指定"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:82
|
||||
msgid "Vocabulary"
|
||||
msgstr "ボキャブラリ"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:89
|
||||
msgid "Terms"
|
||||
msgstr "ターム"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:93
|
||||
msgid "If any term is selected here, only child terms of the selected are going to be shown in the field. Otherwise the whole vocabulary selected above"
|
||||
msgstr "ここでタームを選択した場合は、選択したタームの下位タームのみがフィールドに表示されます。 選択していない場合は、上で選択したボキャブラリ内のすべてのタームが表示されます。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:98
|
||||
msgid "Depth of taxonomy tree"
|
||||
msgstr "タクソノミー階層の深さ"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:100
|
||||
msgid "leave blank for unlimited depth"
|
||||
msgstr "タクソノミー階層の深さに制限を設けたくない場合は空欄のままにしてください。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:105
|
||||
msgid "Indent child terms with ' - ' signs"
|
||||
msgstr "下位のタームを ' - ' 記号でインデントする"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:151
|
||||
msgid "As Text"
|
||||
msgstr "テキスト"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:156
|
||||
msgid "As Link"
|
||||
msgstr "リンクを設定する"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy.module:0
|
||||
msgid "content_taxonomy"
|
||||
msgstr "コンテンツタクソノミー"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.info:0
|
||||
msgid "Content Taxonomy Autocomplete"
|
||||
msgstr "コンテンツタクソノミーオートコンプリート"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.info:0
|
||||
msgid "Defines a autocomplete widget type for content_taxonomy"
|
||||
msgstr "コンテンツタクソノミーのためにオートコンプリートタイプのウィジェットを定義します。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:15
|
||||
msgid "Defines a widget type for content_taxonomy with autocomplete. <em>Note: Requires content.module.</em>"
|
||||
msgstr "コンテンツタクソノミーでオートコンプリートを行うためのウィジェットタイプを定義します。 <strong>注: コンテンツモジュール(CCK)が必要です。</strong>"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:50;71;36
|
||||
msgid "Autocomplete"
|
||||
msgstr "オートコンプリート"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:77
|
||||
msgid "New terms from to user:"
|
||||
msgstr "ユーザからの新しいターム"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:79
|
||||
msgid "Allow and insert new terms into the taxonomy tree"
|
||||
msgstr "新しいタームの追加およびタクソノミーツリーへの挿入を許可する"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:80
|
||||
msgid "Deny any new terms"
|
||||
msgstr "新しいタームの追加はすべて拒否する"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:92
|
||||
msgid "Extra Parent for new terms"
|
||||
msgstr "新しいタームの特別な上位"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:94
|
||||
msgid "This setting is only relevant if you have set \"Allow and insert new terms into the taxonomy tree\". If you select any term here, new terms will get children of the selected one, otherwise new terms get children of the parent term selected in the data settings"
|
||||
msgstr "この設定は \"新しいタームの追加およびタクソノミーツリーへの挿入を許可する\" を選択した場合にのみ関連します。 ここで何らかのタームを選択した場合、新しく追加されたタームは選択したタームの下位タームとして追加されます。 どのタームも選択していない場合、新しく追加されたタームはデータ設定で選択したタームの下位タームとして追加されます。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:153
|
||||
#: modules/content_taxonomy/content_taxonomy_tree.module:96
|
||||
msgid "Preview"
|
||||
msgstr "プレビュー"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:180
|
||||
msgid "You can provide only one value"
|
||||
msgstr "1つの値のみが設定できます"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:185
|
||||
msgid "New tags are not allowed"
|
||||
msgstr "新しいタグは許可されていません"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_autocomplete.module:0
|
||||
msgid "content_taxonomy_autocomplete"
|
||||
msgstr "コンテンツタクソノミーオートコンプリート"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_options.info:0
|
||||
msgid "Content Taxonomy Options"
|
||||
msgstr "コンテンツタクソノミーオプション"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_options.info:0
|
||||
msgid "Defines a option widget type for content_taxonomy for selects, radios/checkboxes"
|
||||
msgstr "コンテンツタクソノミーのために、選択リスト, ラジオボタン, チェックボックスのタイプのオプションウィジェットを定義します。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_options.module:16
|
||||
msgid "Defines a widget type for content_taxonomy for options (selects, radios/checkboxes). <em>Note: Requires content.module.</em>"
|
||||
msgstr "コンテンツタクソノミーでオプションウィジェットタイプ(選択リスト, ラジオボタン, チェックボックス)を定義します。 <strong>注: コンテンツモジュール(CCK)が必要です。</strong>"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_options.module:26
|
||||
msgid "Checkboxes/Radios"
|
||||
msgstr "チェックボックス/ラジオボタン"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_options.module:34
|
||||
msgid "Select List"
|
||||
msgstr "選択リスト"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_options.module:62
|
||||
msgid "OptGroups"
|
||||
msgstr "グループ選択"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_options.module:65
|
||||
msgid "This setting is optional and only relevant for select lists"
|
||||
msgstr "この設定はオプションで、選択リストの場合にのみ関連します。 "
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_options.module:70
|
||||
msgid "Parent for grouping in first bar"
|
||||
msgstr "1番目のバーでグループ化するための上位ターム"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_options.module:0
|
||||
msgid "content_taxonomy_options"
|
||||
msgstr "コンテンツタクソノミーオプション"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_tree.info:0
|
||||
msgid "Content Taxonomy Tree"
|
||||
msgstr "コンテンツタクソノミーツリー"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_tree.info:0
|
||||
msgid "Defines a dynamic tree widget for Content Taxonomy"
|
||||
msgstr "コンテンツタクソノミーのためにダイナミックなツリー表示のウィジェットを定義します。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_tree.module:11
|
||||
msgid "Defines a widget type for content_taxonomy with a tree form. <em>Note: Requires content.module and the taxonomy manager.</em>"
|
||||
msgstr "コンテンツタクソノミーをツリー表示するためのウィジェットタイプを定義します。 <strong>注: コンテンツモジュール(CCK)が必要です。</strong>"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_tree.module:34
|
||||
msgid "Tree"
|
||||
msgstr "ツリー"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_tree.module:54
|
||||
msgid "Expand whole tree by default"
|
||||
msgstr "デフォルトですべてのツリーを展開する"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_tree.module:56
|
||||
msgid "Otherwise only branches, where a term is selected get expanded by default"
|
||||
msgstr "チェックした場合、タームの選択部分がデフォルトで展開されたツリー表示となります。 チェックしない場合、分岐されているだけの閉じたツリー表示となります。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_tree.module:128
|
||||
msgid "This field is required"
|
||||
msgstr "このフィールドは必須です。"
|
||||
|
||||
#: modules/content_taxonomy/content_taxonomy_tree.module:0
|
||||
msgid "content_taxonomy_tree"
|
||||
msgstr "コンテンツタクソノミーツリー"
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Automated tests CustomError.
|
||||
*/
|
||||
|
||||
class CustomerrorAccessDeniedTest extends DrupalTestCase {
|
||||
|
||||
/**
|
||||
* Implements getInfo().
|
||||
*/
|
||||
public function getInfo() {
|
||||
return array(
|
||||
'name' => '403 Access Denied',
|
||||
'desc' => 'Check that the custom error message is displayed when access is denied.',
|
||||
'group' => 'CustomError',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests 403 pages.
|
||||
*/
|
||||
public function testAccessDeniedMessage() {
|
||||
|
||||
/* Enable CustomError module */
|
||||
$this->drupalModuleEnable('customerror');
|
||||
|
||||
/* Set title and text of error message */
|
||||
$error_code = 403;
|
||||
$title = $this->randomName(10, 'simpletest_');
|
||||
$this->drupalVariableSet('customerror_' . $error_code . '_title', $title);
|
||||
|
||||
$description = $this->randomName(512, 'simpletest_');
|
||||
$this->drupalVariableSet('customerror_' . $error_code, $description);
|
||||
|
||||
/* Access error page directly, check for title and text of error message */
|
||||
$this->get(url('customerror/' . $error_code, NULL, NULL, TRUE));
|
||||
$this->assertText($title, 'Title on ' . $error_code . ' error page set when accessed directly');
|
||||
$this->assertText($description, 'Description on ' . $error_code . ' error page set when accessed directly');
|
||||
|
||||
/* Point Drupal to the new error message */
|
||||
$this->drupalVariableSet('site_' . $error_code, 'customerror/' . $error_code);
|
||||
|
||||
/* Log in as a user with no privileges */
|
||||
$user = $this->drupalCreateUserRolePerm();
|
||||
$this->drupalLoginUser($user);
|
||||
|
||||
/* Attempt to access CustomError module settings page */
|
||||
$this->get(url('admin/settings/customerror', NULL, NULL, TRUE));
|
||||
|
||||
/* Check for response code, title and text of error message */
|
||||
$this->assertResponse($error_code, 'Response code on ' . $error_code . ' error page set when accessed at non-existent URL');
|
||||
$this->assertText($title, 'Title on ' . $error_code . ' error page set when accessed at non-existent URL');
|
||||
$this->assertText($description, 'Description on ' . $error_code . ' error page set when accessed at non-existent URL');
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Automated tests CustomError.
|
||||
*/
|
||||
|
||||
class CustomerrorPageNotFoundTest extends DrupalTestCase {
|
||||
|
||||
/**
|
||||
* Implements getInfo().
|
||||
*/
|
||||
public function getInfo() {
|
||||
return array(
|
||||
'name' => '404 Page not found',
|
||||
'desc' => 'Check that the custom error message is displayed when a page is not found.',
|
||||
'group' => 'CustomError',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests 404 pages.
|
||||
*/
|
||||
public function testPageNotFoundMessage() {
|
||||
|
||||
/* Enable CustomError module */
|
||||
$this->drupalModuleEnable('customerror');
|
||||
|
||||
/* Set title and text of error message */
|
||||
$error_code = 404;
|
||||
$title = $this->randomName(10, 'simpletest_');
|
||||
$this->drupalVariableSet('customerror_' . $error_code . '_title', $title);
|
||||
|
||||
$description = $this->randomName(512, 'simpletest_');
|
||||
$this->drupalVariableSet('customerror_' . $error_code, $description);
|
||||
|
||||
/* Access error page directly, check for title and text of error message */
|
||||
$this->get(url('customerror/' . $error_code, NULL, NULL, TRUE));
|
||||
$this->assertText($title, 'Title on ' . $error_code . ' error page set when accessed directly');
|
||||
$this->assertText($description, 'Description on ' . $error_code . ' error page set when accessed directly');
|
||||
|
||||
/* Point Drupal to the new error message */
|
||||
$this->drupalVariableSet('site_' . $error_code, 'customerror/' . $error_code);
|
||||
|
||||
/* Log in as a user with basic privileges */
|
||||
$user = $this->drupalCreateUserRolePerm(array('access content'));
|
||||
$this->drupalLoginUser($user);
|
||||
|
||||
/* Access next node ID, shouldn't exist yet. Note that this increments the nid each time it's run. */
|
||||
$this->get(url('node/' . db_next_id('{node}_nid'), NULL, NULL, TRUE));
|
||||
|
||||
/* Check for response code, title and text of error message */
|
||||
$this->assertResponse($error_code, 'Response code on ' . $error_code . ' error page set when accessed at non-existent URL');
|
||||
$this->assertText($title, 'Title on ' . $error_code . ' error page set when accessed at non-existent URL');
|
||||
$this->assertText($description, 'Description on ' . $error_code . ' error page set when accessed at non-existent URL');
|
||||
|
||||
/* Could also create node, prove it's accessible, delete it, then try to access again and prove it's gone */
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
The tests here were written for an older version of simpletest and
|
||||
still need to be updated to work with the current version.
|
||||
|
||||
This folder includes files that can be used to test imports of date information.
|
||||
To test them, set up FeedAPI and the Feed Element Mapper with Parser iCal
|
||||
or Parser CVS and import these files into a date field.
|
||||
|
||||
- rrule.ics:
|
||||
Creates repeating dates using a wide variety of RRULEs.
|
||||
|
||||
- Yahoo.csv:
|
||||
This file uses the csv export format from Yahoo Calendar, similar to the
|
||||
format created by Outlook's csv export. The sample contains both timed
|
||||
and untimed 'All day' events.
|
||||
|
||||
- USHolidays.ics:
|
||||
An ical export of US Holidays in the 'All day' format used by
|
||||
Microsoft and Apple (where the Start date is the date of the event
|
||||
and the End date is the following day).
|
File diff suppressed because it is too large
Load diff
|
@ -1,16 +0,0 @@
|
|||
"Subject","Start Date","Start Time","End Date","End Time","All day event","Description"
|
||||
"New Year's Day","1/1/2009","","","","true",""
|
||||
"Valentine's Day","2/14/2009","","","","true",""
|
||||
"St. Patrick's Day","3/17/2009","","","","true",""
|
||||
"Memorial Day","5/31/2009","","","","true",""
|
||||
"Independence Day","7/4/2009","","","","true",""
|
||||
"Labor Day","09/07/2009","","","","true",""
|
||||
"Halloween","10/31/2009","","","","true",""
|
||||
"Veteran's Day","11/11/2009","","","","true",""
|
||||
"Thanksgiving Day","11/26/2009","","","","true",""
|
||||
"Christmas Day","12/25/2009","","","","true",""
|
||||
"Do It With Drupal","12/10/2008","08:00 AM","12/10/2008","05:00 PM","false",""
|
||||
"DrupalCon","03/04/2009","08:00 AM","03/04/2009","05:00 PM","false",""
|
||||
"DrupalCon","03/05/2009","08:00 AM","03/05/2009","05:00 PM","false",""
|
||||
"DrupalCon","03/06/2009","08:00 AM","03/06/2009","05:00 PM","false",""
|
||||
"DrupalCon","03/07/2009","08:00 AM","03/07/2009","05:00 PM","false",""
|
|
|
@ -1,146 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Date test.
|
||||
*/
|
||||
|
||||
class DateTestCase extends DrupalWebTestCase {
|
||||
protected $privileged_user;
|
||||
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => 'CCK UI',
|
||||
'description' => 'Test creation of various date fields and widgets using CCK UI.',
|
||||
'group' => 'Date',
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
// Load the date_api module.
|
||||
parent::setUp('content', 'date_api', 'date_timezone', 'date', 'date_popup', 'jquery_ui');
|
||||
|
||||
// Create and log in our privileged user.
|
||||
$this->privileged_user = $this->drupalCreateUser(array(
|
||||
'administer content types', 'administer nodes'
|
||||
));
|
||||
$this->drupalLogin($this->privileged_user);
|
||||
|
||||
variable_set('date_format_long', 'D, m/d/Y - H:i');
|
||||
variable_set('date_format_short', 'm/d/Y - H:i');
|
||||
variable_set('date_popup_timepicker', 'none');
|
||||
}
|
||||
|
||||
function testDate() {
|
||||
// Creates select list date field stored as a date with default settings.
|
||||
$this->createDateField($type = 'date', $widget = 'date_select');
|
||||
$edit = array();
|
||||
$this->drupalPost(NULL, $edit, t('Save field settings'));
|
||||
$this->dateForm($options = 'select');
|
||||
$this->assertText('Thu, 10/07/2010 - 10:30', 'Found the correct date for a date field using the date_select widget.');
|
||||
$this->deleteDateField();
|
||||
// Creates text date field stored as a date with default settings.
|
||||
$this->createDateField($type = 'date', $widget = 'date_text');
|
||||
$edit = array();
|
||||
$this->drupalPost(NULL, $edit, t('Save field settings'));
|
||||
$this->dateForm($options = 'text');
|
||||
$this->assertText('Thu, 10/07/2010 - 10:30', 'Found the correct date for a date field using the date_text widget.');
|
||||
$this->deleteDateField();
|
||||
// Creates popup date field stored as a date with default settings.
|
||||
$this->createDateField($type = 'date', $widget = 'date_popup');
|
||||
$edit = array(
|
||||
'input_format' => 'm/d/Y - H:i',
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save field settings'));
|
||||
$this->dateForm($options = 'popup');
|
||||
$this->assertText('Thu, 10/07/2010 - 10:30', 'Found the correct date for a date field using the date_popup widget.');
|
||||
$this->deleteDateField();
|
||||
// Creates select list date field stored as a datestamp with default settings.
|
||||
$this->createDateField($type = 'datestamp', $widget = 'date_select');
|
||||
$edit = array();
|
||||
$this->drupalPost(NULL, $edit, t('Save field settings'));
|
||||
$this->dateForm($options = 'select');
|
||||
$this->assertText('Thu, 10/07/2010 - 10:30', 'Found the correct date for a datestamp field using the date_select widget.');
|
||||
$this->deleteDateField();
|
||||
// Creates text date field stored as a datestamp with default settings.
|
||||
$this->createDateField($type = 'datestamp', $widget = 'date_text');
|
||||
$edit = array();
|
||||
$this->drupalPost(NULL, $edit, t('Save field settings'));
|
||||
$this->dateForm($options = 'text');
|
||||
$this->assertText('Thu, 10/07/2010 - 10:30', 'Found the correct date for a datestamp field using the date_text widget.');
|
||||
$this->deleteDateField();
|
||||
// Creates popup date field stored as a datestamp with default settings.
|
||||
$this->createDateField($type = 'datestamp', $widget = 'date_popup');
|
||||
$edit = array(
|
||||
'input_format' => 'm/d/Y - H:i',
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save field settings'));
|
||||
$this->dateForm($options = 'popup');
|
||||
$this->assertText('Thu, 10/07/2010 - 10:30', 'Found the correct date for a datestamp field using the date_popup widget.');
|
||||
$this->deleteDateField();
|
||||
// Creates select list date field stored as a datetime with default settings.
|
||||
$this->createDateField($type = 'datetime', $widget = 'date_select');
|
||||
$edit = array();
|
||||
$this->drupalPost(NULL, $edit, t('Save field settings'));
|
||||
$this->dateForm($options = 'select');
|
||||
$this->assertText('Thu, 10/07/2010 - 10:30', 'Found the correct date for a datetime field using the date_select widget.');
|
||||
$this->deleteDateField();
|
||||
// Creates text date field stored as a datetime with default settings.
|
||||
$this->createDateField($type = 'datetime', $widget = 'date_text');
|
||||
$edit = array();
|
||||
$this->drupalPost(NULL, $edit, t('Save field settings'));
|
||||
$this->dateForm($options = 'text');
|
||||
$this->assertText('Thu, 10/07/2010 - 10:30', 'Found the correct date for a datetime field using the date_text widget.');
|
||||
$this->deleteDateField();
|
||||
// Creates popup date field stored as a datetime with default settings.
|
||||
$this->createDateField($type = 'datetime', $widget = 'date_popup');
|
||||
$edit = array(
|
||||
'input_format' => 'm/d/Y - H:i',
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save field settings'));
|
||||
$this->dateForm($options = 'popup');
|
||||
$this->assertText('Thu, 10/07/2010 - 10:30', 'Found the correct date for a datetime field using the date_popup widget.');
|
||||
$this->deleteDateField();
|
||||
}
|
||||
|
||||
function createDateField($type, $widget) {
|
||||
$edit = array();
|
||||
$edit['_add_new_field[label]'] = 'Test';
|
||||
$edit['_add_new_field[field_name]'] = 'test';
|
||||
$edit['_add_new_field[weight]'] = '-4';
|
||||
$edit['_add_new_field[type]'] = $type;
|
||||
$edit['_add_new_field[widget_type]'] = $widget;
|
||||
$this->drupalPost('admin/content/node-type/story/fields', $edit, t('Save'));
|
||||
|
||||
}
|
||||
|
||||
function dateForm($options) {
|
||||
// Tests that date field functions properly.
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(8);
|
||||
$edit['body'] = $this->randomName(16);
|
||||
if ($options == 'select') {
|
||||
$edit['field_test[0][value][year]'] = '2010';
|
||||
$edit['field_test[0][value][month]'] = '10';
|
||||
$edit['field_test[0][value][day]'] = '7';
|
||||
$edit['field_test[0][value][hour]'] = '10';
|
||||
$edit['field_test[0][value][minute]'] = '30';
|
||||
}
|
||||
elseif ($options == 'text') {
|
||||
$edit['field_test[0][value][date]'] = '10/07/2010 - 10:30';
|
||||
}
|
||||
elseif ($options == 'popup') {
|
||||
// The default format for a popup is an odd one.
|
||||
$edit['field_test[0][value][date]'] = '10/07/2010';
|
||||
$edit['field_test[0][value][time]'] = '10:30';
|
||||
}
|
||||
$this->drupalPost('node/add/story', $edit, t('Save'));
|
||||
$this->assertText($edit['title'], 'Test node has been created');
|
||||
}
|
||||
|
||||
function deleteDateField() {
|
||||
$this->drupalGet('admin/content/node-type/story/fields');
|
||||
$this->clickLink('Remove');
|
||||
$this->drupalPost(NULL, NULL, t('Remove'));
|
||||
$this->assertText('Removed field Test from Story.', 'Removed date field.');
|
||||
}
|
||||
}
|
|
@ -1,414 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Test Date API functions
|
||||
*/
|
||||
class DateAPITestCase extends DrupalWebTestCase {
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Date API'),
|
||||
'description' => t('Test Date API functions.') ,
|
||||
'group' => t('Date'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of setUp().
|
||||
*/
|
||||
public function setUp() {
|
||||
// Load the date_api module.
|
||||
parent::setUp('date_api', 'date_timezone');
|
||||
variable_set('date_api_use_iso8601', FALSE);
|
||||
variable_set('date_first_day', 1);
|
||||
}
|
||||
|
||||
function testDateAPI() {
|
||||
|
||||
$value = '2007-12-05 23:59';
|
||||
$this->assertEqual(TRUE, date_part_extract($value, 'year'), "Test date_part_extract(". $value .", year), results ". date_part_extract($value, 'year'));
|
||||
$this->assertEqual(TRUE, date_part_extract($value, 'month'), "Test date_part_extract(". $value .", mon), results ". date_part_extract($value, 'month'));
|
||||
$this->assertEqual(TRUE, date_part_extract($value, 'day'), "Test date_part_extract(". $value .", mday), results ". date_part_extract($value, 'day'));
|
||||
|
||||
$this->assertEqual(TRUE, date_is_valid($value), "Test date_is_valid(". $value .")");
|
||||
$value = '2007-00-00 00:00';
|
||||
$this->assertNotEqual(TRUE, date_is_valid($value), "Test for invalid date_is_valid(". $value .")");
|
||||
$value = '0000-00-00 00:00';
|
||||
$this->assertNotEqual(TRUE, date_is_valid($value), "Test for invalid date_is_valid(". $value .")");
|
||||
$value = '-100';
|
||||
$this->assertNotEqual(TRUE, date_is_valid($value), "Test for invalid date_is_valid(". $value .")");
|
||||
$value = '2007-00-01T00:00';
|
||||
$this->assertEqual(TRUE, date_is_valid($value, DATE_ISO), "Test ISO exception to date_is_valid(". $value .", DATE_ISO)");
|
||||
|
||||
$dates = array(
|
||||
'2007-01-01 00:00:00',
|
||||
'1970-01-01 00:00:00',
|
||||
'1900-01-01 00:00:00',
|
||||
'1600-01-01 00:00:00',
|
||||
'0100-01-01 00:00:00');
|
||||
foreach ($dates as $date) {
|
||||
$unix = date_convert($date, DATE_DATETIME, DATE_UNIX);
|
||||
$datetime = date_convert($unix, DATE_UNIX, DATE_DATETIME);
|
||||
$this->assertEqual($date, $datetime, 'Test roundtrip using date_convert() from DATE_DATETIME to DATE_UNIX back to DATE_DATETIME, results '. $date .' >> '. $unix .' >> '. $datetime);
|
||||
}
|
||||
|
||||
// Test date_format_date().
|
||||
$formatters = array(
|
||||
'a',
|
||||
'A',
|
||||
'B',
|
||||
'c',
|
||||
'd',
|
||||
'D',
|
||||
'e',
|
||||
'F',
|
||||
'g',
|
||||
'G',
|
||||
'h',
|
||||
'H',
|
||||
'i',
|
||||
'I',
|
||||
'j',
|
||||
'l',
|
||||
'L',
|
||||
'm',
|
||||
'M',
|
||||
'n',
|
||||
'N',
|
||||
'o',
|
||||
'O',
|
||||
'P',
|
||||
'r',
|
||||
'R',
|
||||
's',
|
||||
'S',
|
||||
't',
|
||||
'T',
|
||||
'u',
|
||||
'U',
|
||||
'w',
|
||||
'W',
|
||||
'y',
|
||||
'Y',
|
||||
'z',
|
||||
'Z',
|
||||
);
|
||||
foreach ($formatters as $formatter) {
|
||||
$date_api_format = date_format_date(date_now(), 'custom', $formatter);
|
||||
$php_format = date_format(date_now(), $formatter);
|
||||
$this->assertEqual($date_api_format, $php_format, 'Test that the "' . $formatter . '" formatter is formatted correctly by date_format_date()');
|
||||
}
|
||||
|
||||
// Test the order of the weeks days for a calendar that starts on Monday and one that starts on Sunday.
|
||||
variable_set('date_first_day', 1);
|
||||
$expected = array( 0 => t('Mon'), 1 => t('Tue'), 2 => t('Wed'), 3 => t('Thu'), 4 => t('Fri'), 5 => t('Sat'), 6 => t('Sun'), );
|
||||
$days = date_week_days_ordered(date_week_days_abbr(1));
|
||||
$this->assertEqual($expected, $days, 'Test that date_week_days_ordered() array starts on Monday when the site first day is on Monday.');
|
||||
variable_set('date_first_day', 0);
|
||||
$expected = array( 0 => t('Sun'), 1 => t('Mon'), 2 => t('Tue'), 3 => t('Wed'), 4 => t('Thu'), 5 => t('Fri'), 6 => t('Sat'), );
|
||||
$days = date_week_days_ordered(date_week_days_abbr(1));
|
||||
$this->assertEqual($expected, $days, 'Test that date_week_days_ordered() array starts on Sunday when the site first day is on Sunday.');
|
||||
|
||||
// Test days in February for a leap year and a non-leap year.
|
||||
$expected = 28;
|
||||
$value = date_days_in_month(2005, 2);
|
||||
$this->assertEqual($expected, $value, "Test date_days_in_month(2, 2005): should be $expected, found $value.");
|
||||
$expected = 29;
|
||||
$value = date_days_in_month(2004, 2);
|
||||
$this->assertEqual($expected, $value, "Test date_days_in_month(2, 2004): should be $expected, found $value.");
|
||||
|
||||
// Test days in year for a leap year and a non-leap year.
|
||||
$expected = 365;
|
||||
$value = date_days_in_year('2005-06-01 00:00:00', DATE_DATETIME);
|
||||
$this->assertEqual($expected, $value, "Test date_days_in_year(2005-06-01, DATE_DATETIME): should be $expected, found $value.");
|
||||
$expected = 366;
|
||||
$value = date_days_in_year('2004-06-01 00:00:00', DATE_DATETIME);
|
||||
$this->assertEqual($expected, $value, "Test date_days_in_year(2004-06-01, DATE_DATETIME): should be $expected, found $value.");
|
||||
|
||||
// Test ISO weeks for a leap year and a non-leap year.
|
||||
$expected = 52;
|
||||
$value = date_iso_weeks_in_year('2008-06-01 00:00:00', DATE_DATETIME);
|
||||
$this->assertEqual($expected, $value, "Test date_iso_weeks_in_year(2008-06-01, DATE_DATETIME): should be $expected, found $value.");
|
||||
$expected = 53;
|
||||
$value = date_iso_weeks_in_year('2009-06-01 00:00:00', DATE_DATETIME);
|
||||
$this->assertEqual($expected, $value, "Test date_iso_weeks_in_year(2009-06-01, DATE_DATETIME): should be $expected, found $value.");
|
||||
|
||||
// Test day of week for March 1, the day after leap day.
|
||||
$expected = 6;
|
||||
$value = date_day_of_week('2008-03-01 00:00:00', DATE_DATETIME);
|
||||
$this->assertEqual($expected, $value, "Test date_day_of_week(2008-03-01, DATE_DATETIME): should be $expected, found $value.");
|
||||
$expected = 0;
|
||||
$value = date_day_of_week('2009-03-01 00:00:00', DATE_DATETIME);
|
||||
$this->assertEqual($expected, $value, "Test date_day_of_week(2009-03-01, DATE_DATETIME): should be $expected, found $value.");
|
||||
|
||||
// Test day of week name for March 1, the day after leap day.
|
||||
$expected = 'Sat';
|
||||
$value = date_day_of_week_name('2008-03-01 00:00:00', DATE_DATETIME);
|
||||
$this->assertEqual($expected, $value, "Test date_day_of_week_name(2008-03-01, DATE_DATETIME): should be $expected, found $value.");
|
||||
$expected = 'Sun';
|
||||
$value = date_day_of_week_name('2009-03-01 00:00:00', DATE_DATETIME);
|
||||
$this->assertEqual($expected, $value, "Test date_day_of_week_name(2009-03-01, DATE_DATETIME): should be $expected, found $value.");
|
||||
|
||||
// Test week range with calendar weeks.
|
||||
variable_set('date_first_day', 0);
|
||||
variable_set('date_api_use_iso8601', FALSE);
|
||||
$expected = '2008-01-27 to 2008-02-03';
|
||||
$result = date_week_range(5, 2008);
|
||||
$value = $result[0]->format(DATE_FORMAT_DATE) .' to '. $result[1]->format(DATE_FORMAT_DATE);
|
||||
$this->assertEqual($expected, $value, "Test calendar date_week_range(5, 2008): should be $expected, found $value.");
|
||||
$expected = '2009-01-25 to 2009-02-01';
|
||||
$result = date_week_range(5, 2009);
|
||||
$value = $result[0]->format(DATE_FORMAT_DATE) .' to '. $result[1]->format(DATE_FORMAT_DATE);
|
||||
$this->assertEqual($expected, $value, "Test calendar date_week_range(5, 2009): should be $expected, found $value.");
|
||||
|
||||
// And now with ISO weeks.
|
||||
variable_set('date_first_day', 1);
|
||||
variable_set('date_api_use_iso8601', TRUE);
|
||||
$expected = '2008-01-28 to 2008-02-04';
|
||||
$result = date_week_range(5, 2008);
|
||||
$value = $result[0]->format(DATE_FORMAT_DATE) .' to '. $result[1]->format(DATE_FORMAT_DATE);
|
||||
$this->assertEqual($expected, $value, "Test ISO date_week_range(5, 2008): should be $expected, found $value.");
|
||||
$expected = '2009-01-26 to 2009-02-02';
|
||||
$result = date_week_range(5, 2009);
|
||||
$value = $result[0]->format(DATE_FORMAT_DATE) .' to '. $result[1]->format(DATE_FORMAT_DATE);
|
||||
$this->assertEqual($expected, $value, "Test ISO date_week_range(5, 2009): should be $expected, found $value.");
|
||||
variable_set('date_api_use_iso8601', FALSE);
|
||||
|
||||
// Find calendar week for a date.
|
||||
variable_set('date_first_day', 0);
|
||||
$expected = '09';
|
||||
$value = date_week('2008-03-01');
|
||||
$this->assertEqual($expected, $value, "Test date_week(2008-03-01): should be $expected, found $value.");
|
||||
$expected = '10';
|
||||
$value = date_week('2009-03-01');
|
||||
$this->assertEqual($expected, $value, "Test date_week(2009-03-01): should be $expected, found $value.");
|
||||
|
||||
// Create date object from datetime string.
|
||||
$input = '2009-03-07 10:30';
|
||||
$timezone = 'America/Chicago';
|
||||
$date = date_make_date($input, $timezone);
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '2009-03-07T10:30:00-06:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date($input, $timezone): should be $expected, found $value.");
|
||||
|
||||
// Same during daylight savings time.
|
||||
$input = '2009-06-07 10:30';
|
||||
$timezone = 'America/Chicago';
|
||||
$date = date_make_date($input, $timezone);
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '2009-06-07T10:30:00-05:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date($input, $timezone): should be $expected, found $value.");
|
||||
|
||||
// Create date object from date string.
|
||||
$input = '2009-03-07';
|
||||
$timezone = 'America/Chicago';
|
||||
$date = date_make_date($input, $timezone);
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '2009-03-07T00:00:00-06:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date($input, $timezone): should be $expected, found $value.");
|
||||
|
||||
// Same during daylight savings time.
|
||||
$input = '2009-06-07';
|
||||
$timezone = 'America/Chicago';
|
||||
$date = date_make_date($input, $timezone);
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '2009-06-07T00:00:00-05:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date($input, $timezone): should be $expected, found $value.");
|
||||
|
||||
// Create date object from date array, date only.
|
||||
$input = array('year' => 2010, 'month' => 2, 'day' => 28);
|
||||
$timezone = 'America/Chicago';
|
||||
$granularity = array('year', 'month', 'day');
|
||||
$date = date_make_date($input, $timezone, DATE_ARRAY, $granularity);
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '2010-02-28T00:00:00-06:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date(array('year' => 2010, 'month' => 2, 'day' => 28), $timezone, DATE_ARRAY, array('year', 'month', 'day')): should be $expected, found $value.");
|
||||
|
||||
// Create date object from date array with hour.
|
||||
$input = array('year' => 2010, 'month' => 2, 'day' => 28, 'hour' => 10);
|
||||
$timezone = 'America/Chicago';
|
||||
$granularity = array('year', 'month', 'day', 'hour');
|
||||
$date = date_make_date($input, $timezone, DATE_ARRAY, $granularity);
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '2010-02-28T10:00:00-06:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date(array('year' => 2010, 'month' => 2, 'day' => 28, 'hour' => 10), $timezone, DATE_ARRAY, array('year', 'month', 'day', 'hour')): should be $expected, found $value.");
|
||||
|
||||
// 0 = January 1, 1970 00:00:00 (UTC);
|
||||
// 1000000000 = September 9, 2001 01:46:40 (UTC);
|
||||
|
||||
// Create date object from unix timestamp and convert it to a local date.
|
||||
$input = 0;
|
||||
$timezone = 'UTC';
|
||||
$date = date_make_date($input, $timezone, DATE_UNIX);
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '1970-01-01T00:00:00+00:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date($input, $timezone, DATE_UNIX): should be $expected, found $value.");
|
||||
|
||||
$expected = 'UTC';
|
||||
$value = timezone_name_get(date_timezone_get($date));
|
||||
$this->assertEqual($expected, $value, "The current timezone is $value: should be $expected.");
|
||||
$expected = 0;
|
||||
$value = date_offset_get($date);
|
||||
$this->assertEqual($expected, $value, "The current offset is $value: should be $expected.");
|
||||
|
||||
$timezone = 'America/Los_Angeles';
|
||||
date_timezone_set($date, timezone_open($timezone));
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '1969-12-31T16:00:00-08:00';
|
||||
$this->assertEqual($expected, $value, "Test date_timezone_set(\$date, timezone_open($timezone)): should be $expected, found $value.");
|
||||
|
||||
$expected = 'America/Los_Angeles';
|
||||
$value = timezone_name_get(date_timezone_get($date));
|
||||
$this->assertEqual($expected, $value, "The current timezone should be $expected, found $value.");
|
||||
$expected = '-28800';
|
||||
$value = date_offset_get($date);
|
||||
$this->assertEqual($expected, $value, "The current offset should be $expected, found $value.");
|
||||
|
||||
// Convert the local version of a timestamp to UTC.
|
||||
$input = 0;
|
||||
$timezone = 'America/Los_Angeles';
|
||||
$date = date_make_date($input, $timezone, DATE_UNIX);
|
||||
$offset = date_offset_get($date);
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '1969-12-31T16:00:00-08:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date($input, $timezone, DATE_UNIX): should be $expected, found $value.");
|
||||
|
||||
$expected = 'America/Los_Angeles';
|
||||
$value = timezone_name_get(date_timezone_get($date));
|
||||
$this->assertEqual($expected, $value, "The current timezone should be $expected, found $value.");
|
||||
$expected = '-28800';
|
||||
$value = date_offset_get($date);
|
||||
$this->assertEqual($expected, $value, "The current offset should be $expected, found $value.");
|
||||
|
||||
$timezone = 'UTC';
|
||||
date_timezone_set($date, timezone_open($timezone));
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '1970-01-01T00:00:00+00:00';
|
||||
$this->assertEqual($expected, $value, "Test date_timezone_set(\$date, timezone_open($timezone)): should be $expected, found $value.");
|
||||
|
||||
$expected = 'UTC';
|
||||
$value = timezone_name_get(date_timezone_get($date));
|
||||
$this->assertEqual($expected, $value, "The current timezone should be $expected, found $value.");
|
||||
$expected = '0';
|
||||
$value = date_offset_get($date);
|
||||
$this->assertEqual($expected, $value, "The current offset should be $expected, found $value.");
|
||||
|
||||
// Create date object from datetime string and convert it to a local date.
|
||||
$input = '1970-01-01 00:00:00';
|
||||
$timezone = 'UTC';
|
||||
$date = date_make_date($input, $timezone);
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '1970-01-01T00:00:00+00:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date('$input', '$timezone'): should be $expected, found $value.");
|
||||
|
||||
$expected = 'UTC';
|
||||
$value = timezone_name_get(date_timezone_get($date));
|
||||
$this->assertEqual($expected, $value, "The current timezone is $value: should be $expected.");
|
||||
$expected = 0;
|
||||
$value = date_offset_get($date);
|
||||
$this->assertEqual($expected, $value, "The current offset is $value: should be $expected.");
|
||||
|
||||
$timezone = 'America/Los_Angeles';
|
||||
date_timezone_set($date, timezone_open($timezone));
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '1969-12-31T16:00:00-08:00';
|
||||
$this->assertEqual($expected, $value, "Test date_timezone_set(timezone_open($timezone)): should be $expected, found $value.");
|
||||
|
||||
$expected = 'America/Los_Angeles';
|
||||
$value = timezone_name_get(date_timezone_get($date));
|
||||
$this->assertEqual($expected, $value, "The current timezone should be $expected, found $value.");
|
||||
$expected = '-28800';
|
||||
$value = date_offset_get($date);
|
||||
$this->assertEqual($expected, $value, "The current offset should be $expected, found $value.");
|
||||
|
||||
// Convert the local version of a datetime string to UTC.
|
||||
$input = '1969-12-31 16:00:00';
|
||||
$timezone = 'America/Los_Angeles';
|
||||
$date = date_make_date($input, $timezone);
|
||||
$offset = date_offset_get($date);
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '1969-12-31T16:00:00-08:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date('$input', '$timezone'): should be $expected, found $value.");
|
||||
|
||||
$expected = 'America/Los_Angeles';
|
||||
$value = timezone_name_get(date_timezone_get($date));
|
||||
$this->assertEqual($expected, $value, "The current timezone should be $expected, found $value.");
|
||||
$expected = '-28800';
|
||||
$value = date_offset_get($date);
|
||||
$this->assertEqual($expected, $value, "The current offset should be $expected, found $value.");
|
||||
|
||||
$timezone = 'UTC';
|
||||
date_timezone_set($date, timezone_open($timezone));
|
||||
$value = date_format($date, 'c');
|
||||
$expected = '1970-01-01T00:00:00+00:00';
|
||||
$this->assertEqual($expected, $value, "Test date_timezone_set(\$date, timezone_open($timezone)): should be $expected, found $value.");
|
||||
|
||||
$expected = 'UTC';
|
||||
$value = timezone_name_get(date_timezone_get($date));
|
||||
$this->assertEqual($expected, $value, "The current timezone should be $expected, found $value.");
|
||||
$expected = '0';
|
||||
$value = date_offset_get($date);
|
||||
$this->assertEqual($expected, $value, "The current offset should be $expected, found $value.");
|
||||
|
||||
// Create year-only date.
|
||||
$input = '2009-00-00T00:00:00';
|
||||
$timezone = NULL;
|
||||
$granularity = array('year');
|
||||
$date = date_make_date($input, $timezone, DATE_DATETIME, $granularity);
|
||||
$value = date_format($date, 'Y');
|
||||
$expected = '2009';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date($input, $timezone, DATE_DATETIME, array('year')): should be $expected, found $value.");
|
||||
|
||||
// Create month and year-only date.
|
||||
$input = '2009-10-00T00:00:00';
|
||||
$timezone = NULL;
|
||||
$granularity = array('year', 'month');
|
||||
$date = date_make_date($input, $timezone, DATE_DATETIME, $granularity);
|
||||
$value = date_format($date, 'Y-m');
|
||||
$expected = '2009-10';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date($input, $timezone, DATE_DATETIME, array('year', 'month')): should be $expected, found $value.");
|
||||
|
||||
// Create time-only date.
|
||||
$input = '0000-00-00T10:30:00';
|
||||
$timezone = NULL;
|
||||
$granularity = array('hour', 'minute', 'second');
|
||||
$date = date_make_date($input, $timezone, DATE_DATETIME, $granularity);
|
||||
$value = date_format($date, 'H:i:s');
|
||||
$expected = '10:30:00';
|
||||
$this->assertEqual($expected, $value, "Test date_make_date($input, $timezone, DATE_DATETIME, array('hour', 'minute', 'second')): should be $expected, found $value.");
|
||||
|
||||
// Test date ranges.
|
||||
$valid = array(
|
||||
'-20:+20',
|
||||
'-1:+0',
|
||||
'-10:-5',
|
||||
'2000:2020',
|
||||
'-10:2010',
|
||||
'1980:-10',
|
||||
'1920:+20',
|
||||
);
|
||||
$invalid = array(
|
||||
'abc',
|
||||
'abc:+20',
|
||||
'1920:+20a',
|
||||
'+-20:+-30',
|
||||
'12:12',
|
||||
'0:+20',
|
||||
'-20:0',
|
||||
);
|
||||
foreach ($valid as $range) {
|
||||
$this->assertTrue(date_range_valid($range), "$range recognized as a valid date range.");
|
||||
}
|
||||
foreach ($invalid as $range) {
|
||||
$this->assertFalse(date_range_valid($range), "$range recognized as an invalid date range.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of tearDown().
|
||||
*/
|
||||
function tearDown() {
|
||||
variable_del('date_first_day');
|
||||
variable_del('date_api_use_iso8601');
|
||||
parent::tearDown();
|
||||
}
|
||||
}
|
|
@ -1,447 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Test for Date Repeat.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test PHP 4 Timezone Conversion
|
||||
*/
|
||||
class DateRepeatTestCase extends DrupalWebTestCase {
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Date repeat calculations'),
|
||||
'description' => t('Test Date Repeat processes to create arrays of dates from iCal rules.') ,
|
||||
'group' => t('Date'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of setUp().
|
||||
*/
|
||||
function setUp() {
|
||||
// Load the date_repeat module.
|
||||
parent::setUp('date_api', 'date_timezone', 'date_repeat', 'jquery_ui');
|
||||
}
|
||||
|
||||
public function testDateRepeat() {
|
||||
require_once('./'. drupal_get_path('module', 'date_api') .'/date_api_ical.inc');
|
||||
require_once('./'. drupal_get_path('module', 'date_repeat') .'/date_repeat_calc.inc');
|
||||
// Examples adapted from http://www.faqs.org/rfcs/rfc2445.html and
|
||||
// http://www.kanzaki.com/docs/ical/rrule.html.
|
||||
|
||||
// Daily for 10 occurrences:
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1997-09-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=DAILY;COUNT=10";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
// should be (1997 9:00 AM EDT)September 2-11
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-03 09:00:00, 1997-09-04 09:00:00, 1997-09-05 09:00:00, 1997-09-06 09:00:00, 1997-09-07 09:00:00, 1997-09-08 09:00:00, 1997-09-09 09:00:00, 1997-09-10 09:00:00, 1997-09-11 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Daily until September 24, 1997:
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1997-09-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=DAILY;UNTIL=19970924T000000Z";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
// should be (1997 9:00 AM EDT)September 2-23
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-03 09:00:00, 1997-09-04 09:00:00, 1997-09-05 09:00:00, 1997-09-06 09:00:00, 1997-09-07 09:00:00, 1997-09-08 09:00:00, 1997-09-09 09:00:00, 1997-09-10 09:00:00, 1997-09-11 09:00:00, 1997-09-12 09:00:00, 1997-09-13 09:00:00, 1997-09-14 09:00:00, 1997-09-15 09:00:00, 1997-09-16 09:00:00, 1997-09-17 09:00:00, 1997-09-18 09:00:00, 1997-09-19 09:00:00, 1997-09-20 09:00:00, 1997-09-21 09:00:00, 1997-09-22 09:00:00, 1997-09-23 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every other day - until September 30:
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1997-09-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=DAILY;INTERVAL=2";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
// should be (1997 9:00 AM EDT)September2,4,6,8...24,26,28,30;
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-04 09:00:00, 1997-09-06 09:00:00, 1997-09-08 09:00:00, 1997-09-10 09:00:00, 1997-09-12 09:00:00, 1997-09-14 09:00:00, 1997-09-16 09:00:00, 1997-09-18 09:00:00, 1997-09-20 09:00:00, 1997-09-22 09:00:00, 1997-09-24 09:00:00, 1997-09-26 09:00:00, 1997-09-28 09:00:00, 1997-09-30 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every 10 days, 2 occurrences:
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1997-09-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=DAILY;INTERVAL=10;COUNT=2";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
// should be (1997 9:00 AM EDT)September 2,12
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-12 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Weekly for 3 occurrences
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1997-09-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=WEEKLY;COUNT=3";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
// should be (1997 9:00 AM EDT)September 2,9,16
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-09 09:00:00, 1997-09-16 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Weekly until September 24, 1997
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1997-09-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=WEEKLY;UNTIL=19970924T000000Z";
|
||||
// ==> (1997 9:00 AM EDT)September 2,9,16,23
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-09 09:00:00, 1997-09-16 09:00:00, 1997-09-23 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every other week - forever:
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1997-09-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=WEEKLY;INTERVAL=2;WKST=SU";
|
||||
// should be (1997 9:00 AM EDT)September 2,16,30
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-16 09:00:00, 1997-09-30 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Weekly on Tuesday and Thursday for 4 weeks:
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1997-09-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=WEEKLY;COUNT=8;WKST=SU;BYDAY=TU,TH";
|
||||
// should be(1997 9:00 AM EDT)September 2,4,9,11,16,18,23,25
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-04 09:00:00, 1997-09-09 09:00:00, 1997-09-11 09:00:00, 1997-09-16 09:00:00, 1997-09-18 09:00:00, 1997-09-23 09:00:00, 1997-09-25 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every other week on Tuesday and Thursday, for 5 occurrences:
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1997-09-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=5;WKST=SU;BYDAY=TU,TH";
|
||||
// should be (1997 9:00 AM EDT)September 2,4,16,18,30
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-04 09:00:00, 1997-09-16 09:00:00, 1997-09-18 09:00:00, 1997-09-30 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every other week on Monday, Wednesday and Friday until September 24, 1997,
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1997-09-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=19970924T000000Z;WKST=SU;BYDAY=MO,WE,FR";
|
||||
// should be (1997 9:00 AM EDT)September 2,3,5,15,17,19
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-03 09:00:00, 1997-09-05 09:00:00, 1997-09-15 09:00:00, 1997-09-17 09:00:00, 1997-09-19 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Monthly on the 1st Friday for 2 occurrences:
|
||||
$start = "1997-09-05 09:00:00";
|
||||
$end = "1997-10-31 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;COUNT=2;BYDAY=1FR";
|
||||
// should be (1997 9:00 AM EDT)September 5;October 3
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-05 09:00:00, 1997-10-03 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Monthly on the 1st Friday until December 24, 1997:
|
||||
$start = "1997-09-05 09:00:00";
|
||||
$end = "1998-10-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;UNTIL=19971224T000000Z;BYDAY=1FR";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-05 09:00:00, 1997-10-03 09:00:00, 1997-11-07 09:00:00, 1997-12-05 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every other month on the 1st and last Sunday of the month for 10 occurrences:
|
||||
$start = "1997-09-07 09:00:00";
|
||||
$end = "1998-10-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=1SU,-1SU";
|
||||
// ==> (1997 9:00 AM EDT)September 7,28
|
||||
// (1997 9:00 AM EST)November 2,30
|
||||
// (1998 9:00 AM EST)January 4,25;March 1,29
|
||||
// (1998 9:00 AM EDT)May 3,31
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-07 09:00:00, 1997-09-28 09:00:00, 1997-11-02 09:00:00, 1997-11-30 09:00:00, 1998-01-04 09:00:00, 1998-01-25 09:00:00, 1998-03-01 09:00:00, 1998-03-29 09:00:00, 1998-05-03 09:00:00, 1998-05-31 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Monthly on the second to last Monday of the month for 6 months:
|
||||
$start = "1997-09-22 09:00:00";
|
||||
$end = "1998-10-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;COUNT=6;BYDAY=-2MO";
|
||||
//==> (1997 9:00 AM EDT)September 22;October 20
|
||||
// (1997 9:00 AM EST)November 17;December 22
|
||||
// (1998 9:00 AM EST)January 19;February 16
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-22 09:00:00, 1997-10-20 09:00:00, 1997-11-17 09:00:00, 1997-12-22 09:00:00, 1998-01-19 09:00:00, 1998-02-16 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every Tuesday, every other month:
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1998-02-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;INTERVAL=2;BYDAY=TU";
|
||||
// ==> (1997 9:00 AM EDT)September 2,9,16,23,30
|
||||
// (1997 9:00 AM EST)November 4,11,18,25
|
||||
// (1998 9:00 AM EST)January 6,13,20,27;March 3,10,17,24,31
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-09 09:00:00, 1997-09-16 09:00:00, 1997-09-23 09:00:00, 1997-09-30 09:00:00, 1997-11-04 09:00:00, 1997-11-11 09:00:00, 1997-11-18 09:00:00, 1997-11-25 09:00:00, 1998-01-06 09:00:00, 1998-01-13 09:00:00, 1998-01-20 09:00:00, 1998-01-27 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Yearly in June and July for 10 occurrences:
|
||||
$start = "1997-06-10 09:00:00";
|
||||
$end = "2002-01-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=YEARLY;COUNT=10;BYMONTH=6,7";
|
||||
// ==> (1997 9:00 AM EDT)June 10;July 10
|
||||
// (1998 9:00 AM EDT)June 10;July 10
|
||||
// (1999 9:00 AM EDT)June 10;July 10
|
||||
// (2000 9:00 AM EDT)June 10;July 10
|
||||
// (2001 9:00 AM EDT)June 10;July 10
|
||||
// Note: Since none of the BYDAY, BYMONTHDAY or BYYEARDAY components
|
||||
// are specified, the day is gotten from DTSTART
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-06-10 09:00:00, 1997-07-10 09:00:00, 1998-06-10 09:00:00, 1998-07-10 09:00:00, 1999-06-10 09:00:00, 1999-07-10 09:00:00, 2000-06-10 09:00:00, 2000-07-10 09:00:00, 2001-06-10 09:00:00, 2001-07-10 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every other year on January, February, and March for 10 occurrences:
|
||||
$start = "1997-03-10 09:00:00";
|
||||
$end = "2004-01-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3";
|
||||
// ==> (1997 9:00 AM EST)March 10
|
||||
// (1999 9:00 AM EST)January 10;February 10;March 10
|
||||
// (2001 9:00 AM EST)January 10;February 10;March 10
|
||||
// (2003 9:00 AM EST)January 10;February 10;March 10
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-03-10 09:00:00, 1999-01-10 09:00:00, 1999-02-10 09:00:00, 1999-03-10 09:00:00, 2001-01-10 09:00:00, 2001-02-10 09:00:00, 2001-03-10 09:00:00, 2003-01-10 09:00:00, 2003-02-10 09:00:00, 2003-03-10 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//An example where the days generated makes a difference because of WKST:
|
||||
$start = "1997-08-05 09:00:00";
|
||||
$end = "2004-01-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=MO";
|
||||
// ==> (1997 EDT)Aug 5,10,19,24
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-08-05 09:00:00, 1997-08-10 09:00:00, 1997-08-19 09:00:00, 1997-08-24 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//changing only WKST from MO to SU, yields different results...
|
||||
$start = "1997-08-05 09:00:00";
|
||||
$end = "2004-01-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU";
|
||||
// Result: 1997 EDT August 5,17,19,31;
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-08-05 09:00:00, 1997-08-17 09:00:00, 1997-08-19 09:00:00, 1997-08-31 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every 18 months on the 10th thru 15th of the month for 10 occurrences:
|
||||
$start = "1997-09-10 09:00:00";
|
||||
$end = "2004-01-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;INTERVAL=18;COUNT=10;BYMONTHDAY=10,11,12,13,14,15";
|
||||
// ==> (1997 9:00 AM EDT)September 10,11,12,13,14,15
|
||||
// (1999 9:00 AM EST)March 10,11,12,13
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-10 09:00:00, 1997-09-11 09:00:00, 1997-09-12 09:00:00, 1997-09-13 09:00:00, 1997-09-14 09:00:00, 1997-09-15 09:00:00, 1999-03-10 09:00:00, 1999-03-11 09:00:00, 1999-03-12 09:00:00, 1999-03-13 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Monthly on the third to the last day of the month, forever:
|
||||
$start = "1997-09-28 09:00:00";
|
||||
$end = "1998-03-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;BYMONTHDAY=-3";
|
||||
// ==> (1997 9:00 AM EDT)September 28
|
||||
// (1997 9:00 AM EST)October 29;November 28;December 29
|
||||
// (1998 9:00 AM EST)January 29;February 26
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-28 09:00:00, 1997-10-29 09:00:00, 1997-11-28 09:00:00, 1997-12-29 09:00:00, 1998-01-29 09:00:00, 1998-02-26 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every Thursday in March, forever:
|
||||
// ==> (1997 9:00 AM EST)March 13,20,27
|
||||
// (1998 9:00 AM EST)March 5,12,19,26
|
||||
// (1999 9:00 AM EST)March 4,11,18,25
|
||||
$start = "1997-03-13 09:00:00";
|
||||
$end = "1999-03-31 09:00:00";
|
||||
$rule = "RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=TH";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-03-13 09:00:00, 1997-03-20 09:00:00, 1997-03-27 09:00:00, 1998-03-05 09:00:00, 1998-03-12 09:00:00, 1998-03-19 09:00:00, 1998-03-26 09:00:00, 1999-03-04 09:00:00, 1999-03-11 09:00:00, 1999-03-18 09:00:00, 1999-03-25 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every Thursday, but only during June, July, and August, forever:
|
||||
// ==> (1997 9:00 AM EDT)June 5,12,19,26;July 3,10,17,24,31;August 7,14,21,28
|
||||
// (1998 9:00 AM EDT)June 4,11,18,25;July 2,9,16,23,30;August 6,13,20,27
|
||||
// (1999 9:00 AM EDT)June 3,10,17,24;July 1,8,15,22,29;August 5,12,19,26
|
||||
$start = "1997-06-05 09:00:00";
|
||||
$end = "1999-08-31 09:00:00";
|
||||
$rule = "RRULE:FREQ=YEARLY;BYDAY=TH;BYMONTH=6,7,8";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-06-05 09:00:00, 1997-06-12 09:00:00, 1997-06-19 09:00:00, 1997-06-26 09:00:00, 1997-07-03 09:00:00, 1997-07-10 09:00:00, 1997-07-17 09:00:00, 1997-07-24 09:00:00, 1997-07-31 09:00:00, 1997-08-07 09:00:00, 1997-08-14 09:00:00, 1997-08-21 09:00:00, 1997-08-28 09:00:00, 1998-06-04 09:00:00, 1998-06-11 09:00:00, 1998-06-18 09:00:00, 1998-06-25 09:00:00, 1998-07-02 09:00:00, 1998-07-09 09:00:00, 1998-07-16 09:00:00, 1998-07-23 09:00:00, 1998-07-30 09:00:00, 1998-08-06 09:00:00, 1998-08-13 09:00:00, 1998-08-20 09:00:00, 1998-08-27 09:00:00, 1999-06-03 09:00:00, 1999-06-10 09:00:00, 1999-06-17 09:00:00, 1999-06-24 09:00:00, 1999-07-01 09:00:00, 1999-07-08 09:00:00, 1999-07-15 09:00:00, 1999-07-22 09:00:00, 1999-07-29 09:00:00, 1999-08-05 09:00:00, 1999-08-12 09:00:00, 1999-08-19 09:00:00, 1999-08-26 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Monthly on the 2nd and 15th of the month for 10 occurrences:
|
||||
// ==> (1997 9:00 AM EDT)September 2,15;October 2,15
|
||||
// (1997 9:00 AM EST)November 2,15;December 2,15
|
||||
// (1998 9:00 AM EST)January 2,15
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "1998-01-31 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=2,15";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-02 09:00:00, 1997-09-15 09:00:00, 1997-10-02 09:00:00, 1997-10-15 09:00:00, 1997-11-02 09:00:00, 1997-11-15 09:00:00, 1997-12-02 09:00:00, 1997-12-15 09:00:00, 1998-01-02 09:00:00, 1998-01-15 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Monthly on the first and last day of the month for 10 occurrences:
|
||||
// ==> (1997 9:00 AM EDT)September 30;October 1
|
||||
// (1997 9:00 AM EST)October 31;November 1,30;December 1,31
|
||||
// (1998 9:00 AM EST)January 1,31;February 1
|
||||
$start = "1997-09-30 09:00:00";
|
||||
$end = "1998-03-31 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=1,-1";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-30 09:00:00, 1997-10-01 09:00:00, 1997-10-31 09:00:00, 1997-11-01 09:00:00, 1997-11-30 09:00:00, 1997-12-01 09:00:00, 1997-12-31 09:00:00, 1998-01-01 09:00:00, 1998-01-31 09:00:00, 1998-02-01 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every Friday the 13th, forever:
|
||||
$rule = "EXDATE;TZID=US-Eastern:19970902T090000";
|
||||
// ==> (1998 9:00 AM EST)February 13;March 13;November 13
|
||||
// (1999 9:00 AM EDT)August 13
|
||||
// (2000 9:00 AM EDT)October 13
|
||||
$start = "1997-09-02 09:00:00";
|
||||
$end = "2000-12-31 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;BYDAY=FR;BYMONTHDAY=13";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-02 09:00:00, 1998-02-13 09:00:00, 1998-03-13 09:00:00, 1998-11-13 09:00:00, 1999-08-13 09:00:00, 2000-10-13 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//The first Saturday that follows the first Sunday of the month, forever:
|
||||
// ==> (1997 9:00 AM EDT)September 13;October 11
|
||||
// (1997 9:00 AM EST)November 8;December 13
|
||||
// (1998 9:00 AM EST)January 10;February 7;March 7
|
||||
// (1998 9:00 AM EDT)April 11;May 9;June 13...
|
||||
$start = "1997-09-13 09:00:00";
|
||||
$end = "1998-06-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=MONTHLY;BYDAY=SA;BYMONTHDAY=7,8,9,10,11,12,13";
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-09-13 09:00:00, 1997-10-11 09:00:00, 1997-11-08 09:00:00, 1997-12-13 09:00:00, 1998-01-10 09:00:00, 1998-02-07 09:00:00, 1998-03-07 09:00:00, 1998-04-11 09:00:00, 1998-05-09 09:00:00, 1998-06-13 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every four years, the first Tuesday after a Monday in November,
|
||||
//forever (U.S. Presidential Election day):
|
||||
// ==> (1996 9:00 AM EST)November 5
|
||||
// (2000 9:00 AM EST)November 7
|
||||
// (2004 9:00 AM EST)November 2
|
||||
$start = "1996-11-05 09:00:00";
|
||||
$end = "2004-11-30 09:00:00";
|
||||
$rule = "RRULE:FREQ=YEARLY;INTERVAL=4;BYMONTH=11;BYDAY=TU;BYMONTHDAY=2,3,4,5,6,7,8";
|
||||
$shouldbe = '1996-11-05 09:00:00, 2000-11-07 09:00:00, 2004-11-02 09:00:00';
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every 20th Monday of the year, forever:
|
||||
$start = "1997-05-19 09:00:00";
|
||||
$end = "2000-01-01 09:00:00";
|
||||
$rule = "RRULE:FREQ=YEARLY;BYDAY=20MO";
|
||||
// ==> (1997 9:00 AM EDT)May 19
|
||||
// (1998 9:00 AM EDT)May 18
|
||||
// (1999 9:00 AM EDT)May 17
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-05-19 09:00:00, 1998-05-18 09:00:00, 1999-05-17 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
//Every Sunday in January, every other year, forever:
|
||||
$start = "1997-01-05 09:00:00";
|
||||
$end = "2001-02-01 09:00:00";
|
||||
$rule = 'RRULE:FREQ=YEARLY;INTERVAL=2;BYMONTH=1;BYDAY=SU';
|
||||
// ==> (1997 9:00 AM EDT)January 5,12,19,26
|
||||
// (1999 9:00 AM EDT)January 3,10,17,24,31
|
||||
// (2001 9:00 AM EDT)January 7,14,21,28
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '1997-01-05 09:00:00, 1997-01-12 09:00:00, 1997-01-19 09:00:00, 1997-01-26 09:00:00, 1999-01-03 09:00:00, 1999-01-10 09:00:00, 1999-01-17 09:00:00, 1999-01-24 09:00:00, 1999-01-31 09:00:00, 2001-01-07 09:00:00, 2001-01-14 09:00:00, 2001-01-21 09:00:00, 2001-01-28 09:00:00';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
return;
|
||||
|
||||
//Every Thanksgiving, forever:
|
||||
$start = "1997-01-01 09:00:00";
|
||||
$end = "2001-02-01 09:00:00";
|
||||
$rule = 'RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYDAY=4TH';
|
||||
// ==> (1997 9:00 AM EDT)Nov
|
||||
// (1999 9:00 AM EDT)Nov
|
||||
// (2001 9:00 AM EDT)Nov
|
||||
$dates = date_repeat_calc($rule, $start, $end, array());
|
||||
$shouldbe = '';
|
||||
$result = implode(', ', $dates);
|
||||
$this->assertEqual($result, $shouldbe, $rule .'; Starting '. $start .'; results: '. $result);
|
||||
|
||||
// TODO:
|
||||
// BYYEARDAY, BYSETPOS,
|
||||
// BYHOUR, BYMINUTE, HOURLY, MINUTELY, SECONDLY
|
||||
// have not yet been implemented in date_repeat.
|
||||
|
||||
//Every 3rd year on the 1st, 100th and 200th day for 10 occurrences:
|
||||
$date = "DTSTART;TZID=US-Eastern:19970101T090000";
|
||||
$rule = "RRULE:FREQ=YEARLY;INTERVAL=3;COUNT=10;BYYEARDAY=1,100,200";
|
||||
// ==> (1997 9:00 AM EST)January 1
|
||||
// (1997 9:00 AM EDT)April 10;July 19
|
||||
// (2000 9:00 AM EST)January 1
|
||||
// (2000 9:00 AM EDT)April 9;July 18
|
||||
// (2003 9:00 AM EST)January 1
|
||||
// (2003 9:00 AM EDT)April 10;July 19
|
||||
// (2006 9:00 AM EST)January 1
|
||||
|
||||
//Monday of week number 20 (where the default start of the week is Monday), forever:
|
||||
$date = "DTSTART;TZID=US-Eastern:19970512T090000";
|
||||
$rule = "RRULE:FREQ=YEARLY;BYWEEKNO=20;BYDAY=MO";
|
||||
// ==> (1997 9:00 AM EDT)May 12
|
||||
// (1998 9:00 AM EDT)May 11
|
||||
// (1999 9:00 AM EDT)May 17
|
||||
|
||||
//The 3rd instance into the month of one of Tuesday, Wednesday or
|
||||
//Thursday, for the next 3 months:
|
||||
$date = "DTSTART;TZID=US-Eastern:19970904T090000";
|
||||
$rule = "RRULE:FREQ=MONTHLY;COUNT=3;BYDAY=TU,WE,TH;BYSETPOS=3";
|
||||
// ==> (1997 9:00 AM EDT)September 4;October 7
|
||||
// (1997 9:00 AM EST)November 6
|
||||
|
||||
//The 2nd to last weekday of the month:
|
||||
$date = "DTSTART;TZID=US-Eastern:19970929T090000";
|
||||
$rule = "RRULE:FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-2";
|
||||
// ==> (1997 9:00 AM EDT)September 29
|
||||
// (1997 9:00 AM EST)October 30;November 27;December 30
|
||||
// (1998 9:00 AM EST)January 29;February 26;March 30
|
||||
|
||||
//Every 3 hours from 9:00 AM to 5:00 PM on a specific day:
|
||||
$date = "DTSTART;TZID=US-Eastern:19970902T090000";
|
||||
$rule = "RRULE:FREQ=HOURLY;INTERVAL=3;UNTIL=19970902T170000Z";
|
||||
// ==> (September 2, 1997 EDT)09:00,12:00,15:00
|
||||
|
||||
//Every 15 minutes for 6 occurrences:
|
||||
$date = "DTSTART;TZID=US-Eastern:19970902T090000";
|
||||
$rule = "RRULE:FREQ=MINUTELY;INTERVAL=15;COUNT=6";
|
||||
// ==> (September 2, 1997 EDT)09:00,09:15,09:30,09:45,10:00,10:15
|
||||
|
||||
//Every hour and a half for 4 occurrences:
|
||||
$date = "DTSTART;TZID=US-Eastern:19970902T090000";
|
||||
$rule = "RRULE:FREQ=MINUTELY;INTERVAL=90;COUNT=4";
|
||||
// ==> (September 2, 1997 EDT)09:00,10:30;12:00;13:30
|
||||
|
||||
//Every 20 minutes from 9:00 AM to 4:40 PM every day:
|
||||
$date = "DTSTART;TZID=US-Eastern:19970902T090000";
|
||||
$rule = "RRULE:FREQ=DAILY;BYHOUR=9,10,11,12,13,14,15,16;BYMINUTE=0,20,40";
|
||||
// or
|
||||
$rule = "RRULE:FREQ=MINUTELY;INTERVAL=20;BYHOUR=9,10,11,12,13,14,15,16";
|
||||
// ==> (September 2, 1997 EDT)9:00,9:20,9:40,10:00,10:20,16:00,16:20,16:40
|
||||
// (September 3, 1997 EDT)9:00,9:20,9:40,10:00,10:20,16:00,16:20,16:40
|
||||
|
||||
}
|
||||
}
|
|
@ -1,125 +0,0 @@
|
|||
BEGIN:VCALENDAR
|
||||
PRODID:-//Test
|
||||
VERSION:2.0
|
||||
X-WR-CALDESC:Test various iCal RRULEs.
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest1
|
||||
SUMMARY:Daily for 10 occurrences
|
||||
DTSTART;TZID=US-Eastern:20090702T090000
|
||||
RRULE:FREQ=DAILY;COUNT=10
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest2
|
||||
SUMMARY:Daily until December 24, 2009
|
||||
DTSTART;TZID=US-Eastern:20091202T090000
|
||||
RRULE:FREQ=DAILY;UNTIL=20091224T000000Z
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest3
|
||||
SUMMARY:Every other day
|
||||
DTSTART;TZID=US-Eastern:20090202T090000
|
||||
RRULE:FREQ=DAILY;INTERVAL=2
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest4
|
||||
SUMMARY:Every 10 days, 5 occurrences
|
||||
DTSTART;TZID=US-Eastern:20090302T090000
|
||||
RRULE:FREQ=DAILY;INTERVAL=10;COUNT=5
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest5
|
||||
SUMMARY:Everyday in January, for 2 years
|
||||
DTSTART;TZID=US-Eastern:20090101T090000
|
||||
RRULE:FREQ=YEARLY;UNTIL=20110131T090000Z;BYMONTH=1;BYDAY=SU,MO,TU,WE,TH,FR,SA
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest6
|
||||
SUMMARY:Weekly for 10 occurrences
|
||||
DTSTART;TZID=US-Eastern:20090102T090000
|
||||
RRULE:FREQ=WEEKLY;COUNT=10
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest7
|
||||
SUMMARY:Weekly on Tuesday and Thursday for 5 weeks
|
||||
DTSTART;TZID=US-Eastern:20090902T090000
|
||||
RRULE:FREQ=WEEKLY;UNTIL=20091007T000000Z;WKST=SU;BYDAY=TU,TH
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest8
|
||||
SUMMARY:Every other week on Monday, Wednesday and Friday until December 24, 2009:
|
||||
DTSTART;TZID=US-Eastern:20090502T090000
|
||||
RRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=20091224T000000Z;WKST=SU;BYDAY=MO,WE,FR
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest9
|
||||
SUMMARY:Every other week on Tuesday and Thursday, for 8 occurrences
|
||||
DTSTART;TZID=US-Eastern:20090702T090000
|
||||
RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=8;WKST=SU;BYDAY=TU,TH
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest10
|
||||
SUMMARY:Monthly on the 1st Friday for ten occurrences
|
||||
DTSTART;TZID=US-Eastern:20090905T090000
|
||||
RRULE:FREQ=MONTHLY;COUNT=10;BYDAY=1FR
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest11
|
||||
SUMMARY:Monthly on the 1st Friday until December 24, 2009
|
||||
DTSTART;TZID=US-Eastern:20090905T090000
|
||||
RRULE:FREQ=MONTHLY;UNTIL=20091224T000000Z;BYDAY=1FR
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest12
|
||||
SUMMARY:Every other month on the 1st and last Sunday of the month for 10 occurrences
|
||||
DTSTART;TZID=US-Eastern:20090907T090000
|
||||
RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=1SU,-1SU
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest13
|
||||
SUMMARY:Monthly on the second to last Monday of the month for 6 months
|
||||
DTSTART;TZID=US-Eastern:20090119T090000
|
||||
RRULE:FREQ=MONTHLY;COUNT=6;BYDAY=-2MO
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest14
|
||||
SUMMARY:Monthly on the third to the last day of the month
|
||||
DTSTART;TZID=US-Eastern:20090928T090000
|
||||
RRULE:FREQ=MONTHLY;BYMONTHDAY=-3
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest15
|
||||
SUMMARY:Monthly on the 2nd and 15th of the month for 10 occurrences
|
||||
DTSTART;TZID=US-Eastern:20090202T090000
|
||||
RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=2,15
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest16
|
||||
SUMMARY:Monthly on the first and last day of the month for 10 occurrences
|
||||
DTSTART;TZID=US-Eastern:20090130T090000
|
||||
RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=1,-1
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest17
|
||||
SUMMARY:Every 3 months on the 10th thru 15th of the month for 10 occurrences
|
||||
DTSTART;TZID=US-Eastern:20090410T090000
|
||||
RRULE:FREQ=MONTHLY;INTERVAL=3;COUNT=10;BYMONTHDAY=10,11,12,13,14,15
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest18
|
||||
SUMMARY:Every Tuesday, every other month
|
||||
DTSTART;TZID=US-Eastern:20090602T090000
|
||||
RRULE:FREQ=MONTHLY;INTERVAL=2;BYDAY=TU
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest19
|
||||
SUMMARY:Yearly in June and July for 10 occurrences
|
||||
DTSTART;TZID=US-Eastern:20090610T090000
|
||||
RRULE:FREQ=YEARLY;COUNT=10;BYMONTH=6,7
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
UID:iCalRRuleTest20
|
||||
SUMMARY:Every Thursday in March
|
||||
DTSTART;TZID=US-Eastern:20090305T090000
|
||||
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=TH
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
|
@ -1,637 +0,0 @@
|
|||
<?php
|
||||
|
||||
class FileFieldTestCase extends DrupalWebTestCase {
|
||||
protected $admin_user;
|
||||
|
||||
/**
|
||||
* Implementation of setUp().
|
||||
*/
|
||||
function setUp() {
|
||||
// Views is included here just so that it doesn't whine when CCK tries to
|
||||
// clear the caches.
|
||||
$modules = array_merge(func_get_args(), array('content', 'filefield', 'filefield_meta', 'getid3', 'mimedetect', 'token', 'views'));
|
||||
call_user_func_array(array('parent', 'setUp'), $modules);
|
||||
|
||||
// Create and login user
|
||||
$this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer site configuration', 'administer content types', 'administer nodes', 'administer files'));
|
||||
$this->drupalLogin($this->admin_user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a sample file of the specified type.
|
||||
*/
|
||||
function getTestFile($type, $size = NULL) {
|
||||
// Get a file to upload.
|
||||
$file = current($this->drupalGetTestFiles($type, $size));
|
||||
|
||||
// SimpleTest files incorrectly use "filename" instead of "filepath".
|
||||
$file->filepath = $file->filename;
|
||||
$file->filename = basename($file->filepath);
|
||||
$file->filesize = filesize($file->filepath);
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new file field.
|
||||
*
|
||||
* @param $name
|
||||
* The name of the new field (all lowercase), exclude the "field_" prefix.
|
||||
* @param $type
|
||||
* The node type that this field will be added to.
|
||||
* @param $field_options
|
||||
* A list of field options that will be added to the defaults.
|
||||
* @param $widget_options
|
||||
* A list of widget options that will be added to the widget defaults.
|
||||
*/
|
||||
function createFileField($name, $type, $field_options = array(), $widget_options = array()) {
|
||||
module_load_include('inc', 'content', 'includes/content.crud');
|
||||
$field = array(
|
||||
'label' => $name,
|
||||
'field_name' => $name,
|
||||
'type' => 'filefield',
|
||||
'widget_type' => 'filefield_widget',
|
||||
'weight' => 0,
|
||||
'parent' => 0,
|
||||
'type_name' => $type,
|
||||
'list_field' => 0,
|
||||
'list_default' => 1,
|
||||
'description_field' => 0,
|
||||
);
|
||||
|
||||
$field = array_merge($field, $field_options);
|
||||
$field = content_field_instance_create($field);
|
||||
|
||||
$widget = array(
|
||||
'type' => 'filefield_widget',
|
||||
'file_extensions' => '',
|
||||
);
|
||||
|
||||
$field['widget'] = array_merge($field['widget'], $widget, $widget_options);
|
||||
$field = content_field_instance_update($field);
|
||||
|
||||
return $field;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing FileField with new settings.
|
||||
*/
|
||||
function updateFileField($name, $type, $field_options = array(), $widget_options = array()) {
|
||||
$field = content_fields($name, $type);
|
||||
$field = array_merge($field, $field_options);
|
||||
$field['widget'] = array_merge($field['widget'], $widget_options);
|
||||
|
||||
return content_field_instance_update($field);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload a file to a node.
|
||||
*/
|
||||
function uploadNodeFile($file, $field, $nid_or_type, $new_revision = TRUE) {
|
||||
$field_name = $field['field_name'];
|
||||
$edit = array(
|
||||
'title' => $this->randomName(),
|
||||
'revision' => (string) (int) $new_revision,
|
||||
);
|
||||
|
||||
if (is_numeric($nid_or_type)) {
|
||||
$node = node_load($nid_or_type);
|
||||
$delta = isset($node->$field_name) ? count($node->$field_name) : 0;
|
||||
$edit['files[' . $field_name . '_' . $delta . ']'] = realpath($file->filepath);
|
||||
$this->drupalPost('node/' . $nid_or_type . '/edit', $edit, t('Save'));
|
||||
}
|
||||
else {
|
||||
$delta = '0';
|
||||
$edit['files[' . $field_name . '_' . $delta . ']'] = realpath($file->filepath);
|
||||
$type = str_replace('_', '-', $nid_or_type);
|
||||
$this->drupalPost('node/add/' . $type, $edit, t('Save'));
|
||||
}
|
||||
|
||||
$matches = array();
|
||||
preg_match('/node\/([0-9]+)/', $this->getUrl(), $matches);
|
||||
$nid = isset($matches[1]) ? $matches[1] : FALSE;
|
||||
|
||||
// Edit the node and add a description if possible.
|
||||
if ($nid && $field['description_field']) {
|
||||
$edit = array(
|
||||
'revision' => 0,
|
||||
$field_name . '[' . $delta . '][data][description]' => $this->randomString(),
|
||||
);
|
||||
$this->drupalPost('node/' . $nid . '/edit', $edit, t('Save'));
|
||||
}
|
||||
|
||||
return $nid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a file from a node.
|
||||
*
|
||||
* Note that if replacing a file, it must first be removed then added again.
|
||||
*/
|
||||
function removeNodeFile($nid, $new_revision = TRUE) {
|
||||
$edit = array(
|
||||
'revision' => (string) (int) $new_revision,
|
||||
);
|
||||
|
||||
$this->drupalPost('node/' . $nid . '/edit', array(), t('Remove'));
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace a file within a node.
|
||||
*/
|
||||
function replaceNodeFile($file, $field_name, $nid, $new_revision = TRUE) {
|
||||
$edit = array(
|
||||
'files[' . $field_name . '_0]' => realpath($file->filepath),
|
||||
'revision' => (string) (int) $new_revision,
|
||||
);
|
||||
|
||||
$this->drupalPost('node/' . $nid . '/edit', array(), t('Remove'));
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that a file exists physically on disk.
|
||||
*/
|
||||
function assertFileExists($file, $message = NULL) {
|
||||
$message = isset($message) ? $message : t('File %file exists on the disk.', array('%file' => $file['filepath']));
|
||||
$this->assertTrue(is_file($file['filepath']), $message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that a file exists in the database.
|
||||
*/
|
||||
function assertFileEntryExists($file, $message = NULL) {
|
||||
module_load_include('inc', 'filefield', 'field_file');
|
||||
$db_file = field_file_load($file['fid'], TRUE);
|
||||
$message = isset($message) ? $message : t('File %file exists in database at the correct path.', array('%file' => $file['filepath']));
|
||||
$this->assertEqual($db_file['filepath'], $file['filepath'], $message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that a file does not exist on disk.
|
||||
*/
|
||||
function assertFileNotExists($file, $message = NULL) {
|
||||
$message = isset($message) ? $message : t('File %file exists on the disk.', array('%file' => $file['filepath']));
|
||||
$this->assertFalse(is_file($file['filepath']), $message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that a file does not exist in the database.
|
||||
*/
|
||||
function assertFileEntryNotExists($file, $message) {
|
||||
module_load_include('inc', 'filefield', 'field_file');
|
||||
$message = isset($message) ? $message : t('File %file exists in database at the correct path.', array('%file' => $file['filepath']));
|
||||
$this->assertFalse(field_file_load($file['fid'], TRUE), $message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test class to test file handling with node revisions.
|
||||
*/
|
||||
class FileFieldRevisionTestCase extends FileFieldTestCase {
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('FileField revision test'),
|
||||
'description' => t('Test creating and deleting revisions with files attached.'),
|
||||
'group' => t('FileField'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test creating multiple revisions of a node and managing the attached files.
|
||||
*
|
||||
* Expected behaviors:
|
||||
* - Adding a new revision will make another entry in the field table, but
|
||||
* the original file will not be duplicated.
|
||||
* - Deleting a revision should not delete the original file if the file
|
||||
* is in use by another revision.
|
||||
* - When the last revision that uses a file is deleted, the original file
|
||||
* should be deleted also.
|
||||
*/
|
||||
function testRevisions() {
|
||||
$field_name = 'field_' . strtolower($this->randomName());
|
||||
$type = $this->drupalCreateContentType();
|
||||
$field_options = array(
|
||||
'description_field' => '1',
|
||||
);
|
||||
$field = $this->createFileField($field_name, $type->name, $field_options);
|
||||
|
||||
$test_file = $this->getTestFile('text');
|
||||
|
||||
// Create a new node with the uploaded file.
|
||||
$nid = $this->uploadNodeFile($test_file, $field, $type->name);
|
||||
|
||||
// Check that the file exists on disk and in the database.
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file_r1 = $node->{$field['field_name']}[0];
|
||||
$node_vid_r1 = $node->vid;
|
||||
$this->assertFileExists($node_file_r1, t('New file saved to disk on node creation.'));
|
||||
$this->assertFileEntryExists($node_file_r1, t('File entry exists in database on node creation.'));
|
||||
|
||||
// Upload another file to the same node in a new revision.
|
||||
$this->replaceNodeFile($test_file, $field_name, $nid);
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file_r2 = $node->{$field['field_name']}[0];
|
||||
$node_vid_r2 = $node->vid;
|
||||
$this->assertFileExists($node_file_r2, t('Replacement file exists on disk after creating new revision.'));
|
||||
$this->assertFileEntryExists($node_file_r2, t('Replacement file entry exists in database after creating new revision.'));
|
||||
|
||||
// Check that the original file is still in place on the first revision.
|
||||
$node = node_load($nid, $node_vid_r1, TRUE);
|
||||
$this->assertEqual($node_file_r1, $node->{$field['field_name']}[0], t('Original file still in place after replacing file in new revision.'));
|
||||
$this->assertFileExists($node_file_r1, t('Original file still in place after replacing file in new revision.'));
|
||||
$this->assertFileEntryExists($node_file_r1, t('Original file entry still in place after replacing file in new revision'));
|
||||
|
||||
// Save a new version of the node without any changes.
|
||||
// Check that the file is still the same as the previous revision.
|
||||
$this->drupalPost('node/' . $nid . '/edit', array('revision' => '1'), t('Save'));
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file_r3 = $node->{$field['field_name']}[0];
|
||||
$node_vid_r3 = $node->vid;
|
||||
|
||||
// FileField Meta's extensive meta data can be difficult to match up exactly
|
||||
// (mostly differences between strings and integers). Just compare the
|
||||
// descriptions.
|
||||
$node_file_r2['data'] = array('description' => $node_file_r2['data']['description']);
|
||||
$node_file_r3['data'] = array('description' => $node_file_r3['data']['description']);
|
||||
$this->assertEqual($node_file_r2, $node_file_r3, t('Previous revision file still in place after creating a new revision without a new file.'));
|
||||
|
||||
// Revert to the first revision and check that the original file is active.
|
||||
$this->drupalPost('node/' . $nid . '/revisions/' . $node_vid_r1 . '/revert', array(), t('Revert'));
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file_r4 = $node->{$field['field_name']}[0];
|
||||
$node_vid_r4 = $node->vid;
|
||||
$this->assertEqual($node_file_r1, $node_file_r4, t('Original revision file still in place after reverting to the original revision.'));
|
||||
|
||||
// Delete the second revision and check that the file is kept (since it is
|
||||
// still being used by the third revision).
|
||||
$this->drupalPost('node/' . $nid . '/revisions/' . $node_vid_r2 . '/delete', array(), t('Delete'));
|
||||
$this->assertFileExists($node_file_r3, t('Second file is still available after deleting second revision, since it is being used by the third revision.'));
|
||||
$this->assertFileEntryExists($node_file_r3, t('Second file entry is still available after deleting second revision, since it is being used by the third revision.'));
|
||||
|
||||
// Delete the third revision and check that the file is deleted also.
|
||||
$this->drupalPost('node/' . $nid . '/revisions/' . $node_vid_r3 . '/delete', array(), t('Delete'));
|
||||
$this->assertFileNotExists($node_file_r3, t('Second file is now deleted after deleting third revision, since it is no longer being used by any other nodes.'));
|
||||
$this->assertFileEntryNotExists($node_file_r3, t('Second file entry is now deleted after deleting third revision, since it is no longer being used by any other nodes.'));
|
||||
|
||||
// Delete the entire node and check that the original file is deleted.
|
||||
$this->drupalPost('node/' . $nid . '/delete', array(), t('Delete'));
|
||||
$this->assertFileNotExists($node_file_r1, t('Original file is deleted after deleting the entire node with two revisions remaining.'));
|
||||
$this->assertFileEntryNotExists($node_file_r1, t('Original file entry is deleted after deleting the entire node with two revisions remaining.'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test class to check that formatters are working properly.
|
||||
*/
|
||||
class FileFieldDisplayTestCase extends FileFieldTestCase {
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('FileField display tests'),
|
||||
'description' => t('Test the display of file fields in node and views.'),
|
||||
'group' => t('FileField'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test normal formatter display on node display.
|
||||
*/
|
||||
function testNodeDisplay() {
|
||||
$field_name = 'field_' . strtolower($this->randomName());
|
||||
$type = $this->drupalCreateContentType();
|
||||
$field_options = array(
|
||||
'description_field' => '1',
|
||||
'list_field' => '1',
|
||||
'list_default' => '1',
|
||||
);
|
||||
$field = $this->createFileField($field_name, $type->name, $field_options);
|
||||
$test_file = $this->getTestFile('text');
|
||||
|
||||
// Create a new node with the uploaded file.
|
||||
$nid = $this->uploadNodeFile($test_file, $field, $type->name);
|
||||
$this->drupalGet('node/' . $nid);
|
||||
|
||||
// Check that the default formatter is displaying with the file name.
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$default_output = theme('filefield_file', $node_file);
|
||||
$this->assertRaw($default_output, t('Default formatter displaying correctly on full node view.'));
|
||||
|
||||
// Turn the "list" option off and check that the file is no longer listed.
|
||||
$edit = array($field['field_name'] . '[0][list]' => FALSE);
|
||||
$this->drupalPost('node/' . $nid . '/edit', $edit, t('Save'));
|
||||
|
||||
$this->assertNoRaw($default_output, t('Field is hidden when "list" option is unchecked.'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test class to check for various validations.
|
||||
*/
|
||||
class FileFieldValidateTestCase extends FileFieldTestCase {
|
||||
protected $field;
|
||||
protected $node_type;
|
||||
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('FileField validation tests'),
|
||||
'description' => t('Tests validation functions such as file type, max file size, max size per node, and required.'),
|
||||
'group' => t('FileField'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of setUp().
|
||||
*/
|
||||
function setUp() {
|
||||
$modules = array_merge(func_get_args(), array('content', 'filefield', 'filefield_meta', 'getid3', 'mimedetect', 'token', 'views'));
|
||||
call_user_func_array(array('parent', 'setUp'), $modules);
|
||||
|
||||
$this->node_type = $this->drupalCreateContentType();
|
||||
$this->node_type->url_name = str_replace('_', '-', $this->node_type->name);
|
||||
$field_name = 'field_' . strtolower($this->randomName());
|
||||
$this->field = $this->createFileField($field_name, $this->node_type->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test required property on file fields.
|
||||
*/
|
||||
function testRequired() {
|
||||
$type = $this->node_type;
|
||||
$field = $this->field;
|
||||
|
||||
// Make our field required.
|
||||
$this->updateFileField($field['field_name'], $type->name, array('required' => '1'));
|
||||
|
||||
$test_file = $this->getTestFile('image');
|
||||
|
||||
// Try to post a new node without uploading a file.
|
||||
$edit = array('title' => $this->randomName());
|
||||
$this->drupalPost('node/add/' . $type->url_name, $edit, t('Save'));
|
||||
|
||||
$this->assertRaw(t('%title field is required.', array('%title' => $field['widget']['label'])), t('Node save failed when required file field was empty.'));
|
||||
|
||||
// Create a new node with the uploaded file.
|
||||
$nid = $this->uploadNodeFile($test_file, $field, $type->name);
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$this->assertFileExists($node_file, t('File exists after uploading to the required field.'));
|
||||
$this->assertFileEntryExists($node_file, t('File entry exists after uploading to the required field.'));
|
||||
|
||||
// Try again with a multiple value field.
|
||||
$this->updateFileField($field['field_name'], $type->name, array('multiple' => '0', 'required' => '1'));
|
||||
|
||||
// Try to post a new node without uploading a file in the multivalue field.
|
||||
$edit = array('title' => $this->randomName());
|
||||
$this->drupalPost('node/add/' . $type->url_name, $edit, t('Save'));
|
||||
|
||||
$this->assertRaw(t('%title field is required.', array('%title' => $field['widget']['label'])), t('Node save failed when required multiple value file field was empty.'));
|
||||
|
||||
// Create a new node with the uploaded file into the multivalue field.
|
||||
$nid = $this->uploadNodeFile($test_file, $field, $type->name);
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$this->assertFileExists($node_file, t('File exists after uploading to the required multiple value field.'));
|
||||
$this->assertFileEntryExists($node_file, t('File entry exists after uploading to the required multipel value field.'));
|
||||
|
||||
// Set the field back to not required.
|
||||
$this->updateFileField($field['field_name'], $type->name, array('multiple' => '0', 'required' => '1'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the max file size validator.
|
||||
*/
|
||||
function testFileMaxSize() {
|
||||
$type = $this->node_type;
|
||||
$field = $this->field;
|
||||
|
||||
$small_file = $this->getTestFile('text', 131072); // 128KB.
|
||||
$large_file = $this->getTestFile('text', 1310720); // 1.2MB
|
||||
|
||||
// Test uploading both a large and small file with different increments.
|
||||
$sizes = array(
|
||||
'1M' => 1048576,
|
||||
'1024K' => 1048576,
|
||||
'1048576' => 1048576,
|
||||
);
|
||||
|
||||
foreach ($sizes as $max_filesize_per_file => $file_limit) {
|
||||
// Set the max file upload size.
|
||||
$this->updateFileField($field['field_name'], $type->name, array(), array('max_filesize_per_file' => $max_filesize_per_file));
|
||||
|
||||
// Create a new node with the small file, which should pass.
|
||||
$nid = $this->uploadNodeFile($small_file, $field, $type->name);
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$this->assertFileExists($node_file, t('File exists after uploading a file (%filesize) under the max limit (%maxsize).', array('%filesize' => format_size($small_file->filesize), '%maxsize' => $max_filesize_per_file)));
|
||||
$this->assertFileEntryExists($node_file, t('File entry exists after uploading a file (%filesize) under the max limit (%maxsize).', array('%filesize' => format_size($small_file->filesize), '%maxsize' => $max_filesize_per_file)));
|
||||
|
||||
// Check that uploading the large file fails (1M limit).
|
||||
$nid = $this->uploadNodeFile($large_file, $field, $type->name);
|
||||
$error_message = t('The file is %filesize exceeding the maximum file size of %maxsize.', array('%filesize' => format_size($large_file->filesize), '%maxsize' => format_size($file_limit)));
|
||||
$this->assertRaw($error_message, t('Node save failed when file (%filesize) exceeded the max upload size (%maxsize).', array('%filesize' => format_size($large_file->filesize), '%maxsize' => $max_filesize_per_file)));
|
||||
}
|
||||
|
||||
// Turn off the max filesize.
|
||||
$this->updateFileField($field['field_name'], $type->name, array(), array('max_filesize_per_file' => ''));
|
||||
|
||||
// Upload the big file successfully.
|
||||
$nid = $this->uploadNodeFile($large_file, $field, $type->name);
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$this->assertFileExists($node_file, t('File exists after uploading a file (%filesize) with no max limit.', array('%filesize' => format_size($large_file->filesize))));
|
||||
$this->assertFileEntryExists($node_file, t('File entry exists after uploading a file (%filesize) with no max limit.', array('%filesize' => format_size($large_file->filesize))));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the max file size per node validator.
|
||||
*/
|
||||
function testNodeMaxSize() {
|
||||
$type = $this->node_type;
|
||||
$field = $this->field;
|
||||
|
||||
$small_file = $this->getTestFile('text', 131072); // 128KB.
|
||||
$large_file = $this->getTestFile('text', 1310720); // 1.2MB
|
||||
|
||||
// Set the max file upload size.
|
||||
$max_node_limit = '256K';
|
||||
$file_limit = 262144;
|
||||
$this->updateFileField($field['field_name'], $type->name, array('multiple' => '1'), array('max_filesize_per_node' => $max_node_limit));
|
||||
|
||||
// Create a new node with the small file, which should pass.
|
||||
$nid = $this->uploadNodeFile($small_file, $field, $type->name);
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$this->assertFileExists($node_file, t('File exists after uploading a file (%filesize) under the max node limit (%maxsize).', array('%filesize' => format_size($small_file->filesize), '%maxsize' => $max_node_limit)));
|
||||
$this->assertFileEntryExists($node_file, t('File entry exists after uploading a file (%filesize) under the max node limit (%maxsize).', array('%filesize' => format_size($small_file->filesize), '%maxsize' => $max_node_limit)));
|
||||
|
||||
// Add a second file to the same node which should pass.
|
||||
$nid = $this->uploadNodeFile($small_file, $field, $nid);
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$this->assertFileExists($node_file, t('File exists after uploading a file (%filesize) under the max node limit (%maxsize).', array('%filesize' => format_size($small_file->filesize), '%maxsize' => $max_node_limit)));
|
||||
$this->assertFileEntryExists($node_file, t('File entry exists after uploading a file (%filesize) under the max node limit (%maxsize).', array('%filesize' => format_size($small_file->filesize), '%maxsize' => $max_node_limit)));
|
||||
|
||||
// Add a third file to the same node which should fail.
|
||||
$nid = $this->uploadNodeFile($small_file, $field, $nid);
|
||||
$error_message = t('exceeds field settings of %msize.', array('%msize' => format_size($file_limit)));
|
||||
$this->assertRaw($error_message, t('File not uploaded as the file (%filesize) exceeds the max node limit (%maxsize).', array('%filesize' => format_size($small_file->filesize), '%maxsize' => $max_node_limit)));
|
||||
|
||||
// Check that uploading the large file fails (1M limit).
|
||||
$nid = $this->uploadNodeFile($large_file, $field, $type->name);
|
||||
$error_message = t('exceeds field settings of %msize.', array('%msize' => format_size($file_limit)));
|
||||
$this->assertRaw($error_message, t('File not uploaded as the file (%filesize) exceeds the max node limit (%maxsize).', array('%filesize' => format_size($large_file->filesize), '%maxsize' => $max_node_limit)));
|
||||
|
||||
// Turn off the max filesize per node.
|
||||
$this->updateFileField($field['field_name'], $type->name, array('multiple' => '0'), array('max_filesize_per_node' => ''));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the file extension, do additional checks if mimedetect is installed.
|
||||
*/
|
||||
function testFileExtension() {
|
||||
$type = $this->node_type;
|
||||
$field = $this->field;
|
||||
|
||||
// Setup files for extension checking.
|
||||
$test_file = $this->getTestFile('image');
|
||||
preg_match('/(?<=\.)[^\.]*$/', $test_file->filename, $matches);
|
||||
$extention = current($matches);
|
||||
$wrong_extension_file = drupal_clone($test_file);
|
||||
$wrong_extension_file->filename = str_replace(".$extention", '.jpg', $test_file->filename);
|
||||
$wrong_extension_file->filepath = file_directory_path() .'/'. $wrong_extension_file->filename;
|
||||
$original_path = $test_file->filepath;
|
||||
file_copy($original_path, $wrong_extension_file->filepath);
|
||||
|
||||
$this->updateFileField($field['field_name'], $type->name, array(), array('file_extensions' => ''));
|
||||
|
||||
// Check that the file can be uploaded with no extension checking.
|
||||
$nid = $this->uploadNodeFile($test_file, $field, $type->name);
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$this->assertFileExists($node_file, t('File exists after uploading a file with no extension checking.'));
|
||||
$this->assertFileEntryExists($node_file, t('File entry exists after uploading a file with no extension checking.'));
|
||||
|
||||
// Enable extension checking.
|
||||
$this->updateFileField($field['field_name'], $type->name, array(), array('file_extensions' => "txt png jpg $extention"));
|
||||
|
||||
// Check that the file can be uploaded with extension checking.
|
||||
$nid = $this->uploadNodeFile($test_file, $field, $type->name);
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$this->assertFileExists($node_file, t('File exists after uploading a file with extension checking.'));
|
||||
$this->assertFileEntryExists($node_file, t('File entry exists after uploading a file with extension checking.'));
|
||||
|
||||
// Check that a mismatched extension cannot be uploaded.
|
||||
$mimedetect = FALSE;
|
||||
if (module_exists('mimedetect')) {
|
||||
$mimedetect = TRUE;
|
||||
module_load_include('install', 'mimedetect');
|
||||
if (!extension_loaded('fileinfo')) {
|
||||
variable_set('mimedetect_enable_file_binary', 1);
|
||||
}
|
||||
$requirements = mimedetect_requirements('runtime');
|
||||
foreach ($requirements as $requirement) {
|
||||
if (isset($requirement['severity']) && $requirement['severity'] == REQUIREMENT_ERROR) {
|
||||
$mimedetect = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($mimedetect) {
|
||||
$this->uploadNodeFile($wrong_extension_file, $field, $type->name);
|
||||
$error_pattern = "/The file contents \([a-z\-\/]+\) do not match its extension \([a-z]+\)\./";
|
||||
$this->assertPattern($error_pattern, t('File prevented from uploading because its extension does not match its content.'));
|
||||
}
|
||||
else {
|
||||
$this->assertTrue(TRUE, t('Mime type checking and extension spoofing skipped because the mimedetect module is not available.'));
|
||||
}
|
||||
|
||||
// Disable the extension checking.
|
||||
$this->updateFileField($field['field_name'], $type->name, array(), array('file_extensions' => ''));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test class to check that files are uploaded to proper locations.
|
||||
*/
|
||||
class FileFieldPathTestCase extends FileFieldTestCase {
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('FileField file path tests'),
|
||||
'description' => t('Test that files are uploaded to the proper location, extra testing if Token module is available.'),
|
||||
'group' => t('FileField'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test normal formatter display on node display.
|
||||
*/
|
||||
function testUploadPath() {
|
||||
$field_name = 'field_' . strtolower($this->randomName());
|
||||
$type = $this->drupalCreateContentType();
|
||||
$field = $this->createFileField($field_name, $type->name);
|
||||
$test_file = $this->getTestFile('text');
|
||||
|
||||
// Create a new node.
|
||||
$nid = $this->uploadNodeFile($test_file, $field, $type->name);
|
||||
|
||||
// Check that the file was uploaded to the file root.
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$this->assertPathMatch(file_directory_path() . '/' . $test_file->filename, $node_file['filepath'], t('The file %file was uploaded to the correct path.', array('%file' => $node_file['filepath'])));
|
||||
|
||||
// Change the path to contain multiple subdirectories.
|
||||
$field = $this->updateFileField($field['field_name'], $type->name, array(), array('file_path' => 'foo/bar/baz'));
|
||||
|
||||
// Upload a new file into the subdirectories.
|
||||
$nid = $this->uploadNodeFile($test_file, $field, $type->name);
|
||||
|
||||
// Check that the file was uploaded into the subdirectory.
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$this->assertPathMatch(file_directory_path() . '/foo/bar/baz/' . $test_file->filename, $node_file['filepath'], t('The file %file was uploaded to the correct path.', array('%file' => $node_file['filepath'])));
|
||||
|
||||
// Check the path when used with tokens.
|
||||
if (module_exists('token')) {
|
||||
// Change the path to contain multiple token directories.
|
||||
$field = $this->updateFileField($field['field_name'], $type->name, array(), array('file_path' => '[uid]/[user-raw]'));
|
||||
|
||||
// Upload a new file into the token subdirectories.
|
||||
$nid = $this->uploadNodeFile($test_file, $field, $type->name);
|
||||
|
||||
// Check that the file was uploaded into the subdirectory.
|
||||
$node = node_load($nid, NULL, TRUE);
|
||||
$node_file = $node->{$field['field_name']}[0];
|
||||
$subdirectory = token_replace('[uid]/[user-raw]', 'user', $this->admin_user);
|
||||
$this->assertPathMatch(file_directory_path() . '/' . $subdirectory . '/' . $test_file->filename, $node_file['filepath'], t('The file %file was uploaded to the correct path with token replacements.', array('%file' => $node_file['filepath'])));
|
||||
}
|
||||
else {
|
||||
$this->assertTrue(TRUE, t('File path token test skipped because the Token module is not available.'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A loose assertion to check that a file is uploaded to the right location.
|
||||
*
|
||||
* @param $expected_path
|
||||
* The location where the file is expected to be uploaded. Duplicate file
|
||||
* names to not need to be taken into account.
|
||||
* @param $actual_path
|
||||
* Where the file was actually uploaded.
|
||||
* @param $message
|
||||
* The message to display with this assertion.
|
||||
*/
|
||||
function assertPathMatch($expected_path, $actual_path, $message) {
|
||||
// Strip off the extension of the expected path to allow for _0, _1, etc.
|
||||
// suffixes when the file hits a duplicate name.
|
||||
$pos = strrpos($expected_path, '.');
|
||||
$base_path = substr($expected_path, 0, $pos);
|
||||
$extension = substr($expected_path, $pos + 1);
|
||||
|
||||
$result = preg_match('/' . preg_quote($base_path, '/') . '(_[0-9]+)?\.' . preg_quote($extension, '/') . '/', $actual_path);
|
||||
$this->assertTrue($result, $message);
|
||||
}
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
# $Id: uk.po,v 1.1.2.2 2009/09/16 17:31:54 podarok Exp $
|
||||
#
|
||||
# Ukrainian translation of Drupal (general)
|
||||
# Copyright YEAR NAME <EMAIL@ADDRESS>
|
||||
# Generated from files:
|
||||
# htmlpurifier.module,v 1.8 2009/07/09 23:57:44 ezyang
|
||||
# htmlpurifier.info,v 1.6 2008/04/24 04:13:09 ezyang
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: html purufuer drupal module\n"
|
||||
"POT-Creation-Date: 2009-09-16 20:13+0300\n"
|
||||
"PO-Revision-Date: 2009-09-16 20:24+0200\n"
|
||||
"Last-Translator: podarok <podarok@ua.fm>\n"
|
||||
"Language-Team: Ukrainian <podarok@ua.fm>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((((n%10)==1)&&((n%100)!=11))?(0):(((((n%10)>=2)&&((n%10)<=4))&&(((n%100)<10)||((n%100)>=20)))?(1):2));\n"
|
||||
"X-Poedit-Language: Ukrainian\n"
|
||||
"X-Poedit-Country: UKRAINE\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#: htmlpurifier.module:20
|
||||
#: htmlpurifier.info:0
|
||||
msgid "Filter that removes malicious HTML and ensures standards compliant output."
|
||||
msgstr "Фільтр, що видаляє шкідливий HTML і сприяє збереженню стандартів виводу"
|
||||
|
||||
#: htmlpurifier.module:74;263
|
||||
#: htmlpurifier.info:0
|
||||
msgid "HTML Purifier"
|
||||
msgstr "HTML Чистильщик"
|
||||
|
||||
#: htmlpurifier.module:74
|
||||
msgid "HTML Purifier (advanced)"
|
||||
msgstr "HTML Чистильщик (розширений)"
|
||||
|
||||
#: htmlpurifier.module:91
|
||||
msgid "<em>This version has advanced configuration options, do not enable both at the same time.</em>"
|
||||
msgstr "<em>Ця версія має додаткові можливості, не вмикаєте обидві одночасно</em>"
|
||||
|
||||
#: htmlpurifier.module:113
|
||||
msgid "HTML tags will be transformed to conform to HTML standards."
|
||||
msgstr "HTML теги будуть перетворені у відповідності до стандартів HTML "
|
||||
|
||||
#: htmlpurifier.module:268
|
||||
msgid "Display help text"
|
||||
msgstr "Відображення тексту допомоги"
|
||||
|
||||
#: htmlpurifier.module:270
|
||||
msgid "If enabled, a short note will be added to the filter tips explaining that HTML will be transformed to conform with HTML standards. You may want to disable this option when the HTML Purifier is used to check the output of another filter like BBCode."
|
||||
msgstr "Якщо увімкнено, короткі нотатки будуть додані до підказок фільтрів, що пояснюватимуть яким чином HTML буде трансформовано до стандартів. Ви можете вимкнути це в випадках, якщо Чистильщик використовуватиметься для виводу інших фільтрів, наприклад BBCode."
|
||||
|
||||
#: htmlpurifier.module:276
|
||||
msgid "<div>Configuration function <code>!function()</code> is already defined. To edit HTML Purifier's configuration, edit the corresponding configuration file, which is usually <code>htmlpurifier/config/!format.php</code>. To restore the web configuration form, delete or rename this file.</div>"
|
||||
msgstr "<div>Функція налагодження <code>!function()</code> вже зазначена. Для правки параметрів HTML Чистильщика, змінюйте вкладений файл налаштувань, що зазвичай є <code>htmlpurifier/config/!format.php</code>. Для відновлення параметрів форми налаштування, стріть або перейменуйте цей файл.</div>"
|
||||
|
||||
#: htmlpurifier.module:281
|
||||
msgid "Configure HTML Purifier"
|
||||
msgstr "Управління модулем HTML Чистильщик"
|
||||
|
||||
#: htmlpurifier.module:296
|
||||
msgid "Advanced configuration options"
|
||||
msgstr "Розширені налагодження"
|
||||
|
||||
#: htmlpurifier.module:300
|
||||
msgid "Allow double caching"
|
||||
msgstr "Дозвіл на подвійне кешування"
|
||||
|
||||
#: htmlpurifier.module:302
|
||||
msgid "If enabled, HTML Purifier will tell filter that its output is cacheable. This is not usually necessary, because HTML Purifier maintains its own cache, but may be helpful if you have later filters that need to be cached."
|
||||
msgstr "Якщо увімкнено, HTML Чистильщик буде повідомляти, що вивід кешований. Це не є необхідно, бо HTML Чистильщик володіє власним кешуванням, але може бути корисно, якщо Ви маєте подальші фільтри, що потребують кешування."
|
||||
|
||||
#: htmlpurifier.module:310
|
||||
msgid "Please click on a directive name for more information on what it does before enabling or changing anything!"
|
||||
msgstr "Тисніть на імя для додаткової інформації для того, що це таке, переж вмиканням та змінюванням будь чого"
|
||||
|
||||
#: htmlpurifier.module:0
|
||||
msgid "htmlpurifier"
|
||||
msgstr "html-чистильщик"
|
||||
|
|
@ -1,169 +0,0 @@
|
|||
<?php // $Id$
|
||||
|
||||
/**
|
||||
* Test class for testing imagecache_create_url() in several use cases with
|
||||
* the different combinations of clean URLs and private/public download method.
|
||||
*/
|
||||
class ImageCacheUrlTests extends DrupalTestCase {
|
||||
|
||||
/**
|
||||
* General admin user.
|
||||
*/
|
||||
var $admin_user;
|
||||
|
||||
/**
|
||||
* The id of the php input format.
|
||||
*/
|
||||
var $input_format_id;
|
||||
|
||||
/**
|
||||
* Drupal SimpleTest method: return metadata about the test.
|
||||
*/
|
||||
function get_info() {
|
||||
return array(
|
||||
'name' => 'ImageCache Create URL Tests',
|
||||
'desc' => 'Assure that URLs are properly generated by imagecache_create_url(), as discussed at http://drupal.org/node/241541',
|
||||
'group' => 'ImageCache',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* SimpleTest core method: code run before each and every test method.
|
||||
*/
|
||||
function setUp() {
|
||||
// Always call the setUp() function from the parent class.
|
||||
parent::setUp();
|
||||
|
||||
// Make sure that the ImageCache module is enabled.
|
||||
$this->drupalModuleEnable('imagecache');
|
||||
|
||||
// Create admin user
|
||||
$permissions = array(
|
||||
'administer filters',
|
||||
);
|
||||
$this->admin_user = $this->drupalCreateUserRolePerm($permissions);
|
||||
|
||||
// Log in with admin user.
|
||||
$this->drupalLoginUser($this->admin_user);
|
||||
|
||||
// Add an input format with PHP evaluator.
|
||||
$edit = array(
|
||||
'name' => $this->randomName(10, 'inputformat_'),
|
||||
'filters[filter/1]' => TRUE,
|
||||
'roles[2]' => TRUE,
|
||||
);
|
||||
$this->drupalPostRequest('admin/settings/filters/add', $edit, t('Save configuration'));
|
||||
// Store the format id of the created input format.
|
||||
$this->input_format_id = db_result(db_query("SELECT format FROM {filter_formats} WHERE name = '%s'", $edit['name']));
|
||||
$this->assertTrue($this->input_format_id, t('Input format id (%s)'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* SimpleTest core method: code run after each and every test method.
|
||||
*/
|
||||
function tearDown() {
|
||||
// Remove input format.
|
||||
$this->drupalPostRequest('admin/settings/filters/delete/'. $this->input_format_id, array(), t('Delete'));
|
||||
// Log out admin user.
|
||||
$this->drupalGet('logout');
|
||||
|
||||
// Always call the tearDown() function from the parent class.
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test function that tests imagecache_create_url() under
|
||||
* the different combinations of clean URLs and file download method
|
||||
*/
|
||||
function testImageCacheCreateUrl() {
|
||||
// No Clean URLs + public downloads : http://example.com/?q=path/to/files/imagecache/preset/foo.jpg
|
||||
$this->_ImagecacheCreateUrlTest(
|
||||
false, FILE_DOWNLOADS_PUBLIC,
|
||||
'path/to/files', 'preset', 'foo.jpg',
|
||||
'http://example.com/?q=path/to/files/imagecache/preset/foo.jpg'
|
||||
);
|
||||
|
||||
// Clean URLs + public downloads : http://example.com/path/to/files/imagecache/preset/foo.jpg
|
||||
$this->_ImagecacheCreateUrlTest(
|
||||
true, FILE_DOWNLOADS_PUBLIC,
|
||||
'path/to/files', 'preset', 'foo.jpg',
|
||||
'http://example.com/path/to/files/imagecache/preset/foo.jpg'
|
||||
);
|
||||
|
||||
// No Clean URLs + private downloads : http://example.com/?q=system/files/imagecache/preset/foo.jpg
|
||||
$this->_ImagecacheCreateUrlTest(
|
||||
false, FILE_DOWNLOADS_PRIVATE,
|
||||
'path/to/files', 'preset', 'foo.jpg',
|
||||
'http://example.com/?q=system/files/imagecache/preset/foo.jpg'
|
||||
);
|
||||
|
||||
// Clean URLs + private downloads : http://example.com/system/files/imagecache/preset/foo.jpg
|
||||
$this->_ImagecacheCreateUrlTest(
|
||||
true, FILE_DOWNLOADS_PRIVATE,
|
||||
'path/to/files', 'preset', 'foo.jpg',
|
||||
'http://example.com/system/files/imagecache/preset/foo.jpg'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function to actually perform URL tests.
|
||||
* @param $clean_url
|
||||
* 'clean_url' setting for test.
|
||||
* @param $file_downloads
|
||||
* 'file_downloads' setting for test.
|
||||
* @param $file_directory_path
|
||||
* 'file_directory_path' setting for tests.
|
||||
* @param $preset
|
||||
* imagecache preset name to be used for test.
|
||||
* @param $path
|
||||
* file path to be used for generating output.
|
||||
* @param $expected
|
||||
* the url expected as output from imagecache_create_url
|
||||
*
|
||||
* Note about the implementation:
|
||||
* At first sight one might think this can be easily implemented with just
|
||||
* setting the Drupal settings, calling imagecache_create_url() and checking
|
||||
* the result. This does not work however because the url() function, which is
|
||||
* used by imagecache_create_url(), caches the clean_url setting with an
|
||||
* internal static variable. This means that only one setting of clean_url
|
||||
* can be evaluated per page view.
|
||||
* To make testing possible, this function creates a node with the PHP
|
||||
* evaluator as input filter and puts a proper call to imagecache_create_url()
|
||||
* in the node body. The node view, which is a page view on its own can then
|
||||
* be checked for the correctly generated URL.
|
||||
*/
|
||||
private function _ImagecacheCreateUrlTest($clean_url, $file_downloads, $file_directory_path, $preset, $path, $expected) {
|
||||
// Drupal settings
|
||||
$this->drupalVariableSet('clean_url', $clean_url);
|
||||
$this->drupalVariableSet('file_downloads', $file_downloads);
|
||||
$this->drupalVariableSet('file_directory_path', $file_directory_path);
|
||||
|
||||
// Build node body (php code).
|
||||
$body = "<?php
|
||||
// Change base_url
|
||||
\$GLOBALS['base_url'] = 'http://example.com';
|
||||
// Generate URL and check it.
|
||||
echo imagecache_create_url('$preset', '$path');
|
||||
?>";
|
||||
// Create node.
|
||||
$node = $this->drupalCreateNode(array(
|
||||
'body' => $body,
|
||||
'format' => $this->input_format_id,
|
||||
));
|
||||
|
||||
// Show node.
|
||||
$this->drupalGet(url('node/' . $node->nid, NULL, NULL, TRUE));
|
||||
|
||||
// Check if expected url shows up
|
||||
$this->assertWantedRaw($expected,
|
||||
t('[ImageCacheUrlTests] @clean_url + @file_downloads should return "@expected"', array(
|
||||
'@clean_url' => ($clean_url ? 'Clean URLs' : 'No clean URLs'),
|
||||
'@file_downloads' => ($file_downloads == FILE_DOWNLOADS_PRIVATE ? 'private downloads' : 'public downloads'),
|
||||
'@expected' => $expected)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
|
@ -1,764 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Basic simpletests to test options on link module.
|
||||
*/
|
||||
|
||||
// Let's include the parent class.
|
||||
module_load_include('test', 'content', 'tests/content.crud');
|
||||
|
||||
class LinkAttributeCrudTest extends ContentCrudTestCase {
|
||||
|
||||
private $zebra;
|
||||
|
||||
public $permissions = array(
|
||||
'access content',
|
||||
'administer content types',
|
||||
'administer nodes',
|
||||
'administer filters',
|
||||
'access comments',
|
||||
'post comments',
|
||||
'post comments without approval',
|
||||
'access administration pages',
|
||||
);
|
||||
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Link Attribute Tests'),
|
||||
'description' => t('Tests the field attributes, making sure they appear in various displayed situations.'),
|
||||
'group' => t('Link'),
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
$this->zebra = 0;
|
||||
parent::setUp('link');
|
||||
$this->loginWithPermissions($this->permissions);
|
||||
}
|
||||
|
||||
function createLink($url, $title, $attributes = array()) {
|
||||
return array(
|
||||
'url' => $url,
|
||||
'title' => $title,
|
||||
'attributes' => $attributes,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* This usually isn't needed. $this->pass($this->content); will usually
|
||||
* display the current page.
|
||||
*/
|
||||
private function outputScreenContents($description, $basename) {
|
||||
// This is a hack to get a directory that won't be cleaned up by simpletest
|
||||
$file_dir = file_directory_path() .'/../simpletest_output_pages';
|
||||
if (!is_dir($file_dir)) {
|
||||
mkdir($file_dir, 0777, TRUE);
|
||||
}
|
||||
$output_path = "$file_dir/$basename." . $this->randomName(10) . '.html';
|
||||
$rv = file_put_contents($output_path, $this->drupalGetContent());
|
||||
$this->pass("$description: Contents of result page are ". l('here', $output_path));
|
||||
}
|
||||
|
||||
private function assertLinkOnNode($field_name, $link_value, $message = '', $group = 'Other') {
|
||||
$this->zebra++;
|
||||
$zebra_string = ($this->zebra % 2 == 0) ? 'even' : 'odd';
|
||||
$cssFieldLocator = 'field-'. str_replace('_', '-', $field_name);
|
||||
$this->assertPattern('@<div class="field field-type-link '. $cssFieldLocator .'".*<div class="field-item '. $zebra_string .'">\s*'. $link_value .'\s*</div>@is',
|
||||
$message,
|
||||
$group);
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple test that just creates a new node type, adds a link field to it, creates a new node of that type, and makes sure
|
||||
* that the node is being displayed.
|
||||
*/
|
||||
function testBasic() {
|
||||
$this->acquireContentTypes(1);
|
||||
variable_set('node_options_'. $this->content_types[0]->name, array('status', 'promote'));
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(), // <-- This is needed or we have an error.
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->pass('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(2);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
$node->promote = 1; // We want this to show on front page for the teaser test.
|
||||
$node->{$field['field_name']}[0] = $this->createLink('http://www.example.com', 'Test Link');
|
||||
node_save($node);
|
||||
|
||||
// Does this display on the node page?
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com'));
|
||||
|
||||
// Does this display on the front page?
|
||||
$this->drupalGet('<front>');
|
||||
// reset the zebra!
|
||||
$this->zebra = 0;
|
||||
$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com'));
|
||||
}
|
||||
|
||||
/**
|
||||
* This test sees that we can create a link field with a defined class, and make sure
|
||||
* that class displays properly when the link is displayed.
|
||||
*/
|
||||
function testLinkWithClassOnField() {
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => 'test-class',
|
||||
'target' => 'default',
|
||||
'rel' => FALSE,
|
||||
),
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->pass('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(2);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
$node->promote = 1; // We want this to show on front page for the teaser test.
|
||||
$node->{$field['field_name']}[0] = $this->createLink('http://www.example.com', 'Test Link');
|
||||
node_save($node);
|
||||
|
||||
// Does this display on the node page?
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
//$this->outputScreenContents('Link field with class', 'link_');
|
||||
$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com', array('attributes' => array('class' => 'test-class'))));
|
||||
|
||||
// Does this display on the front page?
|
||||
$this->drupalGet('<front>');
|
||||
// reset the zebra!
|
||||
$this->zebra = 0;
|
||||
$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com', array('attributes' => array('class' => 'test-class'))));
|
||||
}
|
||||
|
||||
function testLinkWithNoFollowOnField() {
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => '',
|
||||
'target' => 'default',
|
||||
'rel' => 'nofollow',
|
||||
),
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->pass('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(2);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
$node->promote = 1; // We want this to show on front page for the teaser test.
|
||||
$node->{$field['field_name']}[0] = $this->createLink('http://www.example.com', 'Test Link');
|
||||
node_save($node);
|
||||
|
||||
// Does this display on the node page?
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
//$this->outputScreenContents('Link field with class', 'link_');
|
||||
$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com', array('attributes' => array('rel' => 'nofollow'))));
|
||||
|
||||
// Does this display on the front page?
|
||||
$this->drupalGet('<front>');
|
||||
// reset the zebra!
|
||||
$this->zebra = 0;
|
||||
$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com', array('attributes' => array('rel' => 'nofollow'))));
|
||||
}
|
||||
|
||||
function testLinkWithNoFollowOnFieldTargetNewWindow() {
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => '',
|
||||
'target' => LINK_TARGET_NEW_WINDOW,
|
||||
'rel' => 'nofollow',
|
||||
),
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->pass('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(2);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
$node->promote = 1; // We want this to show on front page for the teaser test.
|
||||
$node->{$field['field_name']}[0] = $this->createLink('http://www.example.com', 'Test Link');
|
||||
node_save($node);
|
||||
|
||||
// Does this display on the node page?
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
//$this->outputScreenContents('Link field with class', 'link_');
|
||||
$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com', array('attributes' => array('target' => '_blank', 'rel' => 'nofollow'))));
|
||||
//$this->pass($this->content);
|
||||
|
||||
// Does this display on the front page?
|
||||
$this->drupalGet('<front>');
|
||||
// reset the zebra!
|
||||
$this->zebra = 0;
|
||||
$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com', array('attributes' => array('target' => '_blank', 'rel' => 'nofollow'))));
|
||||
}
|
||||
|
||||
/**
|
||||
* Trying to reproduce exactly what's in issue #664990
|
||||
*
|
||||
* http://drupal.org/node/664990
|
||||
*/
|
||||
function testLinkWithNoFollowOnFieldTargetNewWindowAndAClass() {
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => 'testlink',
|
||||
'target' => LINK_TARGET_NEW_WINDOW,
|
||||
'rel' => 'nofollow',
|
||||
),
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->pass('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(2);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
$node->promote = 1; // We want this to show on front page for the teaser test.
|
||||
$node->{$field['field_name']}[0] = $this->createLink('http://www.example.com', 'Test Link');
|
||||
node_save($node);
|
||||
|
||||
// Does this display on the node page?
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
//$this->outputScreenContents('Link field with class', 'link_');
|
||||
$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com', array('attributes' => array('class' => 'testlink', 'target' => '_blank', 'rel' => 'nofollow'))));
|
||||
//$this->pass($this->content);
|
||||
|
||||
// Does this display on the front page?
|
||||
$this->drupalGet('<front>');
|
||||
// reset the zebra!
|
||||
$this->zebra = 0;
|
||||
$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com', array('attributes' => array('class' => 'testlink', 'target' => '_blank', 'rel' => 'nofollow'))));
|
||||
}
|
||||
|
||||
/**
|
||||
* Another test for http://drupal.org/node/664990
|
||||
*/
|
||||
function test_Link_With_Title_Attribute_WithNoFollowOnFieldTargetNewWindowAndAClass_Form() {
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => '',
|
||||
'target' => 'default',
|
||||
'rel' => 'nofollow',
|
||||
'title' => '',
|
||||
),
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
$field_db_info = content_database_info($field);
|
||||
$url_type = str_replace('_', '-', $this->content_types[0]->type);
|
||||
|
||||
$edit = array();
|
||||
$edit['attributes[class]'] = 'testdata';
|
||||
$edit['attributes[target]'] = LINK_TARGET_NEW_WINDOW;
|
||||
$edit['attributes[rel]'] = 'nofollow';
|
||||
|
||||
$this->drupalPost('admin/content/node-type/'. $url_type .'/fields/'. $field['field_name'],
|
||||
$edit, t('Save field settings'));
|
||||
$this->assertText(t('Saved field @field_name', array('@field_name' => $field['field_name'])));
|
||||
|
||||
// So, having saved this field_name, let's see if it works...
|
||||
$this->acquireNodes(1);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$edit[$field['field_name'] .'[0][url]'] = 'http://www.example.com/test';
|
||||
$title = 'title_'. $this->randomName(20);
|
||||
$edit[$field['field_name'] .'[0][title]'] = $title;
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertText(t('@type @title has been updated.',
|
||||
array('@title' => $node->title,
|
||||
'@type' => $this->content_types[0]->name)));
|
||||
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($title, 'Make sure the link title/text shows');
|
||||
//$this->assertRaw(' title="test_data"', "Do we show the title?");
|
||||
$this->assertLinkOnNode($field['field_name'],
|
||||
l($title,
|
||||
'http://www.example.com/test',
|
||||
array('attributes' => array('target' => '_blank',
|
||||
'rel' => 'nofollow',
|
||||
'class' => 'testdata'))));
|
||||
//$this->pass($this->content);
|
||||
}
|
||||
|
||||
function test_Link_With_Title_Attribute() {
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => '',
|
||||
'target' => 'default',
|
||||
'rel' => 'nofollow',
|
||||
'title' => 'test_title',
|
||||
),
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(1);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$edit[$field['field_name'] .'[0][url]'] = 'http://www.example.com/test';
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertText(t('@type @title has been updated.',
|
||||
array('@title' => $node->title,
|
||||
'@type' => $this->content_types[0]->name)));
|
||||
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertRaw(' title="test_title"', "Do we show the title?");
|
||||
//$this->assertRaw(l('http://www.example.com/test', 'http://www.example.com/test', array('attributes' => array('title' => 'test_title'))));
|
||||
}
|
||||
|
||||
function test_Link_With_Title_Attribute_form() {
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => '',
|
||||
'target' => 'default',
|
||||
'rel' => 'nofollow',
|
||||
'title' => '',
|
||||
),
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
$field_db_info = content_database_info($field);
|
||||
$url_type = str_replace('_', '-', $this->content_types[0]->type);
|
||||
|
||||
$edit = array('attributes[title]' => 'test_data');
|
||||
|
||||
$this->drupalPost('admin/content/node-type/'. $url_type .'/fields/'. $field['field_name'],
|
||||
$edit, t('Save field settings'));
|
||||
$this->assertText(t('Saved field @field_name', array('@field_name' => $field['field_name'])));
|
||||
|
||||
// So, having saved this field_name, let's see if it works...
|
||||
$this->acquireNodes(1);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$edit[$field['field_name'] .'[0][url]'] = 'http://www.example.com/test';
|
||||
$title = 'title_'. $this->randomName(20);
|
||||
$edit[$field['field_name'] .'[0][title]'] = $title;
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertText(t('@type @title has been updated.',
|
||||
array('@title' => $node->title,
|
||||
'@type' => $this->content_types[0]->name)));
|
||||
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($title, 'Make sure the link title/text shows');
|
||||
$this->assertRaw(' title="test_data"', "Do we show the title?");
|
||||
}
|
||||
|
||||
/**
|
||||
* When the title attribute matches the link title, we need to suppress
|
||||
* the title attribute.
|
||||
*/
|
||||
function test_Link_With_Title_Attribute_Not_Shown_form() {
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => '',
|
||||
'target' => 'default',
|
||||
'rel' => 'nofollow',
|
||||
'title' => '',
|
||||
),
|
||||
);
|
||||
|
||||
$common_title = 'title_'. $this->randomName(20);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
$field_db_info = content_database_info($field);
|
||||
$url_type = str_replace('_', '-', $this->content_types[0]->type);
|
||||
|
||||
$edit = array('attributes[title]' => $common_title);
|
||||
|
||||
$this->drupalPost('admin/content/node-type/'. $url_type .'/fields/'. $field['field_name'],
|
||||
$edit, t('Save field settings'));
|
||||
$this->assertText(t('Saved field @field_name', array('@field_name' => $field['field_name'])));
|
||||
|
||||
// So, having saved this field_name, let's see if it works...
|
||||
$this->acquireNodes(1);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$edit[$field['field_name'] .'[0][url]'] = 'http://www.example.com/test';
|
||||
$edit[$field['field_name'] .'[0][title]'] = $common_title;
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertText(t('@type @title has been updated.',
|
||||
array('@title' => $node->title,
|
||||
'@type' => $this->content_types[0]->name)));
|
||||
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertRaw('>'. $common_title .'<', 'Make sure the link title/text shows');
|
||||
$this->assertNoRaw(' title="'. $common_title .'"',
|
||||
"Do we hide the title, since it matches the link title?");
|
||||
//$this->pass($this->content);
|
||||
}
|
||||
|
||||
/**
|
||||
* When the title attribute matches the link title, we need to suppress
|
||||
* the title attribute.
|
||||
*/
|
||||
function test_Link_without_title_attribute() {
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => '',
|
||||
'target' => 'default',
|
||||
'rel' => 'nofollow',
|
||||
'title' => '',
|
||||
),
|
||||
);
|
||||
|
||||
$common_title = 'title_'. $this->randomName(20);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
$field_db_info = content_database_info($field);
|
||||
$url_type = str_replace('_', '-', $this->content_types[0]->type);
|
||||
|
||||
// So, having saved this field_name, let's see if it works...
|
||||
$this->acquireNodes(1);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$edit[$field['field_name'] .'[0][url]'] = 'http://www.example.com/test';
|
||||
$edit[$field['field_name'] .'[0][title]'] = $common_title;
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertText(t('@type @title has been updated.',
|
||||
array('@title' => $node->title,
|
||||
'@type' => $this->content_types[0]->name)));
|
||||
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertRaw('>'. $common_title .'<', 'Make sure the link title/text shows');
|
||||
$this->assertNoRaw(' title=""',
|
||||
"Do we hide the title, since it is empty?");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This test exercises the bugfix for http://drupal.org/node/628902.
|
||||
* It's also making sure that if you set up a link field with 'rel="nofollow"'
|
||||
* and point it internally, then the link does not show rel="nofollow".
|
||||
*/
|
||||
function test_rel_nofollow_bug() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$field_name = 'field_'. $name;
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'value',
|
||||
'title_value' => $name,
|
||||
'attributes[rel]' => 'nofollow'), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'test', // internal link!
|
||||
);
|
||||
|
||||
$edit = array(
|
||||
'title' => $name,
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
//$this->pass($this->content);
|
||||
$this->assertRaw(l($name, 'test'));//, array('attributes' => array('rel' => ''))));
|
||||
}
|
||||
|
||||
function test_rel_nofollow_on_external_link() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$field_name = 'field_'. $name;
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'value',
|
||||
'title_value' => $name,
|
||||
'attributes[rel]' => 'nofollow'), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'http://example.com/' . $this->randomName(), // internal link!
|
||||
);
|
||||
|
||||
$edit = array(
|
||||
'title' => $name,
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
//$this->pass($this->content);
|
||||
$this->assertRaw(l($name, $input['href'], array('attributes' => array('rel' => 'nofollow'))));
|
||||
}
|
||||
|
||||
/**
|
||||
* Here we test the fix to #626932, where an empty or bad attributes value on the link at the field
|
||||
* level would cause the site to die in _link_sanitize, when the non-array $field['attributes'] is added
|
||||
* to another array.
|
||||
*/
|
||||
function test_bad_attributes_bugfix_null_global_settings() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$field_name = 'field_'. $name;
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'value',
|
||||
'title_value' => $name), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// ruin the stored data in content_node_field.
|
||||
// Here we replace the entire $field with a blank. The structure of the table
|
||||
// prevents it from being set to a null, sadly.
|
||||
db_query("UPDATE {content_node_field} SET global_settings = '' WHERE field_name = '%s'",
|
||||
$field_name);
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'test', // internal link!
|
||||
);
|
||||
|
||||
$edit = array(
|
||||
'title' => $name,
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
//$this->pass($this->content);
|
||||
$this->assertRaw(l($name, 'test'));//, array('attributes' => array('rel' => ''))));
|
||||
}
|
||||
/**
|
||||
* Here we test the fix to #626932, where an empty or bad attributes value on the link at the field
|
||||
* level would cause the site to die in _link_sanitize, when the non-array $field['attributes'] is added
|
||||
* to another array.
|
||||
*/
|
||||
function test_bad_attributes_bugfix_string_attributes() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$field_name = 'field_'. $name;
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'value',
|
||||
'title_value' => $name), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// ruin the stored data in content_node_field.
|
||||
// Here we set $field['attributes'] equal to a string of length 0.
|
||||
db_query("UPDATE {content_node_field} SET global_settings = '%s' WHERE field_name = '%s'",
|
||||
'a:6:{s:10:"attributes";s:0:"";s:7:"display";a:1:{s:10:"url_cutoff";s:2:"80";}s:3:"url";i:0;s:5:"title";s:8:"optional";s:11:"title_value";s:0:"";s:13:"enable_tokens";i:1;}', $field_name);
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'test', // internal link!
|
||||
);
|
||||
|
||||
$edit = array(
|
||||
'title' => $name,
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
//$this->pass($this->content);
|
||||
$this->assertRaw(l($name, 'test'));//, array('attributes' => array('rel' => ''))));
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple test that just creates a new node type, adds a link field to it, creates a new node of that type, and makes sure
|
||||
* that the node is being displayed.
|
||||
*/
|
||||
function testOptionalUrlStaticTitleDisplays() {
|
||||
$this->acquireContentTypes(1);
|
||||
variable_set('node_options_'. $this->content_types[0]->name, array('status', 'promote'));
|
||||
|
||||
$title_value = $this->randomName();
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(), // <-- This is needed or we have an error.
|
||||
'url' => FALSE,
|
||||
'title' => 'value',
|
||||
'title_value' => $title_value,
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->pass('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(2);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
$node->promote = 1; // We want this to show on front page for the teaser test.
|
||||
$node->{$field['field_name']}[0] = $this->createLink('', '');
|
||||
node_save($node);
|
||||
|
||||
// Does this display on the node page?
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
//$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com'));
|
||||
$this->assertNoRaw($title_value, 'Title value should not be displayed for a blank field if the title is static.');
|
||||
|
||||
// Does this display on the front page?
|
||||
$this->drupalGet('<front>');
|
||||
// reset the zebra!
|
||||
$this->zebra = 0;
|
||||
//$this->assertLinkOnNode($field['field_name'], l('Test Link', 'http://www.example.com'));
|
||||
$this->assertNoRaw($title_value, 'Title value should not be displayed for a blank field if the title is static.');
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Basic CRUD simpletests for the link module, based off of content.crud.test in CCK.
|
||||
*/
|
||||
|
||||
// Need to include content.crud.test so we can inherit from it's ContentCrudTestCase.
|
||||
require_once(drupal_get_path('module', 'content') .'/tests/content.crud.test');
|
||||
|
||||
class LinkContentCrudTest extends ContentCrudTestCase {
|
||||
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Link CRUD - Basic API tests'),
|
||||
'description' => t('Tests the field CRUD (create, read, update, delete) API. <strong>Requires <a href="@schema_link">Schema module</a>.</strong>', array('@schema_link' => 'http://www.drupal.org/project/schema')),
|
||||
'group' => t('Link'),
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp('link');
|
||||
$this->loginWithPermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
* All we're doing here is creating a content type, creating a simple link field
|
||||
* on that content type, and making sure said field exists in the database.
|
||||
*/
|
||||
function testLinkCreateFieldAPI() {
|
||||
$this->acquireContentTypes(1);
|
||||
|
||||
$field = $this->createField(array('type' => 'link', 'widget_type' => 'link'), 0);
|
||||
|
||||
//$this->pass(print_r($this->content_types, TRUE));
|
||||
//$this->pass(print_r($field, TRUE));
|
||||
|
||||
$table_schema = drupal_get_schema();
|
||||
//$this->pass(print_r(array_keys($table_schema), TRUE));
|
||||
// Check the schema - the values should be in the per-type table.
|
||||
$this->assertSchemaMatchesTables(array(
|
||||
'per_type' => array(
|
||||
$this->content_types[0]->type => array($field['field_name'] => array('url', 'title', 'attributes')),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,340 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Testing CRUD API in the browser.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Testing that users can not input bad URLs or labels
|
||||
*/
|
||||
class LinkUITest extends DrupalWebTestcase {
|
||||
|
||||
/**
|
||||
* Link supposed to be good
|
||||
*/
|
||||
const LINK_INPUT_TYPE_GOOD = 0;
|
||||
|
||||
/**
|
||||
* Link supposed to have a bad title
|
||||
*/
|
||||
const LINK_INPUT_TYPE_BAD_TITLE = 1;
|
||||
|
||||
/**
|
||||
* Link supposed to have a bad URL
|
||||
*/
|
||||
const LINK_INPUT_TYPE_BAD_URL = 2;
|
||||
|
||||
/**
|
||||
* Implementation of getInfo().
|
||||
*/
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Link CRUD - browser test'),
|
||||
'description' => t('Tests the field CRUD (create, read, update, delete) API.'),
|
||||
'group' => t('Link'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of setUp().
|
||||
*/
|
||||
function setUp() {
|
||||
parent::setUp('content', 'link');
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a link field for the "page" type and creates a page with a link.
|
||||
*/
|
||||
function testLinkCreate() {
|
||||
//libxml_use_internal_errors(true);
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array('validate_url' => TRUE), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$field_name = 'field_' . $name;
|
||||
$this->assertField($field_name . '[0][title]', 'Title found');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input_test_cases = array(
|
||||
array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName(),
|
||||
'msg' => 'Link found',
|
||||
'type' => self::LINK_INPUT_TYPE_GOOD
|
||||
),
|
||||
array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName() . '<script>alert("hi");</script>',
|
||||
'msg' => 'js label',
|
||||
'type' => self::LINK_INPUT_TYPE_BAD_TITLE
|
||||
),
|
||||
array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName() . '<script src="http://devil.site.com"></script>',
|
||||
'msg' => 'js label',
|
||||
'type' => self::LINK_INPUT_TYPE_BAD_TITLE
|
||||
),
|
||||
array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName() . '" onmouseover="alert(\'hi\')',
|
||||
'msg' => 'js label',
|
||||
'type' => self::LINK_INPUT_TYPE_BAD_TITLE
|
||||
),
|
||||
array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName() . '\' onmouseover="alert(\'hi\')',
|
||||
'msg' => 'js label',
|
||||
'type' => self::LINK_INPUT_TYPE_BAD_TITLE
|
||||
),
|
||||
array(
|
||||
'href' => 'javascript:alert("http://example.com/' . $this->randomName() . '")',
|
||||
'label' => $this->randomName(),
|
||||
'msg' => 'js url',
|
||||
'type' => self::LINK_INPUT_TYPE_BAD_URL
|
||||
),
|
||||
);
|
||||
foreach ($input_test_cases as $input) {
|
||||
$this->drupalLogin($account);
|
||||
$this->drupalGet('node/add/page');
|
||||
|
||||
$edit = array(
|
||||
'title' => $input['label'],
|
||||
$field_name . '[0][title]' => $input['label'],
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
if ($input['type'] == self::LINK_INPUT_TYPE_BAD_URL) {
|
||||
$this->assertRaw(t('Not a valid URL.'), 'Not a valid URL: ' . $input['href']);
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
$this->assertRaw(t('@type %title has been created.', array('@type' => 'Page', '%title' => $edit['title'])), 'Page created: ' . $input['href']);
|
||||
}
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonym user
|
||||
$this->drupalLogout();
|
||||
|
||||
$this->drupalGet($url);
|
||||
//debug($this);
|
||||
// If simpletest starts using something to override the error system, this will flag
|
||||
// us and let us know it's broken.
|
||||
$this->assertFalse(libxml_use_internal_errors(TRUE));
|
||||
$path = '//a[@href="'. $input['href'] .'" and text()="'. $input['label'] .'"]';
|
||||
//$this->pass(htmlentities($path));
|
||||
$elements = $this->xpath($path);
|
||||
libxml_use_internal_errors(FALSE);
|
||||
$this->assertIdentical(isset($elements[0]), $input['type'] == self::LINK_INPUT_TYPE_GOOD, $input['msg']);
|
||||
}
|
||||
//libxml_use_internal_errors(FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a link field for the "page" type and creates a page with a link.
|
||||
* Just like the above test, only here we're turning off the validation on the field.
|
||||
*/
|
||||
function testLinkCreate_NoValidation() {
|
||||
//libxml_use_internal_errors(true);
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array('validate_url' => FALSE), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
_content_type_info(TRUE);
|
||||
$fields = content_fields();
|
||||
$this->assertTRUE(0 === $fields['field_'. $name]['validate_url'], 'Make sure validation is off.');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$field_name = 'field_' . $name;
|
||||
$this->assertField($field_name . '[0][title]', 'Title found');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input_test_cases = array(
|
||||
array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName(),
|
||||
'msg' => 'Link found',
|
||||
'type' => self::LINK_INPUT_TYPE_GOOD
|
||||
),
|
||||
array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName() . '<script>alert("hi");</script>',
|
||||
'msg' => 'js label',
|
||||
'type' => self::LINK_INPUT_TYPE_BAD_TITLE
|
||||
),
|
||||
array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName() . '<script src="http://devil.site.com"></script>',
|
||||
'msg' => 'js label',
|
||||
'type' => self::LINK_INPUT_TYPE_BAD_TITLE
|
||||
),
|
||||
array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName() . '" onmouseover="alert(\'hi\')',
|
||||
'msg' => 'js label',
|
||||
'type' => self::LINK_INPUT_TYPE_BAD_TITLE
|
||||
),
|
||||
array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName() . '\' onmouseover="alert(\'hi\')',
|
||||
'msg' => 'js label',
|
||||
'type' => self::LINK_INPUT_TYPE_BAD_TITLE
|
||||
),
|
||||
array(
|
||||
'href' => 'javascript:alert("http://example.com/' . $this->randomName() . '")',
|
||||
'label' => $this->randomName(),
|
||||
'msg' => 'js url',
|
||||
'type' => self::LINK_INPUT_TYPE_BAD_URL
|
||||
),
|
||||
);
|
||||
foreach ($input_test_cases as $input) {
|
||||
$this->drupalLogin($account);
|
||||
$this->drupalGet('node/add/page');
|
||||
|
||||
$edit = array(
|
||||
'title' => $input['label'],
|
||||
$field_name . '[0][title]' => $input['label'],
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
if ($input['type'] == self::LINK_INPUT_TYPE_BAD_URL) {
|
||||
//$this->assertRaw(t('Not a valid URL.'), 'Not a valid URL: ' . $input['href']);
|
||||
$this->assertNoRaw($input['href']);
|
||||
$this->assertRaw(t('@type %title has been created.', array('@type' => 'Page', '%title' => $edit['title'])), 'Page created: ' . $input['href']);
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
$this->assertRaw(t('@type %title has been created.', array('@type' => 'Page', '%title' => $edit['title'])), 'Page created: ' . $input['href']);
|
||||
}
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonym user
|
||||
$this->drupalLogout();
|
||||
|
||||
$this->drupalGet($url);
|
||||
//debug($this);
|
||||
// If simpletest starts using something to override the error system, this will flag
|
||||
// us and let us know it's broken.
|
||||
$this->assertFalse(libxml_use_internal_errors(TRUE));
|
||||
$path = '//a[@href="'. $input['href'] .'" and text()="'. $input['label'] .'"]';
|
||||
//$this->pass(htmlentities($path));
|
||||
$elements = $this->xpath($path);
|
||||
libxml_use_internal_errors(FALSE);
|
||||
$this->assertIdentical(isset($elements[0]), $input['type'] == self::LINK_INPUT_TYPE_GOOD, $input['msg']);
|
||||
}
|
||||
//libxml_use_internal_errors(FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing that if you use <strong> in a static title for your link, that the
|
||||
* title actually displays <strong>.
|
||||
*/
|
||||
function testStaticLinkCreate() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$field_name = 'field_'. $name;
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'value',
|
||||
'title_value' => '<strong>'. $name .'</strong>'), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'http://example.com/' . $this->randomName()
|
||||
);
|
||||
|
||||
$edit = array(
|
||||
'title' => $name,
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
|
||||
$this->assertRaw(l('<strong>'. $name .'</strong>', $input['href'], array('html' => TRUE)));
|
||||
}
|
||||
|
||||
/**
|
||||
* If we're creating a new field and just hit 'save' on the default options, we want to make
|
||||
* sure they are set to the expected results.
|
||||
*/
|
||||
function testCRUDCreateFieldDefaults() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
_content_type_info(TRUE);
|
||||
$fields = content_fields();
|
||||
$field = $fields['field_'. $name];
|
||||
$this->assertTrue(1 === $field['validate_url'], 'Make sure validation is on.');
|
||||
$this->assertFalse($field['required'], 'Make sure field is not required.');
|
||||
$this->assertEqual($field['title'], 'optional', 'Title should be optional by default.');
|
||||
$this->assertFalse($field['enable_tokens'], 'Enable Tokens should be off by default.');
|
||||
$this->assertEqual($field['display']['url_cutoff'], 80, 'Url cutoff should be at 80 characters.');
|
||||
$this->assertEqual($field['attributes']['target'], 'default', 'Target should be "default"');
|
||||
$this->assertFalse($field['attributes']['rel'], 'Rel should be blank by default.');
|
||||
$this->assertFalse($field['attributes']['class'], 'By default, no class should be set.');
|
||||
$this->assertFalse($field['attributes']['title'], 'By default, no title should be set.');
|
||||
|
||||
//$this->fail('<pre>'. print_r($fields['field_'. $name], TRUE) .'</pre>');
|
||||
}
|
||||
}
|
|
@ -1,531 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains simpletests making sure token integration works.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Testing that tokens can be used in link titles
|
||||
*/
|
||||
class LinkTokenTest extends ContentCrudTestCase {
|
||||
|
||||
public $permissions = array(
|
||||
'access content',
|
||||
'administer content types',
|
||||
'administer nodes',
|
||||
'administer filters',
|
||||
'access comments',
|
||||
'post comments',
|
||||
'post comments without approval',
|
||||
'access administration pages',
|
||||
);
|
||||
|
||||
/**
|
||||
* Implementation of getInfo().
|
||||
*/
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Link tokens - browser test'),
|
||||
'description' => t('Tests including tokens in link titles, making sure they appear in node views. <strong>Requires <a href="@token_link">Token module</a>.</strong>'),
|
||||
'group' => t('Link'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of setUp().
|
||||
*/
|
||||
function setUp() {
|
||||
parent::setUp('content', 'link', 'token');
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a link field with a required title enabled for user-entered tokens.
|
||||
* Creates a node with a token in the link title and checks the value.
|
||||
*/
|
||||
function testUserTokenLinkCreate() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'required',
|
||||
'enable_tokens' => TRUE), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$field_name = 'field_' . $name;
|
||||
$this->assertField($field_name . '[0][title]', 'Title found');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName(),
|
||||
);
|
||||
|
||||
$this->drupalLogin($account);
|
||||
$this->drupalGet('node/add/page');
|
||||
|
||||
$edit = array(
|
||||
'title' => $input['label'],
|
||||
$field_name . '[0][title]' => $input['label'] . " [type]",
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
|
||||
$this->assertRaw(l($input['label'] . ' page', $input['href']));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a link field with a static title and an admin-entered token.
|
||||
* Creates a node with a link and checks the title value.
|
||||
*/
|
||||
function testStaticTokenLinkCreate() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'value',
|
||||
'title_value' => $name . ' [type]',
|
||||
'enable_tokens' => FALSE,
|
||||
), t('Save field settings'));
|
||||
|
||||
// Is filed created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$field_name = 'field_' . $name;
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'http://example.com/' . $this->randomName()
|
||||
);
|
||||
|
||||
$this->drupalLogin($account);
|
||||
$this->drupalGet('node/add/page');
|
||||
|
||||
$edit = array(
|
||||
'title' => $name,
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
|
||||
$this->assertRaw(l($name . ' page', $input['href']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a link field with a static title and an admin-entered token.
|
||||
* Creates a node with a link and checks the title value.
|
||||
*
|
||||
* Basically, I want to make sure the [title-raw] token works, because it's a
|
||||
* token that changes from node to node, where [type]'s always going to be the
|
||||
* same.
|
||||
*/
|
||||
function testStaticTokenLinkCreate2() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'value',
|
||||
'title_value' => $name . ' [title-raw]',
|
||||
'enable_tokens' => FALSE,
|
||||
), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$field_name = 'field_' . $name;
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'http://example.com/' . $this->randomName()
|
||||
);
|
||||
|
||||
$this->drupalLogin($account);
|
||||
$this->drupalGet('node/add/page');
|
||||
|
||||
$edit = array(
|
||||
'title' => $name,
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
|
||||
$this->assertRaw(l($name .' '. $name, $input['href']));
|
||||
}
|
||||
|
||||
function test_Link_With_Title_Attribute_token_url_form() {
|
||||
$this->loginWithPermissions($this->permissions);
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => '',
|
||||
'target' => 'default',
|
||||
'rel' => 'nofollow',
|
||||
'title' => '',
|
||||
),
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->fail('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_name = $field['field_name'];
|
||||
$field_db_info = content_database_info($field);
|
||||
$url_type = str_replace('_', '-', $this->content_types[0]->type);
|
||||
|
||||
$edit = array('attributes[title]' => '['. $field_name .'-url]',
|
||||
'enable_tokens' => FALSE);
|
||||
|
||||
$this->drupalPost('admin/content/node-type/'. $url_type .'/fields/'. $field['field_name'],
|
||||
$edit, t('Save field settings'));
|
||||
$this->assertText(t('Saved field @field_name', array('@field_name' => $field['field_name'])));
|
||||
|
||||
// So, having saved this field_name, let's see if it works...
|
||||
$this->acquireNodes(1);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$test_link_url = 'http://www.example.com/test';
|
||||
$edit[$field['field_name'] .'[0][url]'] = $test_link_url;
|
||||
$title = 'title_'. $this->randomName(20);
|
||||
$edit[$field['field_name'] .'[0][title]'] = $title;
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertText(t('@type @title has been updated.',
|
||||
array('@title' => $node->title,
|
||||
'@type' => $this->content_types[0]->name)));
|
||||
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($title, 'Make sure the link title/text shows');
|
||||
$this->assertRaw(' title="'. $test_link_url .'"', "Do we show the link url as the title attribute?");
|
||||
$this->assertNoRaw(' title="['. $field_name .'-url]"');
|
||||
$this->assertTrue(module_exists('token'), t('Assure that Token Module is enabled.'));
|
||||
//$this->fail($this->content);
|
||||
}
|
||||
|
||||
/**
|
||||
* If the title of the link is set to the title attribute, then the title
|
||||
* attribute isn't supposed to show.
|
||||
*/
|
||||
function test_Link_With_Title_Attribute_token_title_form() {
|
||||
$this->loginWithPermissions($this->permissions);
|
||||
$this->acquireContentTypes(1);
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(
|
||||
'class' => '',
|
||||
'target' => 'default',
|
||||
'rel' => 'nofollow',
|
||||
'title' => '',
|
||||
),
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
$field_name = $field['field_name'];
|
||||
$field_db_info = content_database_info($field);
|
||||
$url_type = str_replace('_', '-', $this->content_types[0]->type);
|
||||
|
||||
$edit = array('attributes[title]' => '['. $field_name .'-title]',
|
||||
'enable_tokens' => FALSE);
|
||||
|
||||
$this->drupalPost('admin/content/node-type/'. $url_type .'/fields/'. $field['field_name'],
|
||||
$edit, t('Save field settings'));
|
||||
$this->assertText(t('Saved field @field_name', array('@field_name' => $field['field_name'])));
|
||||
|
||||
// So, having saved this field_name, let's see if it works...
|
||||
$this->acquireNodes(1);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$edit[$field['field_name'] .'[0][url]'] = 'http://www.example.com/test';
|
||||
$title = 'title_'. $this->randomName(20);
|
||||
$edit[$field['field_name'] .'[0][title]'] = $title;
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertText(t('@type @title has been updated.',
|
||||
array('@title' => $node->title,
|
||||
'@type' => $this->content_types[0]->name)));
|
||||
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertText($title, 'Make sure the link title/text shows');
|
||||
$this->assertNoRaw(' title="'. $title .'"', "We should not show the link title as the title attribute?");
|
||||
$this->assertNoRaw(' title="['. $field_name .'-title]"');
|
||||
//$this->fail($this->content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trying to set the url to contain a token.
|
||||
*/
|
||||
function testUserTokenLinkCreateInURL() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'required',
|
||||
'enable_tokens' => TRUE), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$field_name = 'field_' . $name;
|
||||
$this->assertField($field_name . '[0][title]', 'Title found');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName(),
|
||||
);
|
||||
|
||||
$this->drupalLogin($account);
|
||||
$this->drupalGet('node/add/page');
|
||||
|
||||
$edit = array(
|
||||
'title' => $input['label'],
|
||||
$field_name . '[0][title]' => $input['label'],
|
||||
$field_name . '[0][url]' => $input['href'] . "/[type]",
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
|
||||
$this->assertRaw(l($input['label'], $input['href'] .'/page'));
|
||||
//$this->fail($this->content);
|
||||
}
|
||||
|
||||
/**
|
||||
* If 'enable_tokens' is off, then the url shouldn't be filtered through the token module.
|
||||
*/
|
||||
function testUserTokenLinkCreateInURLFail() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'required',
|
||||
'enable_tokens' => FALSE), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$field_name = 'field_' . $name;
|
||||
$this->assertField($field_name . '[0][title]', 'Title found');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName(),
|
||||
);
|
||||
|
||||
$this->drupalLogin($account);
|
||||
$this->drupalGet('node/add/page');
|
||||
|
||||
$edit = array(
|
||||
'title' => $input['label'],
|
||||
$field_name . '[0][title]' => $input['label'],
|
||||
$field_name . '[0][url]' => $input['href'] . "/[type]",
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
|
||||
$this->assertRaw(l($input['label'], $input['href'] .'/[type]'));
|
||||
//$this->fail($this->content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trying to set the url to contain a token.
|
||||
*/
|
||||
function testUserTokenLinkCreateInURL2() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'required',
|
||||
'enable_tokens' => TRUE), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$field_name = 'field_' . $name;
|
||||
$this->assertField($field_name . '[0][title]', 'Title found');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName(),
|
||||
);
|
||||
|
||||
$this->drupalLogin($account);
|
||||
$this->drupalGet('node/add/page');
|
||||
|
||||
$edit = array(
|
||||
'title' => $input['label'],
|
||||
$field_name . '[0][title]' => $input['label'],
|
||||
$field_name . '[0][url]' => $input['href'] . "/[author-uid]",
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
|
||||
$this->assertRaw(l($input['label'], $input['href'] .'/'. $account->uid));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a link field with a required title enabled for user-entered tokens.
|
||||
* Creates a node with a token in the link title and checks the value.
|
||||
*/
|
||||
function testHostTokenLinkCreate() {
|
||||
$account = $this->drupalCreateUser(array('administer content types', 'access content', 'create page content'));
|
||||
$this->drupalLogin($account);
|
||||
|
||||
// create field
|
||||
$name = strtolower($this->randomName());
|
||||
$edit = array(
|
||||
'_add_new_field[label]' => $name,
|
||||
'_add_new_field[field_name]' => $name,
|
||||
'_add_new_field[type]' => 'link',
|
||||
'_add_new_field[widget_type]' => 'link',
|
||||
);
|
||||
$this->drupalPost('admin/content/node-type/page/fields', $edit, t('Save'));
|
||||
$this->drupalPost(NULL, array(
|
||||
'title' => 'required',
|
||||
'enable_tokens' => TRUE), t('Save field settings'));
|
||||
|
||||
// Is field created?
|
||||
$this->assertRaw(t('Added field %label.', array('%label' => $name)), 'Field added');
|
||||
|
||||
// create page form
|
||||
$this->drupalGet('node/add/page');
|
||||
$field_name = 'field_' . $name;
|
||||
$this->assertField($field_name . '[0][title]', 'Title found');
|
||||
$this->assertField($field_name . '[0][url]', 'URL found');
|
||||
|
||||
$input = array(
|
||||
'href' => 'http://example.com/' . $this->randomName(),
|
||||
'label' => $this->randomName(),
|
||||
);
|
||||
|
||||
$this->drupalLogin($account);
|
||||
$this->drupalGet('node/add/page');
|
||||
|
||||
$edit = array(
|
||||
'title' => $input['label'],
|
||||
$field_name . '[0][title]' => $input['label'] . " [$field_name-host]",
|
||||
$field_name . '[0][url]' => $input['href'],
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
$url = $this->getUrl();
|
||||
|
||||
// change to anonymous user
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($url);
|
||||
|
||||
$this->assertRaw(l($input['label'] . ' example.com', $input['href']));
|
||||
}
|
||||
}
|
|
@ -1,497 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Tests that exercise the validation functions in the link module.
|
||||
*/
|
||||
|
||||
// Let's include the parent class.
|
||||
module_load_include('test', 'content', 'tests/content.crud');
|
||||
|
||||
class LinkValidateTestCase extends ContentCrudTestCase {
|
||||
public $permissions = array(
|
||||
'access content',
|
||||
'administer content types',
|
||||
'administer nodes',
|
||||
'administer filters',
|
||||
'access comments',
|
||||
'post comments',
|
||||
'post comments without approval',
|
||||
'access administration pages',
|
||||
);
|
||||
|
||||
function setUp() {
|
||||
parent::setUp('link');
|
||||
$this->loginWithPermissions($this->permissions);
|
||||
}
|
||||
|
||||
function createLink($url, $title, $attributes = array()) {
|
||||
return array(
|
||||
'url' => $url,
|
||||
'title' => $title,
|
||||
'attributes' => $attributes,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes a url, and sees if it can validate that the url is valid.
|
||||
*/
|
||||
function link_test_validate_url($url) {
|
||||
$this->acquireContentTypes(1);
|
||||
variable_set('node_options_'. $this->content_types[0]->name, array('status', 'promote'));
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(), // <-- This is needed or we have an error.
|
||||
'validate_url' => 1,
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->fail('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(1);
|
||||
//$this->fail("We now have ". count($this->nodes) ." nodes.");
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$edit[$field['field_name'] .'[0][url]'] = $url;
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertText(t('@type @title has been updated.',
|
||||
array('@title' => $node->title,
|
||||
'@type' => $this->content_types[0]->name)),
|
||||
t('Testing %url', array('%url' => $url)));
|
||||
|
||||
|
||||
$this->assertEqual($url, $node->{$field['field_name']}[0]['url']);
|
||||
}
|
||||
}
|
||||
|
||||
class LinkValidateTest extends LinkValidateTestCase {
|
||||
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Link Validation Tests'),
|
||||
'description' => t('Tests the field validation.'),
|
||||
'group' => t('Link'),
|
||||
);
|
||||
}
|
||||
|
||||
function test_link_validate_basic_url() {
|
||||
$this->link_test_validate_url('http://www.example.com');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if we're stopped from posting a bad url on default validation.
|
||||
*/
|
||||
function test_link_validate_bad_url_validate_default() {
|
||||
$this->acquireContentTypes(1);
|
||||
variable_set('node_options_'. $this->content_types[0]->name, array('status', 'promote'));
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(), // <-- This is needed or we have an error
|
||||
//'validate_url' => 1,
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->pass('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(2);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$edit[$field['field_name'] .'[0][url]'] = 'edik:naw';
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
//$this->pass($this->content);
|
||||
$this->assertText(t('Not a valid URL.'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertNotEqual('edik:naw', $node->{$field['field_name']}[0]['url']);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if we're stopped from posting a bad url with validation on.
|
||||
*/
|
||||
function test_link_validate_bad_url_validate_on() {
|
||||
$this->acquireContentTypes(1);
|
||||
variable_set('node_options_'. $this->content_types[0]->name, array('status', 'promote'));
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(), // <-- This is needed or we have an error
|
||||
'validate_url' => 1,
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->pass('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(2);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$edit[$field['field_name'] .'[0][url]'] = 'edik:naw';
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
//$this->pass($this->content);
|
||||
$this->assertText(t('Not a valid URL.'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertNotEqual('edik:naw', $node->{$field['field_name']}[0]['url']);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if we can post a bad url if the validation is expressly turned off.
|
||||
*/
|
||||
function test_link_validate_bad_url_validate_off() {
|
||||
$this->acquireContentTypes(1);
|
||||
variable_set('node_options_'. $this->content_types[0]->name, array('status', 'promote'));
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(), // <-- This is needed or we have an error
|
||||
'validate_url' => 0,
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->pass('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(2);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$edit[$field['field_name'] .'[0][url]'] = 'edik:naw';
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
//$this->pass($this->content);
|
||||
$this->assertNoText(t('Not a valid URL.'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertEqual('edik:naw', $node->{$field['field_name']}[0]['url']);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if a bad url can sneak through un-filtered if we play with the validation...
|
||||
*/
|
||||
function test_link_validate_switching_between_validation_status() {
|
||||
$this->acquireContentTypes(1);
|
||||
$account = $this->drupalCreateUser(array('administer content types',
|
||||
'administer nodes',
|
||||
'access administration pages',
|
||||
'access content',
|
||||
'create '. $this->content_types[0]->type .' content',
|
||||
'edit any '. $this->content_types[0]->type .' content'));
|
||||
$this->drupalLogin($account);
|
||||
variable_set('node_options_'. $this->content_types[0]->name, array('status', 'promote'));
|
||||
$field_settings = array(
|
||||
'type' => 'link',
|
||||
'widget_type' => 'link',
|
||||
'type_name' => $this->content_types[0]->name,
|
||||
'attributes' => array(), // <-- This is needed or we have an error
|
||||
'validate_url' => 0,
|
||||
);
|
||||
|
||||
$field = $this->createField($field_settings, 0);
|
||||
//$this->fail('<pre>'. print_r($field, TRUE) .'</pre>');
|
||||
$field_db_info = content_database_info($field);
|
||||
|
||||
$this->acquireNodes(2);
|
||||
|
||||
$node = node_load($this->nodes[0]->nid);
|
||||
|
||||
$this->drupalGet('node/'. $this->nodes[0]->nid);
|
||||
|
||||
$edit = array();
|
||||
$title = $this->randomName();
|
||||
$url = 'javascript:alert("http://example.com/' . $this->randomName() . '")';
|
||||
$edit[$field['field_name'] .'[0][url]'] = $url;
|
||||
$edit[$field['field_name'] .'[0][title]'] = $title;
|
||||
|
||||
$this->drupalPost('node/'. $this->nodes[0]->nid .'/edit', $edit, t('Save'));
|
||||
//$this->pass($this->content);
|
||||
$this->assertNoText(t('Not a valid URL.'));
|
||||
|
||||
// Make sure we get a new version!
|
||||
$node = node_load($this->nodes[0]->nid, NULL, TRUE);
|
||||
$this->assertEqual($url, $node->{$field['field_name']}[0]['url']);
|
||||
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
$this->assertNoRaw($url, 'Make sure Javascript does not display.');
|
||||
|
||||
// Turn the array validation back _on_.
|
||||
$edit = array('validate_url' => TRUE);
|
||||
$node_type_link = str_replace('_', '-', $node->type);
|
||||
//$this->drupalGet('admin/content/node-type/'. $node_type_link .'/fields'); ///'. $field['field_name']);
|
||||
//$this->fail($this->content);
|
||||
$this->drupalPost('admin/content/node-type/'. $node_type_link .'/fields/'. $field['field_name'], $edit, t('Save field settings'));
|
||||
|
||||
$this->drupalGet('node/'. $node->nid);
|
||||
// This actually works because the display_url goes through the core
|
||||
// url() function. But we should have a test that makes sure it continues
|
||||
// to work.
|
||||
$this->assertNoRaw($url, 'Make sure Javascript does not display.');
|
||||
//$this->fail($this->content);
|
||||
|
||||
}
|
||||
|
||||
// Validate that '<front>' is a valid url.
|
||||
function test_link_front_url() {
|
||||
$this->link_test_validate_url('<front>');
|
||||
}
|
||||
|
||||
// Validate that an internal url would be accepted.
|
||||
function test_link_internal_url() {
|
||||
$this->link_test_validate_url('node/32');
|
||||
}
|
||||
|
||||
// Validate a simple mailto.
|
||||
function test_link_mailto() {
|
||||
$this->link_test_validate_url('mailto:jcfiala@gmail.com');
|
||||
}
|
||||
|
||||
function test_link_external_https() {
|
||||
$this->link_test_validate_url('https://www.example.com/');
|
||||
}
|
||||
|
||||
function test_link_ftp() {
|
||||
$this->link_test_validate_url('ftp://www.example.com/');
|
||||
}
|
||||
}
|
||||
|
||||
class LinkValidateTestNews extends LinkValidateTestCase {
|
||||
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Link News Validation Tests'),
|
||||
'description' => t('Tests the field validation for usenet urls.'),
|
||||
'group' => t('Link'),
|
||||
);
|
||||
}
|
||||
|
||||
// Validate a news link to a message group
|
||||
function test_link_news() {
|
||||
$this->link_test_validate_url('news:comp.infosystems.www.misc');
|
||||
}
|
||||
|
||||
// Validate a news link to a message id. Said ID copied off of google groups.
|
||||
function test_link_news_message() {
|
||||
$this->link_test_validate_url('news:hj0db8$vrm$1@news.eternal-september.org');
|
||||
}
|
||||
}
|
||||
|
||||
class LinkValidateSpecificURL extends LinkValidateTestCase {
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Link Specific URL Validation Tests'),
|
||||
'description' => t('Tests field validation with unusual urls'),
|
||||
'group' => t('Link'),
|
||||
);
|
||||
}
|
||||
|
||||
// Lets throw in a lot of umlouts for testing!
|
||||
function test_umlout_url() {
|
||||
$this->link_test_validate_url('http://üÜü.exämple.com/nöde');
|
||||
}
|
||||
|
||||
function test_umlout_mailto() {
|
||||
$this->link_test_validate_url('mailto:Üser@exÅmple.com');
|
||||
}
|
||||
|
||||
function test_german_b_url() {
|
||||
$this->link_test_validate_url('http://www.test.com/ßstuff');
|
||||
}
|
||||
|
||||
function test_special_n_url() {
|
||||
$this->link_test_validate_url('http://www.testÑñ.com/');
|
||||
}
|
||||
|
||||
function test_curly_brackets_in_query() {
|
||||
$this->link_test_validate_url('http://www.healthyteennetwork.org/index.asp?Type=B_PR&SEC={2AE1D600-4FC6-4B4D-8822-F1D5F072ED7B}&DE={235FD1E7-208D-4363-9854-4E6775EB8A4C}');
|
||||
}
|
||||
|
||||
/**
|
||||
* Here, we're testing that a very long url is stored properly in the db.
|
||||
*
|
||||
* Basicly, trying to test http://drupal.org/node/376818
|
||||
*/
|
||||
function testLinkURLFieldIsBig() {
|
||||
$long_url = 'http://th.wikipedia.org/wiki/%E0%B9%82%E0%B8%A3%E0%B8%87%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B9%80%E0%B8%9A%E0%B8%8D%E0%B8%88%E0%B8%A1%E0%B8%A3%E0%B8%B2%E0%B8%8A%E0%B8%B9%E0%B8%97%E0%B8%B4%E0%B8%A8_%E0%B8%99%E0%B8%84%E0%B8%A3%E0%B8%A8%E0%B8%A3%E0%B8%B5%E0%B8%98%E0%B8%A3%E0%B8%A3%E0%B8%A1%E0%B8%A3%E0%B8%B2%E0%B8%8A';
|
||||
$this->link_test_validate_url($long_url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A series of tests of links, only going against the link_validate_url function in link.module.
|
||||
*
|
||||
* Validation is guided by the rules in http://tools.ietf.org/html/rfc1738 !
|
||||
*/
|
||||
class LinkValidateUrlLight extends DrupalUnitTestCase {
|
||||
|
||||
function setUp() {
|
||||
// do we need to include something here?
|
||||
module_load_include('module', 'link');
|
||||
module_load_include('inc', 'link');
|
||||
}
|
||||
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Link Light Validation Tests'),
|
||||
'description' => t('Tests the link_validate_url() function by itself, without invoking the full drupal/cck lifecycle.'),
|
||||
'group' => t('Link'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translates the LINK type constants to english for display and debugging of tests
|
||||
*/
|
||||
function name_Link_Type($type) {
|
||||
switch ($type) {
|
||||
case LINK_FRONT:
|
||||
return "Front";
|
||||
case LINK_EMAIL:
|
||||
return "Email";
|
||||
case LINK_NEWS:
|
||||
return "Newsgroup";
|
||||
case LINK_INTERNAL:
|
||||
return "Internal Link";
|
||||
case LINK_EXTERNAL:
|
||||
return "External Link";
|
||||
case FALSE:
|
||||
return "Invalid Link";
|
||||
default:
|
||||
return "Bad Value:". $type;
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure that a link labelled <front> works.
|
||||
function testValidateFrontLink() {
|
||||
$valid = link_validate_url('<front>');
|
||||
$this->assertEqual(LINK_FRONT, $valid, 'Make sure that front link is verfied and identified');
|
||||
}
|
||||
|
||||
function testValidateEmailLink() {
|
||||
$valid = link_validate_url('mailto:bob@example.com');
|
||||
$this->assertEqual(LINK_EMAIL, $valid, "Make sure a basic mailto is verified and identified");
|
||||
}
|
||||
|
||||
function testValidateEmailLinkBad() {
|
||||
$valid = link_validate_url(':bob@example.com');
|
||||
$this->assertEqual(FALSE, $valid, 'Make sure just a bad address is correctly failed');
|
||||
}
|
||||
|
||||
function testValidateNewsgroupLink() {
|
||||
$valid = link_validate_url('news:comp.infosystems.www.misc');
|
||||
$this->assertEqual(LINK_NEWS, $valid, 'Make sure link to newsgroup validates as news.');
|
||||
}
|
||||
|
||||
function testValidateNewsArticleLink() {
|
||||
$valid = link_validate_url('news:hj0db8$vrm$1@news.eternal-september.org');
|
||||
$this->assertEqual(LINK_NEWS, $valid, 'Make sure link to specific article valiates as news.');
|
||||
}
|
||||
|
||||
function testValidateBadNewsgroupLink() {
|
||||
$valid = link_validate_url('news:comp.bad_name.misc');
|
||||
$this->assertEqual(FALSE, $valid, 'newsgroup names can\'t contain underscores, so it should come back as invalid.');
|
||||
}
|
||||
|
||||
function testValidateInternalLink() {
|
||||
$valid = link_validate_url('node/5');
|
||||
$this->assertEqual(LINK_INTERNAL, $valid, 'Test normal internal link.');
|
||||
}
|
||||
|
||||
function testValidateInternalLinkWithDot() {
|
||||
$valid = link_validate_url('rss.xml');
|
||||
$this->assertEqual(LINK_INTERNAL, $valid, 'Test rss.xml internal link.');
|
||||
}
|
||||
|
||||
function testValidateInternalLinkToFile() {
|
||||
$valid = link_validate_url('files/test.jpg');
|
||||
$this->assertEqual(LINK_INTERNAL, $valid, 'Test files/test.jpg internal link.');
|
||||
}
|
||||
|
||||
function testValidateExternalLinks() {
|
||||
$links = array(
|
||||
'http://localhost:8080/',
|
||||
'www.example.com',
|
||||
'www.example.com/',
|
||||
'http://username:p%40ssw0rd!@www.example.com/',
|
||||
'http://@www.example.com/',
|
||||
'http://username:@www.example.com/',
|
||||
'http://username:password@www.example.com:8080/',
|
||||
'http://127.0.0.1:80/',
|
||||
'http://127.173.24.255:4723/',
|
||||
'127.173.24.255:4723/',
|
||||
'http://255.255.255.255:4823/',
|
||||
'www.test-site.com',
|
||||
'http://example.com/index.php?q=node/123',
|
||||
'http://example.com/index.php?page=this\that',
|
||||
'http://example.com/?first_name=Joe Bob&last_name=Smith',
|
||||
// Anchors
|
||||
'http://www.example.com/index.php#test',
|
||||
'http://www.example.com/index.php#this@that.',
|
||||
'http://www.example.com/index.php#',
|
||||
'http://www.cnn.com/video/#/video/politics/2008/12/09/intv.madeleine.albright.cnn',
|
||||
'http://www.archive.org/stream/aesopsfables00aesorich#page/n7/mode/2up',
|
||||
'http://www.example.com/blah/#this@that?',
|
||||
);
|
||||
// Test all of the protocols.
|
||||
$allowed_protocols = variable_get('filter_allowed_protocols', array('http', 'https', 'ftp', 'news', 'nntp', 'telnet', 'mailto', 'irc', 'ssh', 'sftp', 'webcal'));
|
||||
foreach ($allowed_protocols as $protocol) {
|
||||
if ($protocol !== 'news' && $protocol !== 'mailto') {
|
||||
$links[] = $protocol .'://www.example.com';
|
||||
}
|
||||
}
|
||||
foreach ($links as $link) {
|
||||
$valid = link_validate_url($link);
|
||||
$this->assertEqual(LINK_EXTERNAL, $valid, 'Testing that '. $link .' is a valid external link.');
|
||||
}
|
||||
}
|
||||
|
||||
function testInvalidExternalLinks() {
|
||||
$links = array(
|
||||
'http://www.ex ample.com/',
|
||||
'//www.example.com/',
|
||||
'http://25.0.0/', // bad ip!
|
||||
'http://4827.0.0.2/',
|
||||
'http://www.testß.com/', // ß not allowed in domain names!
|
||||
//'http://www.-fudge.com/', // domains can't have sections starting with a dash.
|
||||
);
|
||||
foreach ($links as $link) {
|
||||
$valid = link_validate_url($link);
|
||||
$this->assertEqual(FALSE, $valid, 'Testing that '. $link .' is not a valid link.');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,441 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Test file for Link checker module.
|
||||
*/
|
||||
class LinkCheckerLinkExtractionTest extends DrupalWebTestCase {
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => t('Link extraction tests'),
|
||||
'description' => t('Test Link checker module link extraction functionality.'),
|
||||
'group' => 'Link checker',
|
||||
);
|
||||
}
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp('linkchecker', 'path');
|
||||
|
||||
$permissions = array(
|
||||
'create page content',
|
||||
'edit own page content',
|
||||
'administer url aliases',
|
||||
'create url aliases',
|
||||
);
|
||||
|
||||
$user = $this->drupalCreateUser($permissions);
|
||||
$this->drupalLogin($user);
|
||||
|
||||
}
|
||||
|
||||
public function testLinkCheckerCreateNodeWithLinks() {
|
||||
|
||||
// Enable all node type page for link extraction.
|
||||
variable_set('linkchecker_scan_nodetypes', array('page'));
|
||||
variable_set('linkchecker_scan_blocks', 1);
|
||||
|
||||
// Core enables the URL filter for "Full HTML" by default.
|
||||
// -> Blacklist / Disable URL filter for testing.
|
||||
variable_set('linkchecker_filter_blacklist', array('filter/2'));
|
||||
|
||||
// Extract from all link checker supported HTML tags.
|
||||
variable_set('linkchecker_extract_from_a', 1);
|
||||
variable_set('linkchecker_extract_from_audio', 1);
|
||||
variable_set('linkchecker_extract_from_embed', 1);
|
||||
variable_set('linkchecker_extract_from_iframe', 1);
|
||||
variable_set('linkchecker_extract_from_img', 1);
|
||||
variable_set('linkchecker_extract_from_object', 1);
|
||||
variable_set('linkchecker_extract_from_source', 1);
|
||||
variable_set('linkchecker_extract_from_video', 1);
|
||||
|
||||
$body = <<<EOT
|
||||
<!-- UNSUPPORTED for link checking: -->
|
||||
|
||||
<a href="mailto:test@example.com">Send email</a>
|
||||
<a href="javascript:foo()">Execute JavaScript</a>
|
||||
|
||||
<!-- SUPPORTED for link checking: -->
|
||||
|
||||
<!-- URL in HTML comment: http://example.com/test-if-url-filter-is-disabled -->
|
||||
|
||||
<!-- Relative URLs -->
|
||||
<img src="test.png" alt="Test image 1" />
|
||||
<img src="../foo1/test.png" alt="Test image 2" />
|
||||
|
||||
<a href="../foo1/bar1">../foo1/bar1</a>
|
||||
<a href="./foo2/bar2">./foo2/bar2</a>
|
||||
<a href="../foo3/../foo4/foo5">../foo3/../foo4/foo5</a>
|
||||
<a href="./foo4/../foo5/foo6">./foo4/../foo5/foo6</a>
|
||||
<a href="./foo4/./foo5/foo6">./foo4/./foo5/foo6</a>
|
||||
|
||||
<!-- URL with uncommon chars that could potentially fail to extract. See http://drupal.org/node/465462. -->
|
||||
<a href="http://www.lagrandeepicerie.fr/#e-boutique/Les_produits_du_moment,2/coffret_vins_doux_naturels,149">URL with uncommon chars</a>
|
||||
|
||||
<!-- object tag: Embed SWF files -->
|
||||
<object width="150" height="116"
|
||||
type="application/x-shockwave-flash"
|
||||
data="http://wetterservice.msn.de/phclip.swf?zip=60329&ort=Frankfurt">
|
||||
<param name="movie" value="http://wetterservice.msn.de/phclip.swf?zip=60329&ort=Frankfurt" />
|
||||
<img src="flash.png" width="150" height="116" alt="" /> <br />
|
||||
No weather report visible? At <a href="http://www.msn.de/">MSN</a>
|
||||
you are able to find the weather report missing here and the
|
||||
Flash plugin can be found at <a href="http://www.adobe.com/">Adobe</a>.
|
||||
</object>
|
||||
|
||||
<!-- object tag: Embed Quicktime Movies on HTML pages -->
|
||||
<object width="420" height="282"
|
||||
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
|
||||
codebase="http://www.apple.com/qtactivex/qtplugin.cab">
|
||||
<param name="src" value="http://example.net/video/foo1.mov" />
|
||||
<param name="href" value="http://example.net/video/foo2.mov" />
|
||||
<param name="controller" value="true" />
|
||||
<param name="autoplay" value="false" />
|
||||
<param name="scale" value="aspect" />
|
||||
<!--[if gte IE 7]> <!-->
|
||||
<object type="video/quicktime" data="http://example.net/video/foo3.mov" width="420" height="282">
|
||||
<param name="controller" value="true" />
|
||||
<param name="autoplay" value="false" />
|
||||
</object>
|
||||
<!--<![endif]-->
|
||||
</object>
|
||||
|
||||
<!-- object tag: Play MP4 videos on HTML pages -->
|
||||
<object data="http://example.org/video/foo1.mp4" type="video/mp4" width="420" height="288">
|
||||
<param name="src" value="http://example.org/video/foo2.mp4" />
|
||||
<param name="autoplay" value="false" />
|
||||
<param name="autoStart" value="0" />
|
||||
<a href="http://example.org/video/foo3.mp4">/video/foo3.mp4</a>
|
||||
</object>
|
||||
|
||||
<!-- object tag: Play MP4 videos with Quicktime -->
|
||||
<object width="420" height="282" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
|
||||
<param name="src" value="http://example.org/video/foo4.mp4" />
|
||||
<param name="href" value="http://example.org/video/foo5.mp4" />
|
||||
<param name="controller" value="true" />
|
||||
<param name="autoplay" value="false" />
|
||||
<param name="scale" value="aspect" />
|
||||
<!--[if gte IE 7]> <!-->
|
||||
<object type="video/quicktime" data="http://example.org/video/foo6.mp4" width="420" height="282">
|
||||
<param name="controller" value="true" />
|
||||
<param name="autoplay" value="false" />
|
||||
</object>
|
||||
<!--<![endif]-->
|
||||
</object>
|
||||
|
||||
<!-- object tag: Play flash videos on HTML pages -->
|
||||
<object type="application/x-shockwave-flash" data="http://example.org/video/player1.swf" width="420" height="270">
|
||||
<param name="movie" value="http://example.org/video/player2.swf" />
|
||||
<param src="movie" value="http://example.org/video/player3.swf" />
|
||||
<param name="flashvars" value="file=http://example.org/video/foo1.flv&width=420&height=270" />
|
||||
</object>
|
||||
|
||||
<!-- Embed ActiveX control as objekt -->
|
||||
<object width="267" height="175" classid="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A">
|
||||
<param name="filename" value="ritmo.mid">
|
||||
</object>
|
||||
|
||||
<!-- Add inline frames -->
|
||||
<iframe src="http://example.com/iframe/" name="ExampleIFrame" width="300" height="200">
|
||||
<p>Your browser does not support inline frames.</p>
|
||||
</iframe>
|
||||
|
||||
<!-- https://developer.mozilla.org/en/Using_audio_and_video_in_Firefox -->
|
||||
|
||||
<!-- http://www.theora.org/cortado/ -->
|
||||
<video src="my_ogg_video.ogg" controls width="320" height="240">
|
||||
<object type="application/x-java-applet" width="320" height="240">
|
||||
<param name="archive" value="http://www.theora.org/cortado.jar">
|
||||
<param name="code" value="com.fluendo.player.Cortado.class">
|
||||
<param name="url" value="my_ogg_video.ogg">
|
||||
<p>You need to install Java to play this file.</p>
|
||||
</object>
|
||||
</video>
|
||||
|
||||
<video src="video.ogv" controls>
|
||||
<object data="flvplayer1.swf" type="application/x-shockwave-flash">
|
||||
<param name="movie" value="flvplayer2.swf" />
|
||||
</object>
|
||||
</video>
|
||||
|
||||
<video controls>
|
||||
<source src="http://v2v.cc/~j/theora_testsuite/pixel_aspect_ratio.ogg" type="video/ogg">
|
||||
<source src="http://v2v.cc/~j/theora_testsuite/pixel_aspect_ratio.mov">
|
||||
Your browser does not support the <code>video</code> element.
|
||||
</video>
|
||||
|
||||
<video controls>
|
||||
<source src="foo.ogg" type="video/ogg; codecs="dirac, speex"">
|
||||
Your browser does not support the <code>video</code> element.
|
||||
</video>
|
||||
|
||||
<video src="http://v2v.cc/~j/theora_testsuite/320x240.ogg" controls>
|
||||
Your browser does not support the <code>video</code> element.
|
||||
</video>
|
||||
EOT;
|
||||
|
||||
// Save folder names in variables for reuse.
|
||||
$folder1 = $this->randomName(10);
|
||||
$folder2 = $this->randomName(5);
|
||||
|
||||
// Allow the user to use the 'Full HTML' format.
|
||||
db_query("UPDATE {filter_formats} SET roles = '%s' WHERE format = %d", ',2,', 2);
|
||||
|
||||
// Fill node array.
|
||||
$edit = array();
|
||||
$edit['title'] = $this->randomName(32);
|
||||
$edit['body'] = $body;
|
||||
$edit['path'] = $folder1 . '/' . $folder2;
|
||||
$edit['format'] = 2;
|
||||
|
||||
// Extract only full qualified URLs.
|
||||
variable_set('linkchecker_fqdn_only', 1);
|
||||
|
||||
// Verify path input field appears on add "Basic page" form.
|
||||
$this->drupalGet('node/add/page');
|
||||
// Verify path input is present.
|
||||
$this->assertFieldByName('path', '', t('Path input field present on add Basic page form.'));
|
||||
|
||||
// Save node.
|
||||
$this->drupalPost('node/add/page', $edit, t('Save'));
|
||||
$this->assertRaw(t('@type %title has been created.', array('@type' => 'Page', '%title' => $edit['title'])), t('Node was created.'));
|
||||
|
||||
// Verify if the content links are extracted correctly.
|
||||
$urls_fqdn = array(
|
||||
'http://www.lagrandeepicerie.fr/#e-boutique/Les_produits_du_moment,2/coffret_vins_doux_naturels,149',
|
||||
'http://wetterservice.msn.de/phclip.swf?zip=60329&ort=Frankfurt',
|
||||
'http://www.msn.de/',
|
||||
'http://www.adobe.com/',
|
||||
'http://www.apple.com/qtactivex/qtplugin.cab',
|
||||
'http://example.net/video/foo1.mov',
|
||||
'http://example.net/video/foo2.mov',
|
||||
'http://example.net/video/foo3.mov',
|
||||
'http://example.org/video/foo1.mp4',
|
||||
'http://example.org/video/foo2.mp4',
|
||||
'http://example.org/video/foo3.mp4',
|
||||
'http://example.org/video/foo4.mp4',
|
||||
'http://example.org/video/foo5.mp4',
|
||||
'http://example.org/video/foo6.mp4',
|
||||
'http://example.org/video/player1.swf',
|
||||
'http://example.org/video/player2.swf',
|
||||
'http://example.org/video/player3.swf',
|
||||
'http://example.com/iframe/',
|
||||
'http://www.theora.org/cortado.jar',
|
||||
'http://v2v.cc/~j/theora_testsuite/pixel_aspect_ratio.ogg',
|
||||
'http://v2v.cc/~j/theora_testsuite/pixel_aspect_ratio.mov',
|
||||
'http://v2v.cc/~j/theora_testsuite/320x240.ogg',
|
||||
);
|
||||
|
||||
foreach ($urls_fqdn as $org_url => $check_url) {
|
||||
$link = $this->getLinkCheckerLink($check_url);
|
||||
if ($link) {
|
||||
$this->assertIdentical($link->url, $check_url, t('Absolute URL %org_url matches expected result %check_url.', array('%org_url' => $org_url, '%check_url' => $check_url)));
|
||||
}
|
||||
else {
|
||||
$this->fail(t('URL %check_url not found.', array('%check_url' => $check_url)));
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the number of links is correct.
|
||||
// - Verifies if all HTML tag regexes matched.
|
||||
// - Verifies that the linkchecker filter blacklist works well.
|
||||
$urls_in_database = $this->getLinkCheckerLinksCount();
|
||||
$urls_expected_count = count($urls_fqdn);
|
||||
$this->assertEqual($urls_in_database, $urls_expected_count, t('Found @urls_in_database URLs in database matches expected result of @urls_expected_count.', array('@urls_in_database' => $urls_in_database, '@urls_expected_count' => $urls_expected_count)));
|
||||
|
||||
// Extract all URLs including relative path.
|
||||
variable_set('clean_url', 1);
|
||||
variable_set('linkchecker_fqdn_only', 0);
|
||||
|
||||
$node = $this->drupalGetNodeByTitle($edit['title']);
|
||||
$this->assertTrue($node, t('Node found in database.'));
|
||||
$this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
|
||||
$this->assertRaw(t('@type %title has been updated.', array('@type' => 'Page', '%title' => $edit['title'])));
|
||||
|
||||
// FIXME: Path alias seems not saved!???
|
||||
// $this->assertIdentical($node->path, $edit['path'], t('URL alias "@node-path" matches path "@edit-path".', array('@node-path' => $node->path, '@edit-path' => $edit['path'])));
|
||||
|
||||
// DEBUG
|
||||
$linkchecker_links = db_query("SELECT * FROM {linkchecker_links}");
|
||||
while ($row = db_fetch_array($linkchecker_links)) {
|
||||
$rows[] = $row['url'];
|
||||
}
|
||||
$this->verbose(theme_item_list($rows, 'URLs in database:'));
|
||||
// $this->fail('DEBUG: ' .implode('<br />', $rows));
|
||||
|
||||
// Verify if the content links are extracted correctly.
|
||||
global $base_root, $base_path;
|
||||
$urls_relative = array(
|
||||
'../foo1/test.png' => $base_root . $base_path . 'foo1/test.png',
|
||||
'test.png' => $base_root . $base_path . $folder1 . '/test.png',
|
||||
'../foo1/bar1' => $base_root . $base_path . 'foo1/bar1',
|
||||
'./foo2/bar2' => $base_root . $base_path . $folder1 . '/foo2/bar2',
|
||||
'../foo3/../foo4/foo5' => $base_root . $base_path . 'foo4/foo5',
|
||||
'./foo4/../foo5/foo6' => $base_root . $base_path . $folder1 . '/foo5/foo6',
|
||||
'./foo4/./foo5/foo6' => $base_root . $base_path . $folder1 . '/foo4/foo5/foo6',
|
||||
'flash.png' => $base_root . $base_path . $folder1 . '/flash.png',
|
||||
'ritmo.mid' => $base_root . $base_path . $folder1 . '/ritmo.mid',
|
||||
'my_ogg_video.ogg' => $base_root . $base_path . $folder1 . '/my_ogg_video.ogg',
|
||||
'video.ogv' => $base_root . $base_path . $folder1 . '/video.ogv',
|
||||
'flvplayer1.swf' => $base_root . $base_path . $folder1 . '/flvplayer1.swf',
|
||||
'flvplayer2.swf' => $base_root . $base_path . $folder1 . '/flvplayer2.swf',
|
||||
'foo.ogg' => $base_root . $base_path . $folder1 . '/foo.ogg',
|
||||
);
|
||||
$this->verbose(theme_item_list($urls_relative, 'Verify if following relative URLs exists:'));
|
||||
|
||||
foreach ($urls_relative as $org_url => $check_url) {
|
||||
$link = $this->getLinkCheckerLink($check_url);
|
||||
if ($link) {
|
||||
$this->assertIdentical($link->url, $check_url, t('Relative URL %org_url matches expected result %check_url.', array('%org_url' => $org_url, '%check_url' => $check_url)));
|
||||
}
|
||||
else {
|
||||
$this->fail(t('URL %check_url not found.', array('%check_url' => $check_url)));
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the number of links is correct.
|
||||
$urls_in_database = $this->getLinkCheckerLinksCount();
|
||||
$urls_expected_count = count($urls_fqdn + $urls_relative);
|
||||
$this->assertEqual($urls_in_database, $urls_expected_count, t('Found @urls_in_database URLs in database matches expected result of @urls_expected_count.', array('@urls_in_database' => $urls_in_database, '@urls_expected_count' => $urls_expected_count)));
|
||||
|
||||
|
||||
// Verify if link check has been enabled for normal URLs.
|
||||
$urls = array(
|
||||
'http://www.lagrandeepicerie.fr/#e-boutique/Les_produits_du_moment,2/coffret_vins_doux_naturels,149',
|
||||
'http://wetterservice.msn.de/phclip.swf?zip=60329&ort=Frankfurt',
|
||||
'http://www.msn.de/',
|
||||
'http://www.adobe.com/',
|
||||
'http://www.apple.com/qtactivex/qtplugin.cab',
|
||||
'http://www.theora.org/cortado.jar',
|
||||
'http://v2v.cc/~j/theora_testsuite/pixel_aspect_ratio.ogg',
|
||||
'http://v2v.cc/~j/theora_testsuite/pixel_aspect_ratio.mov',
|
||||
'http://v2v.cc/~j/theora_testsuite/320x240.ogg',
|
||||
$base_root . $base_path . 'foo1/test.png',
|
||||
$base_root . $base_path . $folder1 . '/test.png',
|
||||
$base_root . $base_path . 'foo1/bar1',
|
||||
$base_root . $base_path . $folder1 . '/foo2/bar2',
|
||||
$base_root . $base_path . 'foo4/foo5',
|
||||
$base_root . $base_path . $folder1 . '/foo5/foo6',
|
||||
$base_root . $base_path . $folder1 . '/foo4/foo5/foo6',
|
||||
$base_root . $base_path . $folder1 . '/flash.png',
|
||||
$base_root . $base_path . $folder1 . '/ritmo.mid',
|
||||
$base_root . $base_path . $folder1 . '/my_ogg_video.ogg',
|
||||
$base_root . $base_path . $folder1 . '/video.ogv',
|
||||
$base_root . $base_path . $folder1 . '/flvplayer1.swf',
|
||||
$base_root . $base_path . $folder1 . '/flvplayer2.swf',
|
||||
$base_root . $base_path . $folder1 . '/foo.ogg',
|
||||
);
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$this->assertTrue($this->getLinkcheckerLink($url)->status, t('Link check for %url is enabled.', array('%url' => $url)));
|
||||
}
|
||||
|
||||
|
||||
// Verify if link check has been disabled for example.com/net/org URLs.
|
||||
$documentation_urls = array(
|
||||
'http://example.net/video/foo1.mov',
|
||||
'http://example.net/video/foo2.mov',
|
||||
'http://example.net/video/foo3.mov',
|
||||
'http://example.org/video/foo1.mp4',
|
||||
'http://example.org/video/foo2.mp4',
|
||||
'http://example.org/video/foo3.mp4',
|
||||
'http://example.org/video/foo4.mp4',
|
||||
'http://example.org/video/foo5.mp4',
|
||||
'http://example.org/video/foo6.mp4',
|
||||
'http://example.org/video/player1.swf',
|
||||
'http://example.org/video/player2.swf',
|
||||
'http://example.org/video/player3.swf',
|
||||
'http://example.com/iframe/',
|
||||
);
|
||||
|
||||
foreach ($documentation_urls as $documentation_url) {
|
||||
$this->assertFalse($this->getLinkcheckerLink($documentation_url)->status, t('Link check for %url is disabled.', array('%url' => $documentation_url)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get linkchecker link by url.
|
||||
*
|
||||
* @param string $url
|
||||
* URL of the link to find.
|
||||
* @return object
|
||||
* Link object.
|
||||
*/
|
||||
function getLinkCheckerLink($url) {
|
||||
return db_fetch_object(db_query("SELECT * FROM {linkchecker_links} WHERE urlhash = '%s'", md5($url)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current number of links in linkchecker_links table.
|
||||
*/
|
||||
function getLinkCheckerLinksCount() {
|
||||
return db_result(db_query("SELECT COUNT(1) FROM {linkchecker_links}"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for impersonating users.
|
||||
*
|
||||
* Based on http://drupal.org/node/287292#comment-3162350
|
||||
*/
|
||||
class LinkCheckerUserImpersonatingUserTestCase extends DrupalWebTestCase {
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Link checker impersonate users',
|
||||
'description' => 'Temporarily impersonate another user, and then restore the original user.',
|
||||
'group' => 'Link checker',
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp('linkchecker');
|
||||
}
|
||||
|
||||
function testLinkCheckerImpersonateUser() {
|
||||
global $user;
|
||||
$original_user = $user;
|
||||
|
||||
// If not currently logged in, use linkchecker_impersonate_user() to switch to
|
||||
// user 1. If logged in, switch to the anonymous user instead.
|
||||
if (user_is_anonymous()) {
|
||||
linkchecker_impersonate_user(1);
|
||||
}
|
||||
else {
|
||||
linkchecker_impersonate_user(0);
|
||||
}
|
||||
|
||||
// Verify that the active user has changed, and that session saving is
|
||||
// disabled.
|
||||
$this->assertEqual($user->uid, ($original_user->uid == 0 ? 1 : 0), t('User switched'));
|
||||
$this->assertFalse(session_save_session(), t('Session saving is disabled.'));
|
||||
|
||||
// Perform a second (nested) impersonation.
|
||||
linkchecker_impersonate_user(1);
|
||||
$this->assertEqual($user->uid, 1, t('User switched.'));
|
||||
|
||||
// Revert to the user which was active between the first and second
|
||||
// impersonation attempt.
|
||||
linkchecker_revert_user();
|
||||
|
||||
// Since we are still impersonating the user from the first attempt,
|
||||
// session handling still needs to be disabled.
|
||||
$this->assertEqual($user->uid, ($original_user->uid == 0 ? 1 : 0), t('User switched.'));
|
||||
$this->assertFalse(session_save_session(), t('Session saving is disabled.'));
|
||||
|
||||
// Revert to the original user which was active before the first
|
||||
// impersonation attempt.
|
||||
linkchecker_revert_user();
|
||||
|
||||
// Assert that the original user is the active user again, and that session
|
||||
// saving has been re-enabled.
|
||||
$this->assertEqual($user->uid, $original_user->uid, t('Original user successfully restored.'));
|
||||
|
||||
// Simpletest uses linkchecker_impersonate_user() too, revert the impersonation by
|
||||
// Simpletest to enable session saving again. This is safe because calling
|
||||
// linkchecker_revert_user() too often simply results in returning the active user.
|
||||
linkchecker_revert_user();
|
||||
$this->assertTrue(session_save_session(), t('Session saving is enabled.'));
|
||||
}
|
||||
}
|
|
@ -1,456 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Unit tests for Password policy module.
|
||||
*/
|
||||
|
||||
class PasswordPolicyTest extends DrupalWebTestCase {
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Constraints Test',
|
||||
'description' => 'Assure that password constraints work.',
|
||||
'group' => 'Password Policy',
|
||||
);
|
||||
}
|
||||
|
||||
public function setUp() {
|
||||
if (defined('USER_LOAD_PHPASS_PATCHED')) {
|
||||
parent::setUp('password_policy', 'phpass');
|
||||
}
|
||||
else {
|
||||
parent::setUp('password_policy');
|
||||
}
|
||||
}
|
||||
|
||||
function testUppercaseConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_uppercase');
|
||||
$constraint = 2;
|
||||
$uid = 0;
|
||||
$pass = 'Abc';
|
||||
$result = password_policy_constraint_uppercase_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'One uppercase letter in the uppercase constraint with param 2');
|
||||
$pass = 'ABc';
|
||||
$result = password_policy_constraint_uppercase_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'Two uppercase letters in the uppercase constraint with param 2');
|
||||
$pass = 'ABC';
|
||||
$result = password_policy_constraint_uppercase_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'Three uppercase letters in the uppercase constraint with param 2');
|
||||
}
|
||||
|
||||
function testLowercaseConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_lowercase');
|
||||
$constraint = 2;
|
||||
$uid = 0;
|
||||
$pass = 'Abc';
|
||||
$result = password_policy_constraint_lowercase_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One uppercase letter in the lowercase constraint with param 2');
|
||||
$pass = 'ABc';
|
||||
$result = password_policy_constraint_lowercase_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'Two uppercase letters in the lowercase constraint with param 2');
|
||||
$pass = 'ABC';
|
||||
$result = password_policy_constraint_lowercase_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'Three uppercase letters in the lowercase constraint with param 2');
|
||||
}
|
||||
|
||||
function testLetterConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_letter');
|
||||
$constraint = 2;
|
||||
$uid = 0;
|
||||
$pass = 'a12';
|
||||
$result = password_policy_constraint_letter_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'One lowercase letter in the letter constraint with param 2');
|
||||
$pass = 'aB1';
|
||||
$result = password_policy_constraint_letter_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One lowercase and one uppercase letter in the letter constraint with param 2');
|
||||
$pass = 'abC';
|
||||
$result = password_policy_constraint_letter_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'Two lowercase and one uppercase letter in the letter constraint with param 2');
|
||||
}
|
||||
|
||||
function testDigitConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_digit');
|
||||
$constraint = 2;
|
||||
$uid = 0;
|
||||
$pass = '1ab';
|
||||
$result = password_policy_constraint_digit_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'One digit in the digit constraint with param 2');
|
||||
$pass = '12a';
|
||||
$result = password_policy_constraint_digit_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'Two digits in the digit constraint with param 2');
|
||||
$pass = '123';
|
||||
$result = password_policy_constraint_digit_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'Three digits in the digit constraint with param 2');
|
||||
}
|
||||
|
||||
function testLengthConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_length');
|
||||
$constraint = 6;
|
||||
$uid = 0;
|
||||
$pass = 'abcde';
|
||||
$result = password_policy_constraint_length_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'Five characters password in the length constraint with param 6');
|
||||
$pass = 'abcdef';
|
||||
$result = password_policy_constraint_length_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'Six characters password in the length constraint with param 6');
|
||||
$pass = 'abcdefg';
|
||||
$result = password_policy_constraint_length_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'Seven characters password in the length constraint with param 6');
|
||||
}
|
||||
|
||||
function testAlphanumericConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_alphanumeric');
|
||||
$constraint = 2;
|
||||
$uid = 0;
|
||||
$pass = '1$%';
|
||||
$result = password_policy_constraint_alphanumeric_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'One digit and no letter in the alphanumeric constraint with param 2');
|
||||
$pass = '1a#';
|
||||
$result = password_policy_constraint_alphanumeric_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One digit and one letter in the alphanumeric constraint with param 2');
|
||||
$pass = '1ab';
|
||||
$result = password_policy_constraint_alphanumeric_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One digit ant two letters in the alphanumeric constraint with param 2');
|
||||
}
|
||||
|
||||
function testPunctuationConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_punctuation');
|
||||
$constraint = 2;
|
||||
$uid = 0;
|
||||
$pass = '%1a';
|
||||
$result = password_policy_constraint_punctuation_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'One punctuation character in the punctuation constraint with param 2');
|
||||
$pass = '%^a';
|
||||
$result = password_policy_constraint_punctuation_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'Two punctuation character in the punctuation constraint with param 2');
|
||||
$pass = '%^&';
|
||||
$result = password_policy_constraint_punctuation_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'Three punctuation character in the punctuation constraint with param 2');
|
||||
}
|
||||
|
||||
function testComplexityConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_complexity');
|
||||
$constraint = 2;
|
||||
$uid = 0;
|
||||
$pass = 'abc';
|
||||
$result = password_policy_constraint_complexity_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'Three letters in the type constraint with param 2');
|
||||
$pass = 'a1c';
|
||||
$result = password_policy_constraint_complexity_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'Two letters and one digit in the type constraint with param 2');
|
||||
$pass = 'a1&';
|
||||
$result = password_policy_constraint_complexity_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One letter, one digit and one punctuation in the type constraint with param 2');
|
||||
}
|
||||
|
||||
function testUsernameConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_username');
|
||||
$constraint = 2;
|
||||
$user = $this->drupalCreateUser();
|
||||
$name = $this->randomName();
|
||||
$result = password_policy_constraint_username_validate($name, $constraint, $user->uid);
|
||||
$this->assertTrue($result, 'Random string in the username constraint');
|
||||
$result = password_policy_constraint_username_validate($user->name, $constraint, $user->uid);
|
||||
$this->assertFalse($result, 'Username in the username constraint');
|
||||
$result = password_policy_constraint_username_validate('foo' . $user->name . 'bar', $constraint, $user->uid);
|
||||
$this->assertFalse($result, 'String containing username in the username constraint');
|
||||
}
|
||||
|
||||
function testHistoryConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_history');
|
||||
// Log in
|
||||
$user = $this->drupalCreateUser(array('administer site configuration'));
|
||||
$this->drupalLogin($user);
|
||||
// Create a policy
|
||||
$policy_name = $this->randomName();
|
||||
$edit = array(
|
||||
'name' => $policy_name,
|
||||
'constraint_history' => t('2'),
|
||||
'roles[2]' => '2',
|
||||
);
|
||||
$this->drupalPost('admin/settings/password_policy/add', $edit, t('Create'));
|
||||
$this->assertText('Policy ' . $policy_name . ' has been created.', 'Policy ' . $policy_name . ' has been created');
|
||||
// Enable newly created policy
|
||||
$pid = db_result(db_query('SELECT pid FROM {password_policy} WHERE name="%s"', $policy_name));
|
||||
$constraints = unserialize(db_result(db_query('SELECT policy FROM {password_policy} WHERE pid=%d', $pid)));
|
||||
$this->assertTrue($constraints['history'] == 2, t('Verified history constraint set.'));
|
||||
$edit = array(
|
||||
"enabled[$pid]" => $pid,
|
||||
);
|
||||
$this->drupalPost('admin/settings/password_policy/list', $edit, t('Save changes'));
|
||||
$this->assertText(t('The changes have been saved.'), t('Form submitted successfully.'));
|
||||
$enabled = db_result(db_query('SELECT enabled FROM {password_policy} WHERE pid=%d', $pid));
|
||||
$this->assertTrue($enabled == 1, t('Policy enabled.'));
|
||||
|
||||
// Change password
|
||||
$pass1 = "aaaaaa";
|
||||
$edit = array(
|
||||
'pass[pass1]' => $pass1,
|
||||
'pass[pass2]' => $pass1,
|
||||
);
|
||||
$this->drupalPost("user/$user->uid/edit", $edit, t('Save'));
|
||||
$this->assertText(t('The changes have been saved.'), t("1st password change: $pass1"));
|
||||
// Change password second time
|
||||
$pass2 = "bbbbbb";
|
||||
$edit = array(
|
||||
'pass[pass1]' => $pass1,
|
||||
'pass[pass2]' => $pass1,
|
||||
);
|
||||
$this->drupalPost("user/$user->uid/edit", $edit, t('Save'));
|
||||
$this->assertText(t('Your password has not met the following requirement(s):'), t("2nd password change should fail: $pass1"));
|
||||
// Try changing password with the first one
|
||||
$edit = array(
|
||||
'pass[pass1]' => $pass2,
|
||||
'pass[pass2]' => $pass2,
|
||||
);
|
||||
$this->drupalPost("user/$user->uid/edit", $edit, t('Save'));
|
||||
$this->assertText(t('The changes have been saved.'), t("3rd password change should pass: $pass2"));
|
||||
// Change password again
|
||||
$pass3 = "cccccc";
|
||||
$edit = array(
|
||||
'pass[pass1]' => $pass3,
|
||||
'pass[pass2]' => $pass3,
|
||||
);
|
||||
$this->drupalPost("user/$user->uid/edit", $edit, t('Save'));
|
||||
$this->assertText(t('The changes have been saved.'), t("4th password change should pass: $pass3"));
|
||||
|
||||
// Delete test policy
|
||||
$this->drupalPost('admin/settings/password_policy/delete/' . $pid, array(), t('Delete'));
|
||||
$this->assertText('Password policy ' . $policy_name . ' was deleted.', 'Default password policy ' . $policy_name . 'was deleted');
|
||||
}
|
||||
|
||||
function testDigitPlacementConstraint() {
|
||||
module_load_include('inc', 'password_policy', 'constraints/constraint_digit_placement');
|
||||
$constraint = 0;
|
||||
$uid = 0;
|
||||
$pass = 'ILove2Password';
|
||||
$result = password_policy_constraint_digit_placement_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One numeric character in the digit placement constraint with param 0');
|
||||
$pass = 'ILovePassword2';
|
||||
$result = password_policy_constraint_digit_placement_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One numeric character in the digit placement constraint with param 0');
|
||||
$constraint = 1;
|
||||
$pass = 'ILove2Password';
|
||||
$result = password_policy_constraint_digit_placement_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One numeric character in the digit placement constraint with param 1');
|
||||
$pass = 'ILovePassword2';
|
||||
$result = password_policy_constraint_digit_placement_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One numeric character in the digit placement constraint with param 1');
|
||||
$constraint = 2;
|
||||
$pass = 'ILove2Password';
|
||||
$result = password_policy_constraint_digit_placement_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One numeric character in the digit placement constraint with param 2');
|
||||
$pass = 'ILovePassword2';
|
||||
$result = password_policy_constraint_digit_placement_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'One numeric character in the digit placement constraint with param 2');
|
||||
$pass = '1LovePassword';
|
||||
$result = password_policy_constraint_digit_placement_validate($pass, $constraint, $uid);
|
||||
$this->assertFalse($result, 'One numeric character in the digit placement constraint with param 2');
|
||||
$pass = '1LovePassword2';
|
||||
$result = password_policy_constraint_digit_placement_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One numeric character in the digit placement constraint with param 2');
|
||||
$pass = 'ILove2Password3';
|
||||
$result = password_policy_constraint_digit_placement_validate($pass, $constraint, $uid);
|
||||
$this->assertTrue($result, 'One numeric character in the digit placement constraint with param 2');
|
||||
}
|
||||
}
|
||||
|
||||
class PasswordPolicyForcePasswordChangeTestCase extends DrupalWebTestCase {
|
||||
protected $admin_user;
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Force password change tests',
|
||||
'description' => 'Tests forced password reset for single user, role and all new users.',
|
||||
'group' => 'Password Policy',
|
||||
);
|
||||
}
|
||||
|
||||
public function setUp() {
|
||||
if (defined('USER_LOAD_PHPASS_PATCHED')) {
|
||||
parent::setUp('password_policy', 'phpass');
|
||||
}
|
||||
else {
|
||||
parent::setUp('password_policy');
|
||||
}
|
||||
}
|
||||
|
||||
// test permissions
|
||||
public function testPerms() {
|
||||
// no perms
|
||||
$user = $this->drupalCreateUser();
|
||||
$this->drupalLogin($user);
|
||||
$this->drupalGet('admin/settings/password_policy/password_change');
|
||||
$this->assertResponse('403', t('Acces should be denied.'));
|
||||
$this->drupalLogout();
|
||||
|
||||
// with perms
|
||||
$user = $this->drupalCreateUser(array('force password change'));
|
||||
$this->drupalLogin($user);
|
||||
$this->drupalGet('admin/settings/password_policy/password_change');
|
||||
$this->assertResponse('200', t('Access should be granted.'));
|
||||
$this->drupalLogout();
|
||||
}
|
||||
|
||||
// test form elements
|
||||
public function testForms() {
|
||||
// test admin form
|
||||
$user = $this->drupalCreateUser(array('force password change', 'administer users'));
|
||||
$this->drupalLogin($user);
|
||||
$this->drupalGet('admin/settings/password_policy/password_change');
|
||||
$this->assertFieldByName('password_policy_new_login_change', '', t('Found first time login change checkbox.'));
|
||||
$this->assertFieldByName('password_policy_force_change_roles[2]', '', t('Found roles checkboxes.'));
|
||||
$this->assertFieldById('edit-submit', '', t('Found submit button.'));
|
||||
|
||||
// test user edit form with perms
|
||||
$this->drupalGet("user/$user->uid/edit");
|
||||
$this->assertFieldByName('force_password_change', '', 'Force password change checkbox is visible to admin.');
|
||||
$this->drupalLogout();
|
||||
|
||||
// test user edit form without perms
|
||||
$user = $this->drupalCreateUser();
|
||||
$this->drupalLogin($user);
|
||||
$this->drupalGet("user/$user->uid/edit");
|
||||
$this->assertNoFieldByName('force_password_change', '', 'Force password change checkbox is hidden for normal users.');
|
||||
$this->drupalLogout();
|
||||
}
|
||||
|
||||
// test single user password change
|
||||
public function testSingleUser() {
|
||||
$admin = $this->drupalCreateUser(array('force password change', 'administer users'));
|
||||
$user = $this->drupalCreateUser();
|
||||
$this->drupalLogin($admin);
|
||||
$edit = array(
|
||||
'force_password_change' => TRUE,
|
||||
);
|
||||
$this->drupalPost("user/$user->uid/edit", $edit, t('Save'));
|
||||
$this->assertRaw(t('!user will be required to change their password the next time they log in.', array('!user' => $user->name)), t('User flagged for password change.'));
|
||||
$force_change = db_result(db_query('SELECT force_change FROM {password_policy_force_change} WHERE uid=%d', $user->uid));
|
||||
$this->assertTrue($force_change == 1, t('Force change flag set to %d for %s.', array('%d' => $force_change, '%s' => $user->name)));
|
||||
|
||||
//confirm admin can edit user account without changing password
|
||||
$edit = array(
|
||||
'name' => $user->name,
|
||||
'mail' => $user->mail,
|
||||
'force_password_change' => TRUE,
|
||||
);
|
||||
$this->drupalPost("user/$user->uid/edit", $edit, t('Save'));
|
||||
$force_change = db_result(db_query('SELECT force_change FROM {password_policy_force_change} WHERE uid=%d', $user->uid));
|
||||
$this->assertTrue($force_change == 1, t('User force change flag set in database:%s.', array('%s' => $force_change)));
|
||||
$this->assertNoRaw(t('An administrator has required that you change your password. You must change your password to proceed on the site.'), t('Admin can edit user account without changing password.'));
|
||||
$this->drupalLogout();
|
||||
|
||||
// verify user is forced to change password
|
||||
$this->drupalLogin($user);
|
||||
$this->assertFieldByName('mail', '', t('User redirected correctly.')); // marginal
|
||||
$this->assertRaw(t('Your password has expired. You must change your password to proceed on the site.'), t('User presented with error instructing them to change their password.'));
|
||||
|
||||
// attempt to change password
|
||||
$edit = array(
|
||||
'mail' => $user->mail,
|
||||
'pass[pass1]' => 'random_string',
|
||||
'pass[pass2]' => 'random_string',
|
||||
);
|
||||
|
||||
$this->drupalPost("user/$user->uid/edit", $edit, t('Save'));
|
||||
$this->assertRaw(t('The changes have been saved.'), t('Password change successful.'));
|
||||
|
||||
// verify user not prompted to change password a 2nd time
|
||||
$this->drupalGet('node');
|
||||
$this->assertNoFieldByName('mail', '', t('User not forced to change password a 2nd time.'));
|
||||
$this->drupalLogout();
|
||||
}
|
||||
|
||||
// test role-based password change
|
||||
public function testRoleChange() {
|
||||
$admin = $this->drupalCreateUser(array('administer users', 'force password change'));
|
||||
$user1 = $this->drupalCreateUser();
|
||||
$user2 = $this->drupalCreateUser();
|
||||
$this->drupalLogin($admin);
|
||||
$edit = array(
|
||||
'password_policy_force_change_roles[2]' => 2,
|
||||
);
|
||||
$this->drupalPost('admin/settings/password_policy/password_change', $edit, t('Submit'));
|
||||
$this->assertText(t('Users in the following roles will be required to immediately change their password: authenticated user'), t('Authenticated users role selected.'));
|
||||
$this->assertTrue($admin->uid != 1, t("Admin uid not 1: $admin->uid"));
|
||||
$this->assertRaw(t('Your password has expired. You must change your password to proceed on the site.'), t('Admin (not uid 1) correctly forced to change password.'));
|
||||
// test db flags for individual users
|
||||
$entry_1 = db_result(db_query('SELECT uid FROM {password_policy_force_change} WHERE uid=%d', $user1->uid));
|
||||
$this->assertTrue($entry_1 == $user1->uid, t("Entry created in password_policy_force_change for user $user1->uid."));
|
||||
$flag_1 = db_result(db_query('SELECT force_change FROM {password_policy_force_change} WHERE uid=%d', $user1->uid));
|
||||
$this->assertTrue($flag_1 == 1, t("User $user1->uid flagged: $flag_1."));
|
||||
$this->drupalLogout();
|
||||
//test individual users
|
||||
$this->drupalLogin($user1);
|
||||
$this->drupalGet('node');
|
||||
$this->assertRaw(t('Your password has expired. You must change your password to proceed on the site.'), t('First test user forced to change password.'));
|
||||
$this->drupalLogout();
|
||||
|
||||
//test 2nd user
|
||||
$this->drupalLogin($user2);
|
||||
$this->assertRaw(t('Your password has expired. You must change your password to proceed on the site.'), t('Second test user forced to change password.'));
|
||||
$this->drupalLogout();
|
||||
|
||||
}
|
||||
|
||||
//test new user change
|
||||
public function testNewUserChange() {
|
||||
$admin = $this->drupalCreateUser(array('administer users', 'force password change'));
|
||||
$this->drupalLogin($admin);
|
||||
$edit = array(
|
||||
'password_policy_new_login_change' => TRUE,
|
||||
);
|
||||
$this->drupalPost('admin/settings/password_policy/password_change', $edit, t('Submit'));
|
||||
$this->assertRaw(t('New users will be required to change their password on first-time login.'), t('New users required to change password on 1st login.'));
|
||||
$this->drupalLogout();
|
||||
$user = $this->drupalCreateUser();
|
||||
$this->drupalLogin($user);
|
||||
$this->drupalGet('node');
|
||||
$this->assertRaw(t('Your password has expired. You must change your password to proceed on the site.'), t('New user forced to change password.'));
|
||||
}
|
||||
|
||||
//test admin forcing their own account to reset
|
||||
public function testSelfChange() {
|
||||
$admin = $this->drupalCreateUser(array('administer users', 'force password change'));
|
||||
$this->drupalLogin($admin);
|
||||
$this->assertNoRaw(t('Your password has expired. You must change your password to proceed on the site.'), t('Admin should not be prompted to change password yet.'));
|
||||
$edit = array(
|
||||
'force_password_change' => TRUE,
|
||||
);
|
||||
$this->drupalPost("user/$admin->uid/edit", $edit, t('Save'));
|
||||
$this->assertRaw(t('The changes have been saved.'), t('Admin has queued account for password change.'));
|
||||
$this->assertNoRaw(t('Your password has expired. You must change your password to proceed on the site.'), t('Admin not initially prompted to change password.'));
|
||||
$this->drupalGet('node');
|
||||
$this->assertRaw(t('Your password has expired. You must change your password to proceed on the site.'), t('Admin forced to change password once they try to leave account page.'));
|
||||
$edit = array(
|
||||
'mail' => $admin->mail,
|
||||
'pass[pass1]' => 'fpcR@nd0m!',
|
||||
'pass[pass2]' => 'fpcR@nd0m!',
|
||||
);
|
||||
$this->drupalPost("user/$admin->uid/edit", $edit, t('Save'));
|
||||
$this->assertRaw(t('The changes have been saved.'), t('Admin changed password.'));
|
||||
$this->drupalGet('node');
|
||||
$this->assertNoRaw(t('An administrator has required that you change your password. You must change your password to proceed on the site.'), t('Not prompted to change password a 2nd time.'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test unforcing a password change.
|
||||
*/
|
||||
public function testUnforceChange() {
|
||||
$admin = $this->drupalCreateUser(array('force password change', 'administer users'));
|
||||
$user = $this->drupalCreateUser();
|
||||
$this->drupalLogin($admin);
|
||||
// Force a password change.
|
||||
$edit = array(
|
||||
'force_password_change' => TRUE,
|
||||
);
|
||||
$this->drupalPost("user/$user->uid/edit", $edit, t('Save'));
|
||||
$this->assertRaw(t('!user will be required to change their password the next time they log in.', array('!user' => $user->name)), t('User flagged for password change.'));
|
||||
// Unforce the password change.
|
||||
$edit = array(
|
||||
'force_password_change' => FALSE,
|
||||
);
|
||||
$this->drupalPost("user/$user->uid/edit", $edit, t('Save'));
|
||||
$force_change = db_result(db_query('SELECT force_change FROM {password_policy_force_change} WHERE uid=%d', $user->uid));
|
||||
$this->assertTrue($force_change == 0, t('Force change flag set to %d for %s.', array('%d' => $force_change, '%s' => $user->name)));
|
||||
}
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* print module simpletest tests
|
||||
*
|
||||
* This file includes the defined tests for the print module.
|
||||
*
|
||||
* @ingroup print
|
||||
*/
|
||||
|
||||
class PrintBasicTest extends DrupalWebTestCase {
|
||||
protected $web_user;
|
||||
protected $getq;
|
||||
|
||||
/**
|
||||
* Implementation of getInfo().
|
||||
*/
|
||||
function getInfo() {
|
||||
return array(
|
||||
'name' => t('Printer, email and PDF versions tests'),
|
||||
'description' => t('Unit tests for the print, print_mail and print_pdf modules.'),
|
||||
'group' => t('Printer, email and PDF versions'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of setUp().
|
||||
*/
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
// User to set up print.
|
||||
// $this->web_user = $this->drupalCreateUserRolePerm(array('administer print'));
|
||||
|
||||
// $this->drupalGet('logout');
|
||||
// $this->drupalLoginUser($this->web_user);
|
||||
|
||||
$this->getq = $_GET['q'];
|
||||
$_GET['q'] = 'print/'. $_GET['q'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of tearDown().
|
||||
*/
|
||||
function tearDown() {
|
||||
$_GET['q'] = $this->getq;
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
function testPrintRewriteUrls() {
|
||||
global $base_url, $base_root, $_print_urls;
|
||||
|
||||
// Must require it, since this function gets called via Drupal's dynamic loading
|
||||
require_once(drupal_get_path('module', 'print') .'/print.pages.inc');
|
||||
|
||||
variable_set('print_urls_anchors', 1);
|
||||
|
||||
$_print_urls = TRUE;
|
||||
|
||||
$pattern = '!<(a\s[^>]*?)>(.*?)(</a>)!is';
|
||||
$footnote = ' <span class="print-footnote">[1]</span>';
|
||||
$part1 = '<a class=\'class1 class2\' target=_blank hreflang="en" id="some complicated \"href=lala.com\" text" href="';
|
||||
$part2 = '">Example</a>';
|
||||
|
||||
$url[0] = 'http://www.example.com';
|
||||
$url[1] = '#here';
|
||||
$url[2] = '/relative/to/host';
|
||||
$url[3] = 'relative/to/base';
|
||||
$url[4] = 'index.php?q=sample/path';
|
||||
$rel_url[0] = $url[0];
|
||||
$rel_url[1] = base_path() . $_GET['q'] . $url[1];
|
||||
$rel_url[2] = $base_root . $url[2];
|
||||
$rel_url[3] = $base_url .'/'. $url[3];
|
||||
$rel_url[4] = $base_url .'/'. $url[4];
|
||||
$abs_url[0] = $url[0];
|
||||
$abs_url[1] = $base_url .'/'. $this->getq . $url[1];
|
||||
$abs_url[2] = $base_root . $url[2];
|
||||
$abs_url[3] = $base_url .'/'. $url[3];
|
||||
$abs_url[4] = $base_url .'/'. $url[4];
|
||||
|
||||
$url[5] = '#here with spaces';
|
||||
$url[6] = '/relative/to/host with spaces';
|
||||
$url[7] = 'relative/to/base with spaces';
|
||||
$url[8] = 'index.php?q=sample/path with spaces';
|
||||
$rel_url[5] = base_path() . $_GET['q'] . $url[5];
|
||||
$rel_url[6] = $base_root . $url[6];
|
||||
$rel_url[7] = $base_url .'/'. $url[7];
|
||||
$rel_url[8] = $base_url .'/'. $url[8];
|
||||
$abs_url[5] = $base_url .'/'. $this->getq . $url[5];
|
||||
$abs_url[6] = $base_root . $url[6];
|
||||
$abs_url[7] = $base_url .'/'. $url[7];
|
||||
$abs_url[8] = $base_url .'/'. $url[8];
|
||||
|
||||
$url[9] = 'mailto:support@example.com';
|
||||
$rel_url[9] = $url[9];
|
||||
$abs_url[9] = $url[9];
|
||||
|
||||
$url[10] = '';
|
||||
$rel_url[10] = '';
|
||||
$abs_url[10] = $base_url .'/'. $this->getq;
|
||||
|
||||
$size = count($url);
|
||||
for ($i = 0; $i < $size; $i++) {
|
||||
preg_match($pattern, $part1 . $url[$i] . $part2, $matches);
|
||||
$ret = _print_rewrite_urls($matches);
|
||||
$urls = _print_friendly_urls();
|
||||
$this->assertEqual($ret, $part1 . $rel_url[$i] . $part2 . $footnote, t('Original URL (!url)', array('!url' => $rel_url[$i])));
|
||||
$this->assertEqual($urls[0], $abs_url[$i], t('Absolute URL (!url)', array('!url' => $abs_url[$i])));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
# $Id: fr.po,v 1.1 2009/05/13 17:37:59 davidlesieur Exp $
|
||||
#
|
||||
# LANGUAGE translation of Drupal (general)
|
||||
# Copyright YEAR NAME <EMAIL@ADDRESS>
|
||||
# Generated from files:
|
||||
# role_delegation.module,v 1.9 2009/03/03 01:42:29 davidlesieur
|
||||
# role_delegation.info,v 1.2 2008/06/12 04:00:35 davidlesieur
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: role_delegation\n"
|
||||
"POT-Creation-Date: 2009-05-13 18:35+0200\n"
|
||||
"PO-Revision-Date: 2009-05-13 18:50+0100\n"
|
||||
"Last-Translator: TheRec <anonymous@anonymous.net>\n"
|
||||
"Language-Team: NONE <EMAIL@ADDRESS>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1) \n"
|
||||
"X-Poedit-Language: French\n"
|
||||
|
||||
#: role_delegation.module:21
|
||||
msgid "This module allows site administrators to grant some roles the authority to assign selected roles to users, without them needing the <em>administer permissions</em> permission."
|
||||
msgstr "Ce module permet aux administrateurs du site d'attribuer aux rôles l'autorité d'assigner des rôles définis aux utilisateurs, sans qu'ils ne nécessitent la droit d'accès <em>administrer les droits d'accès</em>."
|
||||
|
||||
#: role_delegation.module:21
|
||||
msgid "It provides its own tab in the user profile so that roles can be assigned without needing access to the user edit form."
|
||||
msgstr "Il met à disposition son propre onglet dans le profil utilisateur afin que ces rôles puissent être assignés sans requérir d'accéder au formulaire d'édition de l'utilisateur."
|
||||
|
||||
#: role_delegation.module:45;61
|
||||
msgid "Roles"
|
||||
msgstr "Rôles"
|
||||
|
||||
#: role_delegation.module:62
|
||||
msgid "The user receives the combined permissions of the authenticated user role, and all roles selected here."
|
||||
msgstr "L'utilisateur reçoit les permissions combinées du rôle d'utilisateur identifié et celles de tous les rôles sélectionnés ici."
|
||||
|
||||
#: role_delegation.module:89
|
||||
msgid "Submit"
|
||||
msgstr "Soumettre"
|
||||
|
||||
#: role_delegation.module:112
|
||||
msgid "The roles have been updated."
|
||||
msgstr "Les rôles ont été mis à jour."
|
||||
|
||||
#: role_delegation.module:30
|
||||
msgid "assign all roles"
|
||||
msgstr "assigner tous les rôles"
|
||||
|
||||
#: role_delegation.info:0
|
||||
msgid "Role Delegation"
|
||||
msgstr "Role Delegation"
|
||||
|
||||
#: role_delegation.info:0
|
||||
msgid "Allows site administrators to grant some roles the authority to assign selected roles to users."
|
||||
msgstr "Permet aux administrateurs du site d'attribuer aux rôles l'autorité d'assigner des rôles définis aux utilisateurs."
|
||||
|
|
@ -1,775 +0,0 @@
|
|||
# $Id: watcher.pot,v 1.1.2.4 2009/02/07 19:30:12 solipsist Exp $
|
||||
#
|
||||
# LANGUAGE translation of Drupal (general)
|
||||
# Copyright YEAR NAME <EMAIL@ADDRESS>
|
||||
# Generated from files:
|
||||
# watcher.module,v 1.2.2.6.2.14 2009/01/30 11:07:32 solipsist
|
||||
# watcher.info,v 1.2.4.1 2009/01/09 19:19:22 solipsist
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"POT-Creation-Date: 2009-02-07 19:05+0100\n"
|
||||
"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
|
||||
"Last-Translator: NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
#: watcher.module:126
|
||||
msgid "Stop watching"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:132
|
||||
msgid "Stop watching this post."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:630
|
||||
msgid "Watchable Content Types"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:631
|
||||
msgid "Select the content types that may be watched."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:639
|
||||
msgid "You haven't selected any watchable content types. This module will not work until you do so."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:653
|
||||
msgid "Watch Toggle Link"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:660
|
||||
msgid "Display \"watch this post\" toggle link in teasers."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:661
|
||||
msgid "Determines whether or not to show the \"watch this post\" toggle link in node teasers (used on front page and content listings). Teasers are the shortened down version of a node, often shown on a site's frontpage or on pages that summarize content. If disabled, link will only be shown when nodes are shown as pages (full view)."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:669
|
||||
msgid "Display Settings for Personal Binder"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:675
|
||||
msgid "Click here to view your personal binder"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:680
|
||||
msgid "Text at the top of the Personal Binder page"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:681
|
||||
msgid "You are recommended to use this space to display <strong>brief</strong> information about what this page does and how it works to the user."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:688
|
||||
msgid "Settings for the table of posts"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:693
|
||||
msgid "Display Node Type Column"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:699
|
||||
msgid "Display Last Updated Column"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:705
|
||||
msgid "Display Post Author Column"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:713
|
||||
msgid "Settings for Email Notifications"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:724
|
||||
msgid "Enable Email Notifications"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:734
|
||||
msgid "Messages are sent"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:735
|
||||
msgid "You can select when messages are sent. Using \"on cron\", messages are sent when cron is being run, usually every hour depending on how you have configured crontab, this is preferred for large sites with hundreds of users or more. Using the second method, messages are sent right away for the time limit set (see below). Any messages that remain unsent will be sent next time messages are sent. The second method won't affect loading times since messages are sent after the page has been delivered to the user's browser."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:738
|
||||
msgid "on cron (recommended for large sites)"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:739
|
||||
msgid "instantaneously and for limited number of seconds (recommended for small to medium sites)"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:751
|
||||
msgid "unlimited"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:756
|
||||
msgid "Time limit for sending messages in seconds"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:757
|
||||
msgid "This setting lets you specify for how many seconds messages should be sent and it applies to both methods. Any messages that remain unsent after this interval will be sent next time messages are sent. This setting will not make your site seem slower to visitors. The maximum value is the max execution time in your PHP configuration."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:765
|
||||
msgid "Limit length of comment excerpt in notification email to"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:766
|
||||
msgid "It may be wise not to send the entire comment as doing so will tease the user to go to your site to view it which results in traffic. Here you can select how much of the comment you want to include in the email. Percentages refer to the length of the comment. \"Nothing\" means no excerpt will be included in the message."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:769
|
||||
msgid "nothing"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:770
|
||||
msgid "25% of comment"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:771
|
||||
msgid "50% of comment"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:772
|
||||
msgid "75% of comment"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:773
|
||||
msgid "100 characters of comment"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:774
|
||||
msgid "200 characters of comment"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:775
|
||||
msgid "300 characters of comment"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:776
|
||||
msgid "400 characters of comment"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:777
|
||||
msgid "entire comment"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:783
|
||||
msgid "Notification Message Templates"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:784
|
||||
msgid "These message templates are used for notifications and confirmation messages. You may edit them if you like. Tokens are in [brackets] and act as placeholders for variables, such as URLs, usernames and email addresses, and will be replaced when the email is sent. <strong>You cannot use HTML code in your message templates.</strong>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:793
|
||||
msgid "Message Header"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:795
|
||||
msgid "<p>The text above will be prepended to every message sent. The following tokens are available:</p><ul><li>[recipient-username]</li><li>[recipient-user-settings-url]</li><li>[stop-watching-url]</li></ul>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:800
|
||||
msgid "Additional Tokens for Header"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:813
|
||||
msgid "Message Footer"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:815
|
||||
msgid "<p>The text above will be appended to every message sent. The following tokens are available:</p><ul><li>[recipient-username]</li><li>[recipient-user-settings-url]</li><li>[stop-watching-url]</li></ul>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:820
|
||||
msgid "Message Footer for Anonymous Users"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:822
|
||||
msgid "<p>The text above will be appended to notification messages messages sent to anonymous users. The following tokens are available:</p><ul><li>[stop-watching-url]</li><li>[stop-watching-url]</li><li>[stop-watching-all-url]</li></ul>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:827
|
||||
msgid "Message Footer in Confirmation Messages"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:829
|
||||
msgid "<p>The text above will be appended to confirmation messages sent to anonymous users when they start watching a node. Links for stopping watching this or every node the user watches and user's IP address are automatically prepended to this text.</p><ul><li>[user-ip]</li><li>[stop-watching-url]</li><li>[stop-watching-all-url]</li></ul>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:834
|
||||
msgid "Additional Tokens for Footers"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:847
|
||||
msgid "Message Body for Node Updates"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:849
|
||||
msgid "<p>The following tokens are available:</p><ul><li>[node-url]</li></ul>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:854
|
||||
msgid "Additional Tokens for Nodes"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:867
|
||||
msgid "Message Body for New Comments"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:869
|
||||
msgid "<p>The following tokens are available:</p><ul><li>[comment-excerpt]</li><li>[node-url]</li><li>[comment-url]</li><li>[comment-reply-url]</li></ul>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:874
|
||||
msgid "Additional Tokens for Comments"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:887
|
||||
msgid "Message Body for Confirmation Messages"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:889
|
||||
msgid "<p>The text above will be included in confirmation messages sent to anonymous users when they start watching a node.:</p><p>The following tokens are available:</p><ul><li>[node-url]</li></ul>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:899
|
||||
msgid "Default User Settings"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:900
|
||||
msgid "These will set the defaults in every user's personal settings. Settings you make here will affect the settings of every user that hasn't customized his or her settings. This setting will currently affect <strong>!numusers</strong> users who have not customized their settings."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:909;1394
|
||||
msgid "Automatically enable email notifications for posts that I start watching"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:910;1404
|
||||
msgid "Send email notification when a post is updated or edited"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:911;1410
|
||||
msgid "Send email notification when a post receives a new comment"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:912;1425
|
||||
msgid "Automatically watch posts that I comment on"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:913;1431
|
||||
msgid "Automatically watch posts that I make"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:914;1445
|
||||
msgid "Share my list of watched posts"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:922
|
||||
msgid "Help Page"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:923
|
||||
msgid "This help text is displayed if the user clicks the Help link in the list of watched posts. You can customize it below. To apply your own CSS rules to this page you can use the <code>#watcher_help_page</code> selector."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:930
|
||||
msgid "Text on Help Page"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:936
|
||||
msgid "Preview help page"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:958
|
||||
msgid "Notification Queue Table"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:963
|
||||
msgid "Number of notifications in queue"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:964
|
||||
msgid "Notification counter (some kind of indication of how many notifications that have been sent)"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:974
|
||||
msgid "Table Content"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:975
|
||||
msgid "This is the content of the notification queue table."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:985
|
||||
msgid "There are no notifications in the queue."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:994
|
||||
msgid "Watched Nodes Table"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:998
|
||||
msgid "Number of registered users that watch nodes"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:999
|
||||
msgid "Number of anonymous users that watch nodes"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1013
|
||||
msgid "User Settings Table"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1017
|
||||
msgid "Number of users that have changed their user settings"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1018
|
||||
msgid "Number of users that use default user settings"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1041
|
||||
msgid "Email notifications are NOT enabled. You can use the diagnostics tools anyway but regular notifications will not be sent."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1046
|
||||
msgid "If you're experiencing problems with the module such as messages not being delivered et c, you can use the diagnostic tools on this page to send test notifications. The <a href=\"!statpage\">statistics page</a> also contains valuable information for troubleshooting."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1051
|
||||
msgid "Create a Test Notification"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1052
|
||||
msgid "Click the buttons below to add a notification to the queue. A notification for a new comment will use content from the newest comment on the site. A notification for a node update will contain a link to the newest node on the site. Notifications will be sent to your email account (!usermail)."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1057
|
||||
msgid "Create test notification for node update"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1063
|
||||
msgid "Create test notification for new comment"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1069
|
||||
msgid "Send Notifications in Queue"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1070
|
||||
msgid "Notifications are stored in a queue. Depending on what method you have chosen in the <a href=\"!settings\">settings</a>, notifications are either delivered instantaneously (when a comment is posted or a node updated) or when cron is run."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1076
|
||||
msgid "Your currently selected method for sending notifications in queue is <strong>!method</strong>."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1082
|
||||
msgid "There are currently <strong>!num</strong> !notification_plural in the queue."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1088
|
||||
msgid "Click here to run cron manually and SEND messages in queue"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1094
|
||||
msgid "Click here to SEND messages in queue"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1105
|
||||
msgid "Click here to EMPTY queue"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1125
|
||||
msgid "TEST: Post has been updated"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1127
|
||||
msgid "A test notification (node update) has been created."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1131
|
||||
msgid "No nodes exist. You need to create at least one."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1147
|
||||
msgid "TEST: New comment posted"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1149
|
||||
msgid "A test notification (new comment) has been created."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1153
|
||||
msgid "No comments exist. You need to make at least one."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1162
|
||||
msgid "Notifications have been sent using instant method."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1170
|
||||
msgid "Watcher Notification Queue has been emptied."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1200
|
||||
msgid "!username's Watched Posts"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1205
|
||||
msgid "Click to Disable"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1206
|
||||
msgid "Click to Enable"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1207
|
||||
msgid "Email notifications for this post are ENABLED, click to disable"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1208
|
||||
msgid "Email notifications for this post are DISABLED, click to enable"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1224
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1229
|
||||
msgid "Post"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1236
|
||||
msgid "Author"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1243
|
||||
msgid "Post Added"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1251
|
||||
msgid "Last updated"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1257
|
||||
msgid "Comments"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1261
|
||||
msgid "Notifications"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1266
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1301;1305
|
||||
msgid "!time ago"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1331
|
||||
msgid "No posts in the list - you should add some!"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1331
|
||||
msgid "!username's watched posts list is empty"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1366
|
||||
msgid "Settings for Watching Posts"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1375
|
||||
msgid "Your settings are currently defaults, as set by the site owner. Save these settings to customize them."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1387
|
||||
msgid "Email Notification Settings"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1418
|
||||
msgid "Watch Automatically"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1437
|
||||
msgid "Sharing"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1438
|
||||
msgid "By sharing your list of watched posts, other users can see it but they cannot remove or add posts or change it in any way."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1456
|
||||
msgid "Save my settings"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1471
|
||||
msgid "Help on Watching Posts"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1539
|
||||
msgid "%ntitle previously watched by %email is no longer being watched."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1556
|
||||
msgid "Are you sure you want to STOP watching all posts %email currently watches on this site? This action cannot be undone."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1575
|
||||
msgid "All posts on this site previously watched by %email are no longer being watched."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1604
|
||||
msgid "You are no longer watching <em>!ntitle</em>. <strong><a href=\"!undo\">Undo</a></strong>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1608;1617
|
||||
msgid "We're sorry but you may not watch this type of post."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1613
|
||||
msgid "You are now watching <em>!ntitle</em>. <strong><a href=\"!undo\">Undo</a></strong>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1729
|
||||
msgid "Post!nodetitlehas been updated!sitename"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1802
|
||||
msgid " about \"!nodetitle\""
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1804
|
||||
msgid "New comment posted!aboutnodetitle!sitename"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1875
|
||||
msgid "for updates and new comments"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1876
|
||||
msgid "for new comments"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1877
|
||||
msgid "for updates"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1880
|
||||
msgid " \"!nodetitle\""
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1882
|
||||
msgid "You are now watching!aboutnodetitle!forwhat!sitename"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2064
|
||||
msgid "You are watching this post, click to stop watching"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2065
|
||||
msgid "This post is being watched. You can track and change email notification setting for this post in your watched posts list (see your user profile)"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2066
|
||||
msgid "You are not watching this post, click to start watching"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2067
|
||||
msgid "Watch posts to be notified when other users comment on them or the posts are changed"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2070
|
||||
msgid "Go to your list of watched posts"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2114
|
||||
msgid "Settings saved."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2843
|
||||
msgid "The confirmation message contains your IP address so that in case of abuse the owner of the email account can identify who submitted the form."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2851
|
||||
msgid "Stop watching %title"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2853
|
||||
msgid "Enter your email address below to stop watching %title. The form will remember the email you enter until next time."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2858
|
||||
msgid "Watch %title"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2860
|
||||
msgid "Enter your email address below to start watching %title. The form will remember the email you enter until next time. Once you submit the form, a confirmation message will be sent to the email address entered. %ipinfo"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2870
|
||||
msgid "Your email address"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2882
|
||||
msgid "What to watch for"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2884
|
||||
msgid "Updates and new comments"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2885
|
||||
msgid "Only new comments"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2886
|
||||
msgid "Only updates"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2889
|
||||
msgid "Choose to be informed about new comments, updates (this post being changed) or both."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2897
|
||||
msgid "Watch"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2897
|
||||
msgid "Unwatch"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:3025
|
||||
msgid "You are no longer watching %ntitle. <strong><a href=\"!undo\">Undo</a></strong>"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:3036
|
||||
msgid "That email address is not associated with any user watching %ntitle"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:3044
|
||||
msgid "updates and new comments"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:3045
|
||||
msgid "new comments"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:3046
|
||||
msgid "updates"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:3048
|
||||
msgid "You are now watching %ntitle for !what. A message will be sent to the email address you entered (%email) to confirm this action."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:3081
|
||||
msgid "You must enter a valid e-mail address."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:587;2715;2718;368 watcher.info:0
|
||||
msgid "Watcher"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:587
|
||||
msgid "Notifications were sent on cron."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2715
|
||||
msgid "Watcher has successfully sent !notifications using the !method method."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:2718
|
||||
msgid "Watcher failed to send notifications using the !method method."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:1082
|
||||
msgid "notification"
|
||||
msgid_plural "notifications"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: watcher.module:2430
|
||||
msgid "1 new"
|
||||
msgid_plural "@count new"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: watcher.module:2715
|
||||
msgid "1 notification"
|
||||
msgid_plural "@count notifications"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: watcher.module:253
|
||||
msgid "administer watcher"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:253
|
||||
msgid "use watcher"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:253
|
||||
msgid "access others' lists of watched posts"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:287;402
|
||||
msgid "My Watched Posts"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:296
|
||||
msgid "Watched Posts"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:306;377
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:316
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:327
|
||||
msgid "Watcher Toggle Watching Post"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:336
|
||||
msgid "Watcher Toggle Email Notifications"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:369
|
||||
msgid "Modify the settings for Watcher module."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:385
|
||||
msgid "Statistics"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:393
|
||||
msgid "Testing"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.module:0
|
||||
msgid "watcher"
|
||||
msgstr ""
|
||||
|
||||
#: watcher.info:0
|
||||
msgid "Watcher enables your site's users to watch nodes for changes and new comments and be notified about them."
|
||||
msgstr ""
|
||||
|
||||
#: watcher.info:0
|
||||
msgid "Other"
|
||||
msgstr ""
|
||||
|
Reference in a new issue