/[drupal]/contributions/modules/simplepie/simplepie.admin.inc
ViewVC logotype

Contents of /contributions/modules/simplepie/simplepie.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Mon Aug 31 22:03:32 2009 UTC (2 months, 3 weeks ago) by mustafau
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +29 -0 lines
File MIME type: text/x-php
Upgrade to Drupal 7.

This upgrade implements hook_aggregator_parse().
Since core parser has many problems, SimplePie Core will replace core parser in many sites until a SimpleXML based one replaces core parser.
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Admin page callback and other admin page related functions.
7 */
8
9 /**
10 * Form builder; Configure the SimplePie settings.
11 *
12 * @ingroup forms
13 * @see system_settings_form()
14 */
15 function simplepie_admin_settings() {
16 $cache_location = variable_get('file_default_scheme', 'public') . '://' . variable_get('simplepie_cache_location', 'cache/simplepie');
17 if (!file_prepare_directory($cache_location, FILE_CREATE_DIRECTORY)) {
18 form_set_error('simplepie_cache_location', t('The directory %directory does not exist or is not writable.', array('%directory' => $cache_location)));
19 watchdog('file system', 'The directory %directory does not exist or is not writable.', array('%directory' => $cache_location), WATCHDOG_ERROR);
20 }
21 $form['simplepie_cache_location'] = array(
22 '#type' => 'textfield',
23 '#title' => t('SimplePie Core cache location'),
24 '#default_value' => variable_get('simplepie_cache_location', 'cache/simplepie'),
25 '#description' => t('Subdirectory in the directory %dir where cache files will be stored.', array('%dir' => file_directory_path() . '/')),
26 );
27
28 return system_settings_form($form);
29 }

  ViewVC Help
Powered by ViewVC 1.1.2