equal
deleted
inserted
replaced
549 echo PageUtils::acl_json($parms); |
549 echo PageUtils::acl_json($parms); |
550 break; |
550 break; |
551 case 'theme_list': |
551 case 'theme_list': |
552 header('Content-type: application/json'); |
552 header('Content-type: application/json'); |
553 |
553 |
554 $q = $db->sql_query('SELECT theme_name, theme_id FROM ' . table_prefix . "themes WHERE enabled = 1 ORDER BY theme_name ASC;"); |
|
555 if ( !$q ) |
|
556 $db->die_json(); |
|
557 |
|
558 $return = array(); |
554 $return = array(); |
559 while ( $row = $db->fetchrow() ) |
555 foreach ( $template->theme_list as $theme ) |
560 $return[] = $row; |
556 { |
561 |
557 $return[] = array( |
562 foreach ( $return as &$theme ) |
558 'theme_name' => $theme['theme_name'], |
563 { |
559 'theme_id' => $theme['theme_id'], |
564 $theme['have_thumb'] = file_exists(ENANO_ROOT . "/themes/{$theme['theme_id']}/preview.png"); |
560 'have_thumb' => file_exists(ENANO_ROOT . "/themes/{$theme['theme_id']}/preview.png") |
|
561 ); |
565 } |
562 } |
566 |
563 |
567 echo enano_json_encode($return); |
564 echo enano_json_encode($return); |
568 |
565 |
569 break; |
566 break; |