Changeset 508
- Timestamp:
- 09/30/08 15:20:48 (15 years ago)
- google:author:
- oum2013
- Location:
- plugins/dcscrobbler
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/dcscrobbler/_public.php
r507 r508 36 36 37 37 $core->blog->settings->setNameSpace('dcscrobbler'); 38 $uname = $core->blog->settings->get(' username');38 $uname = $core->blog->settings->get('dcs_username'); 39 39 40 40 if ($w->homeonly && $core->url->type != 'default') { -
plugins/dcscrobbler/class.dc.dcscrobbler.php
r504 r508 49 49 50 50 $core->blog->settings->setNameSpace('dcscrobbler'); 51 $username = $core->blog->settings->get(' username');51 $username = $core->blog->settings->get('dcs_username'); 52 52 53 53 $file = sprintf(self::$cache_file,DC_TPL_CACHE, $username, $data); -
plugins/dcscrobbler/index.php
r507 r508 31 31 32 32 // Premiere config 33 if (!$core->blog->settings->get(' cache_validity')) {34 $core->blog->settings->put(' username', '', 'string', __('Last.fm username'));35 $core->blog->settings->put(' cache_validity', 120, 'integer', __('Cache validity'));33 if (!$core->blog->settings->get('dcs_cache_validity')) { 34 $core->blog->settings->put('dcs_username', '', 'string', __('Last.fm username')); 35 $core->blog->settings->put('dcs_cache_validity', 120, 'integer', __('Cache validity')); 36 36 37 37 $core->blog->triggerBlog(); … … 59 59 if (!empty($_POST['dcss']) && is_array($_POST['dcss'])) { 60 60 61 $core->blog->settings->put(' username', html::escapeHTML($_POST['dcss']['username']));62 $core->blog->settings->put(' cache_validity', $_POST['dcss']['cache_validity']);61 $core->blog->settings->put('dcs_username', html::escapeHTML($_POST['dcss']['dcs_username'])); 62 $core->blog->settings->put('dcs_cache_validity', $_POST['dcss']['dcs_cache_validity']); 63 63 64 64 $core->blog->triggerBlog(); … … 69 69 70 70 /* Récupération de la configuration */ 71 $dcs[' username'] = $core->blog->settings->get('username');72 $dcs[' cache_validity'] = $core->blog->settings->get('cache_validity');71 $dcs['dcs_username'] = $core->blog->settings->get('dcs_username'); 72 $dcs['dcs_cache_validity'] = $core->blog->settings->get('dcs_cache_validity'); 73 73 74 74 … … 98 98 '<form action="'.$p_url.'" method="post">'. 99 99 '<fieldset><legend>Configuration</legend>'. 100 /* Champs 1 : username */100 /* Champs 1 : dcs_username */ 101 101 '<p ><label>'.__('Last.fm username').' '. 102 form::field('dcss[ username]', 20, 50, $dcs['username']).102 form::field('dcss[dcs_username]', 20, 50, $dcs['dcs_username']). 103 103 '</label></p>'. 104 104 105 105 /* champs 2 : expiration du cache */ 106 106 '<p><label>'.__('Cache validity (in seconds)').' '. 107 form::field('dcss[ cache_validity]', 3, 3, $dcs['cache_validity']).107 form::field('dcss[dcs_cache_validity]', 3, 3, $dcs['dcs_cache_validity']). 108 108 '</label></p>'. 109 109 '<p><strong>Note: </strong>'.__('cache validity shouldn\'t be less than 60 seconds.').'</p>'.
Note: See TracChangeset
for help on using the changeset viewer.