Ignore:
Timestamp:
Dec 7, 2013, 6:43:09 PM (10 years ago)
Author:
mistic100
Message:

load tags,themes,users,languages list in AJAX + move javascript code to external file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdminTools/include/events.inc.php

    r25791 r25817  
    8181      );
    8282
    83     // gets tags
     83    // gets tags (full available list is loaded in ajax)
    8484    $query = '
    8585SELECT id, name
     
    8989;';
    9090    $tag_selection = get_taglist($query);
    91 
    92     $query = '
    93 SELECT id, name
    94   FROM '.TAGS_TABLE.'
    95 ;';
    96     $tags = get_taglist($query, false);
    9791
    9892    $tpl_vars['QUICK_EDIT'] = array(
     
    10599      'date_creation_time' => substr($picture['current']['date_creation'], 11, 5),
    106100      'tag_selection' =>      $tag_selection,
    107       'tags' =>               $tags,
    108101      );
    109102  }
     
    146139      $tpl_vars['QUICK_EDIT']['img'] = DerivativeImage::get_one(IMG_SQUARE, $image_infos)->get_url();
    147140    }
    148   }
    149 
    150 
    151   // get users
    152   $query = '
    153 SELECT
    154   '.$conf['user_fields']['id'].' AS id,
    155   '.$conf['user_fields']['username'].' AS username
    156 FROM '.USERS_TABLE.'
    157   ORDER BY CONVERT('.$conf['user_fields']['username'].', CHAR)
    158 ;';
    159   $tpl_vars['USERS'] = simple_hash_from_query($query, 'id', 'username');
    160 
    161   // get themes
    162   include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php');
    163   $themes = new themes();
    164   foreach (array_keys($themes->db_themes_by_id) as $theme)
    165   {
    166     if (!empty($theme))
    167     {
    168       $tpl_vars['THEMES'][$theme] = $theme;
    169     }
    170   }
    171 
    172   // get languages
    173   foreach (get_languages() as $code => $name)
    174   {
    175     $tpl_vars['LANGS'][$code] = $name;
    176141  }
    177142
Note: See TracChangeset for help on using the changeset viewer.