Skip to content

Commit

Permalink
Coding standard round 2
Browse files Browse the repository at this point in the history
  • Loading branch information
libetho committed Jun 20, 2017
1 parent 5f2f851 commit ca8084b
Show file tree
Hide file tree
Showing 20 changed files with 7 additions and 118 deletions.
3 changes: 1 addition & 2 deletions lib/features/reps_core/reps_admin/reps_admin.admin.inc
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,7 @@ function _reps_admin_menu_delete_submit($form, &$form_state) {
*/
function _reps_admin_menu_add_submit($form, &$form_state) {
$values = $form_state['values'];
_reps_core_menu_item('main-menu', $values['path'], $values['parent'], $values['title'], 'menu', $values['weight'], $values['lang'], $values['title'], $tsid = NULL, FALSE);
if ($item) {
if ($form) {
drupal_set_message(t("We've successfully created the menu item %title", array('%title' => $values['title'])));
$form_state['redirect'] = 'admin/reps/menu';
}
Expand Down
6 changes: 2 additions & 4 deletions lib/features/reps_core/reps_admin/reps_admin.module
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ function reps_admin_menu() {
'access arguments' => array('administer reps menu'),
);

$languages = locale_language_list('name');

$items['admin/reps/menu/translate'] = array(
'page callback' => 'drupal_get_form',
'page arguments' => array('_reps_admin_menu_translate'),
Expand Down Expand Up @@ -382,7 +380,7 @@ function reps_admin_views_pre_view(&$view) {
'label' => '',
);
$view_overrides = array();
$view_overrides['fields'] = $new_view_fieds;
$view_overrides['fields'] = $new_view_fieds;
foreach ($view_overrides as $option => $definition) {
$view->display_handler->override_option($option, $definition);
}
Expand Down Expand Up @@ -413,7 +411,7 @@ function reps_admin_theme_registry_alter(&$theme_registry) {
* Implements hook_theme_registry_alter().
*/
function reps_admin_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'reps_event_node_form') {
if ($form_id == 'reps_event_node_form') {
if (isset($form['field_reps_event_location'])) {
$form['field_reps_event_location']['#access'] = FALSE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function reps_events_field_default_field_instances() {
'bundle' => 'reps_event',
'default_value' => array(
0 => array(
'value' => 'Europäische Kommission - Vertretung in Deutschland',
'value' => 'Europ媳che Kommission - Vertretung in Deutschland',
),
),
'deleted' => 0,
Expand Down
23 changes: 1 addition & 22 deletions lib/modules/custom/mapeditor/mapeditor.forms.inc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function mapeditor_settings() {
$form['webtools_environment'] = array(
'#type' => 'textfield',
'#title' => t('Webtools environment'),
'#default_value' => variable_get('webtools_environment', MAPEDITOR_WEBTOOLS_ENVIRONMENT),
'#default_value' => variable_get('mapeditor_webtools_environment', MAPEDITOR_WEBTOOLS_ENVIRONMENT),
'#description' => t('Webtools environment from where to use the load.js library'),
'#size' => '60',
);
Expand Down Expand Up @@ -205,27 +205,6 @@ function _mapeditor_form_elements($group, $settings, $options = NULL) {
// @todo do
// '#element_validate' => array('mapeditor_validate_center'),
);

// Kickstarts finding a map center by providing the coordinates of some
// European towns.
// https://en.wikipedia.org/wiki/Geographical_midpoint_of_Europe
if (module_exists('ec_geocoder')) {
drupal_add_library('system', 'drupal.ajax');
$localities = array();
foreach (array(
'Brussels Belgium',
'Budapest Hungary',
'Tallinn Estonia',
'Berlin Germany',
' Slovakia',
'Warsaw Poland',
) as $locality) {
$localities[] = l($locality, 'admin/mapeditor/default_center', array(
'attributes' => array('class' => 'use-ajax'),
'query' => array('locality' => $locality),
));
}
}
break;

case 'attribution':
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/custom/mbp_sync/mbp_sync.module
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ function mbp_sync_menu_alter(&$items) {
*/
function mbp_sync_move_file_callback($file, $folder) {
if (empty($file->field_folder[LANGUAGE_NONE][0]['tid']) || $file->field_folder[LANGUAGE_NONE][0]['tid'] != $folder->tid) {
return mbp_sync_move_file(filter_xss($folder->tid), filter_xss($file));
return mbp_sync_move_file($folder->tid, $file);
}
return TRUE;
}
Expand Down
6 changes: 0 additions & 6 deletions lib/modules/custom/mbp_sync/src/FileUrlTokenHandler.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php

/**
* @file
* Contains \Drupal\mbp_sync\FileUrlTokenHandler.
*/

namespace Drupal\mbp_sync;

/**
Expand Down
6 changes: 0 additions & 6 deletions lib/modules/nexteuropa/nexteuropa_migrate/src/Document.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php

/**
* @file
* Document.php
*/

namespace Drupal\nexteuropa_migrate;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php

/**
* @file
* DocumentInterface.php
*/

namespace Drupal\nexteuropa_migrate;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<?php

/**
* @file
* DocumentWrapper.php
*/

namespace Drupal\nexteuropa_migrate\migrate;

use Drupal\nexteuropa_migrate\DocumentInterface;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php

/**
* @file
* DocumentWrapperInterface.php
*/

namespace Drupal\nexteuropa_migrate\migrate;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<?php

/**
* @file
* MigrateItemJSON.php
*/

namespace Drupal\nexteuropa_migrate\migrate;

use Drupal\nexteuropa_migrate\Document;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php

/**
* @file
* MigrationAbstract.php
*/

namespace Drupal\nexteuropa_migrate\migrate;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<?php

/**
* @file
* DocumentTest.php
*/

namespace Drupal\nexteuropa_migrate\Tests;

use Drupal\nexteuropa_migrate\Document;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<?php

/**
* @file
* DocumentWrapperTest.php
*/

namespace Drupal\nexteuropa_migrate\Tests;

use Drupal\nexteuropa_migrate\Document;
use Drupal\nexteuropa_migrate\migrate\DocumentWrapper;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php

/**
* @file
* MigrateAbstractTest.php
*/

namespace Drupal\nexteuropa_migrate\Tests;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<?php

/**
* @file
* NextEuropaMigrateTestArticlesMigrationTest.php
*/

namespace Drupal\nexteuropa_migrate\Tests;

use Drupal\nexteuropa_migrate\Document;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<?php

/**
* @file
* NextEuropaMigrateTestCategoriesMigrationTest.php
*/

namespace Drupal\nexteuropa_migrate\Tests;

use Drupal\nexteuropa_migrate\Document;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<?php

/**
* @file
* NextEuropaMigrateTestNewsMigrationTest.php
*/

namespace Drupal\nexteuropa_migrate\Tests;

use Drupal\nexteuropa_migrate\Document;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ files[] = includes/nexteuropa_migrate_test.categories.inc
files[] = includes/nexteuropa_migrate_test.news.inc
hidden = 1
multisite_version = 2.3
php = 5.2.4
php = 5.2.4
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
* @see template_preprocess_entity()
* @see template_process()
*/

?>

<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
<?php if(isset($content['field_reps_core_image'])): ?>
<div class="content"<?php print $content_attributes; ?>>
Expand Down

0 comments on commit ca8084b

Please sign in to comment.