http://atutor.ca/atutor/mantis/view.php?id=4467
authorharris wong <hwong@ocad.ca>
Mon, 16 Aug 2010 18:55:18 +0000 (18:55 -0000)
committerharris wong <hwong@ocad.ca>
Mon, 16 Aug 2010 18:55:18 +0000 (18:55 -0000)
http://atutor.ca/atutor/mantis/view.php?id=4428
http://atutor.ca/atutor/mantis/view.php?id=4429

docs/mods/_core/themes/index.php

index 7350d83..63f9a06 100644 (file)
@@ -31,7 +31,7 @@ if (isset($_GET['export'], $_GET['theme_dir'])) {
 } else if (isset($_GET['default'], $_GET['theme_dir'])) {\r
        set_theme_as_default($theme, $_GET['type']);\r
        $_config['pref_defaults'] = unserialize($_config['pref_defaults']);\r
-       if (is_mobile_device()) {\r
+       if ($_GET['type']==MOBILE_DEVICE) {\r
                $_config['pref_defaults']['PREF_MOBILE_THEME'] = $theme;\r
        } else {\r
                $_config['pref_defaults']['PREF_THEME'] = $theme;\r
@@ -108,7 +108,7 @@ print_data_table($result, MOBILE_DEVICE);
 ?>\r
 \r
 <?php function print_data_table($result, $type) {\r
-       if (mysql_num_rows($result) == 0) return;\r
+       if (@mysql_num_rows($result) == 0) return;\r
 ?>\r
 <h3><?php if ($type == DESKTOP_DEVICE) echo _AT('themes_for_desktop'); else echo _AT('themes_for_mobile');?></h3><br />\r
 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" name="form_<?php echo $type; ?>">\r