예제 #1
0
             $Syn = $CGDb->where('tid', $t['synonym_of'])->getOne('tags', 'name');
             if (!empty($Syn)) {
                 $t['synonym_target'] = $Syn['name'];
             }
         }
     }
     CGUtils::autocompleteRespond(empty($Tags) ? '[]' : $Tags);
     break;
 case 'full':
     if (!isset($_REQUEST['reorder'])) {
         CoreUtils::notFound();
     }
     if (!Permission::sufficient('staff')) {
         Response::fail();
     }
     Appearances::reorder((new Input('list', 'int[]', array(Input::CUSTOM_ERROR_MESSAGES => array(Input::ERROR_MISSING => 'The list of IDs is missing', Input::ERROR_INVALID => 'The list of IDs is not formatted properly'))))->out());
     Response::done(array('html' => CGUtils::getFullListHTML(Appearances::get($EQG, null, 'id,label'), true, NOWRAP)));
     break;
 case "export":
     if (!Permission::sufficient('developer')) {
         CoreUtils::notFound();
     }
     $JSON = array('Appearances' => array(), 'Tags' => array());
     $Tags = $CGDb->orderBy('tid', 'ASC')->get('tags');
     if (!empty($Tags)) {
         foreach ($Tags as $t) {
             $JSON['Tags'][$t['tid']] = $t;
         }
     }
     $Appearances = Appearances::get(null);
     if (!empty($Appearances)) {