class Ucenter::Interface::App

Public Instance Methods

get_apps(col = '*', where = '') click to toggle source
# File lib/ucenter/interface/app.rb, line 4
def get_apps(col = '*', where = '')
  col = db_client.escape(col)
  where = db_client.escape(where)
  data = db_client.query("SELECT #{col} FROM #{Ucenter::Config.uc_dbtablepre}applications #{where!="" ? " WHERE #{where} " : ""}").to_a
  data.each_with_index do |item,index|
    if item['extra'] and item['extra'].strip!=""
      item['extra'] = Ucenter::Tools::PHP.unserialize(item['extra'])
      data[index] = item
    end
  end
  data
end