Skip to content

Commit

Permalink
feature 1502: bug corrected on guest setting page.
Browse files Browse the repository at this point in the history
Remove $conf['default_theme'] from config file (useless).
Check if theme is still installed in pwg_get_themes.

git-svn-id: http://piwigo.org/svn/trunk@5306 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
patdenice committed Mar 24, 2010
1 parent 6c31dd4 commit 2ad08fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion admin/themes/default/template/profile_content.tpl
Expand Up @@ -59,7 +59,7 @@
<span class="property">
<label for="template">{'Interface theme'|@translate}</label>
</span>
{html_options id=template name=template options=$template_options selected=$template_selection}
{html_options id=template name=theme options=$template_options selected=$template_selection}
</li>
<li>
<span class="property">
Expand Down
3 changes: 0 additions & 3 deletions include/config_default.inc.php
Expand Up @@ -335,9 +335,6 @@
// 'filename'
$conf['uniqueness_mode'] = 'md5sum';

// Define default theme for your gallery
$conf['default_theme'] = 'Sylvia';

// +-----------------------------------------------------------------------+
// | metadata |
// +-----------------------------------------------------------------------+
Expand Down
7 changes: 6 additions & 1 deletion include/functions.inc.php
Expand Up @@ -686,6 +686,8 @@ function url_is_remote($url)
*/
function get_pwg_themes()
{
global $conf;

$themes = array();

$query = '
Expand All @@ -698,7 +700,10 @@ function get_pwg_themes()
$result = pwg_query($query);
while ($row = pwg_db_fetch_assoc($result))
{
$themes[ $row['id'] ] = $row['name'];
if (file_exists($conf['themes_dir'].'/'.$row['name'].'/'.'themeconf.inc.php'))
{
$themes[ $row['id'] ] = $row['name'];
}
}

// plugins want remove some themes based on user status maybe?
Expand Down

0 comments on commit 2ad08fa

Please sign in to comment.