update core to 7.36
This commit is contained in:
@@ -640,13 +640,13 @@ function system_theme_settings_validate($form, &$form_state) {
|
||||
|
||||
// If the user provided a path for a logo or favicon file, make sure a file
|
||||
// exists at that path.
|
||||
if ($form_state['values']['logo_path']) {
|
||||
if (!empty($form_state['values']['logo_path'])) {
|
||||
$path = _system_theme_settings_validate_path($form_state['values']['logo_path']);
|
||||
if (!$path) {
|
||||
form_set_error('logo_path', t('The custom logo path is invalid.'));
|
||||
}
|
||||
}
|
||||
if ($form_state['values']['favicon_path']) {
|
||||
if (!empty($form_state['values']['favicon_path'])) {
|
||||
$path = _system_theme_settings_validate_path($form_state['values']['favicon_path']);
|
||||
if (!$path) {
|
||||
form_set_error('favicon_path', t('The custom favicon path is invalid.'));
|
||||
@@ -703,14 +703,16 @@ function system_theme_settings_submit($form, &$form_state) {
|
||||
|
||||
// If the user uploaded a new logo or favicon, save it to a permanent location
|
||||
// and use it in place of the default theme-provided file.
|
||||
if ($file = $values['logo_upload']) {
|
||||
if (!empty($values['logo_upload'])) {
|
||||
$file = $values['logo_upload'];
|
||||
unset($values['logo_upload']);
|
||||
$filename = file_unmanaged_copy($file->uri);
|
||||
$values['default_logo'] = 0;
|
||||
$values['logo_path'] = $filename;
|
||||
$values['toggle_logo'] = 1;
|
||||
}
|
||||
if ($file = $values['favicon_upload']) {
|
||||
if (!empty($values['favicon_upload'])) {
|
||||
$file = $values['favicon_upload'];
|
||||
unset($values['favicon_upload']);
|
||||
$filename = file_unmanaged_copy($file->uri);
|
||||
$values['default_favicon'] = 0;
|
||||
@@ -950,7 +952,11 @@ function system_sort_modules_by_info_name($a, $b) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Array sorting callback; sorts modules or themes by their name.
|
||||
* Sorts themes by their names, with the default theme listed first.
|
||||
*
|
||||
* Callback for uasort() within system_themes_page().
|
||||
*
|
||||
* @see system_sort_modules_by_info_name().
|
||||
*/
|
||||
function system_sort_themes($a, $b) {
|
||||
if ($a->is_default) {
|
||||
@@ -2640,8 +2646,8 @@ function theme_system_modules_fieldset($variables) {
|
||||
}
|
||||
$row[] = array('data' => $description, 'class' => array('description'));
|
||||
// Display links (such as help or permissions) in their own columns.
|
||||
foreach (array('help', 'permissions', 'configure') as $key) {
|
||||
$row[] = array('data' => drupal_render($module['links'][$key]), 'class' => array($key));
|
||||
foreach (array('help', 'permissions', 'configure') as $link_type) {
|
||||
$row[] = array('data' => drupal_render($module['links'][$link_type]), 'class' => array($link_type));
|
||||
}
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user