Removed obsolete $ in source files
This commit is contained in:
parent
a39c010e06
commit
e5f2b64d98
146 changed files with 836 additions and 1081 deletions
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
// $Id: custom_breadcrumbs.admin.inc,v 1.1.2.3.2.33 2011/01/08 03:32:24 mgn Exp $
|
||||
/**
|
||||
* @file
|
||||
* Admin page callback file for the custom_breadcrumbs module.
|
||||
|
@ -12,7 +11,7 @@ function custom_breadcrumbs_page() {
|
|||
$custom_breadcrumbs_sort = variable_get('custom_breadcrumbs_sort', array(
|
||||
'direction' => array('name' => 'asc', 'breadcrumb_type' => 'asc', 'language' => 'asc'),
|
||||
'column' => 'name'));
|
||||
$sort = $custom_breadcrumbs_sort['direction'];
|
||||
$sort = $custom_breadcrumbs_sort['direction'];
|
||||
$multilingual = _custom_breadcrumbs_multilingual();
|
||||
$breadcrumbs = array();
|
||||
// Read session variable to load breadcrumbs of type and language selected by user.
|
||||
|
@ -35,7 +34,7 @@ function custom_breadcrumbs_page() {
|
|||
}
|
||||
}
|
||||
if (empty($modules)) {
|
||||
$modules = module_implements('cb_breadcrumb_info');
|
||||
$modules = module_implements('cb_breadcrumb_info');
|
||||
}
|
||||
foreach ($modules as $key => $module) {
|
||||
$more = custom_breadcrumbs_load_breadcrumbs($module, $tables[$key], NULL, $languages);
|
||||
|
@ -61,7 +60,7 @@ function custom_breadcrumbs_page() {
|
|||
// Add an arrow indicating sort direction.
|
||||
$image = array($order => theme('tablesort_indicator', $sort[$order]));
|
||||
|
||||
$headers = array();
|
||||
$headers = array();
|
||||
foreach ($columns as $key => $title) {
|
||||
$options = array('attributes' => array('title' => t('sort by @s', array('@s' => $title))));
|
||||
$options['query'] = 'order=' . $key . '&sort=' . $sort[$key];
|
||||
|
@ -90,7 +89,7 @@ function custom_breadcrumbs_page() {
|
|||
$rows[] = array(array('data' => t('No custom breadcrumbs have been defined.'), 'colspan' => 2 + (int)$multilingual));
|
||||
}
|
||||
|
||||
$output = drupal_get_form('custom_breadcrumbs_filter_form');
|
||||
$output = drupal_get_form('custom_breadcrumbs_filter_form');
|
||||
$output .= theme('table', $headers, $rows);
|
||||
return $output;
|
||||
}
|
||||
|
@ -105,17 +104,17 @@ function custom_breadcrumbs_page() {
|
|||
* @param $bc2
|
||||
* Second breadcrumb object.
|
||||
*
|
||||
* @return
|
||||
* @return
|
||||
* 0 if the two objects have equal ranking,
|
||||
* 1 if the first object is greater than the second,
|
||||
* -1 if the second object is greater than the first,
|
||||
* -1 if the second object is greater than the first,
|
||||
*/
|
||||
function _custom_breadcrumbs_sort_cmp($bc1, $bc2) {
|
||||
$custom_breadcrumbs_sort = variable_get('custom_breadcrumbs_sort', array(
|
||||
'direction' => array('name' => 'asc', 'breadcrumb_type' => 'asc', 'language' => 'asc'),
|
||||
'column' => 'name')
|
||||
);
|
||||
$options = array('name', 'breadcrumb_type', 'language');
|
||||
$options = array('name', 'breadcrumb_type', 'language');
|
||||
$first = $custom_breadcrumbs_sort['column'];
|
||||
$keys = array_keys($options, $first);
|
||||
$key = array_pop($keys);
|
||||
|
@ -130,7 +129,7 @@ function _custom_breadcrumbs_sort_cmp($bc1, $bc2) {
|
|||
if ($bc1->$options[0] == $bc2->$options[0]) {
|
||||
if ($bc1->$options[1] == $bc2->$options[1]) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return ($bc1->$options[1] > $bc2->$options[1]) ? $sortdir[$options[1]] : -1*$sortdir[$options[1]];
|
||||
}
|
||||
return ($bc1->$options[0] > $bc2->$options[0]) ? $sortdir[$options[0]] : -1*$sortdir[$options[0]];
|
||||
|
@ -204,7 +203,7 @@ function custom_breadcrumbs_form_validate($form, &$form_state) {
|
|||
}
|
||||
else {
|
||||
// If PHP is used, don't validate number of paths and titles.
|
||||
if ((strpos($form_state['values']['titles'], '<?php') !== FALSE) ||
|
||||
if ((strpos($form_state['values']['titles'], '<?php') !== FALSE) ||
|
||||
(strpos($form_state['values']['paths'], '<?php') !== FALSE)) {
|
||||
$check = FALSE;
|
||||
}
|
||||
|
@ -297,7 +296,7 @@ function custom_breadcrumbs_common_form_elements($bid, $breadcrumb) {
|
|||
$description = t('A list of titles for the breadcrumb links, one on each line. For each crumb title you can also specify a title attribute to add to the link. Separate the crumb title and the title attribute with a pipe (|) symbol.');
|
||||
if (variable_get('custom_breadcrumbs_use_php_in_titles', FALSE) && user_access('use php in custom breadcrumbs')) {
|
||||
$description .= ' '. t("Or, you can enter a small PHP code snippet (less than 250 characters) returning either an array of text strings for the breadcrumb titles, with one title per array element, or an associative array with elements 'titles' and 'paths' each containing an array of text strings for the breadcrumb titles and paths, respectively. Include the snippet between %php. Use with caution since incorrect PHP code can break your Drupal site. Token replacement will occur after any PHP is evaluated.", array('%php' => '<?php ?>'));
|
||||
}
|
||||
}
|
||||
|
||||
$form['titles'] = array(
|
||||
'#type' => 'textarea',
|
||||
|
@ -538,7 +537,7 @@ function custom_breadcrumbs_admin_settings() {
|
|||
$form['adv_settings']['module_weights']['table'] = custom_breadcrumbs_module_weight();
|
||||
if (!empty($form['adv_settings']['module_weights']['table'])) {
|
||||
$form['adv_settings']['module_weights']['table']['#theme'] = 'custom_breadcrumbs_module_weight';
|
||||
}
|
||||
}
|
||||
else {
|
||||
unset($form['adv_settings']['module_weights']);
|
||||
}
|
||||
|
|
Reference in a new issue