Ejemplo n.º 1
0
 if ($adding) {
     $response = array('cgs' => Appearances::getColorsHTML($Appearance, NOWRAP, $colon, $outputNames));
 } else {
     $response = array('cg' => ColorGroups::getHTML($Group['groupid'], null, NOWRAP, $colon, $outputNames));
 }
 $AppearanceID = $adding ? $Appearance['id'] : $Group['ponyid'];
 if ($major) {
     Logs::action('color_modify', array('ponyid' => $AppearanceID, 'reason' => $reason));
     if ($AppearancePage) {
         $FullChangesSection = isset($_POST['FULL_CHANGES_SECTION']);
         $response['changes'] = CGUtils::getChangesHTML(Updates::get($AppearanceID), $FullChangesSection);
         if ($FullChangesSection) {
             $response['changes'] = str_replace('@', $response['changes'], CGUtils::CHANGES_SECTION);
         }
     } else {
         $response['update'] = Appearances::getUpdatesHTML($AppearanceID);
     }
 }
 CGUtils::clearRenderedImages($AppearanceID, array(CGUtils::CLEAR_PALETTE, CGUtils::CLEAR_PREVIEW));
 if (isset($_POST['APPEARANCE_PAGE'])) {
     $response['cm_img'] = "/cg/v/{$AppearanceID}.svg?t=" . time();
 } else {
     $response['notes'] = Appearances::getNotesHTML($CGDb->where('id', $AppearanceID)->getOne('appearances'), NOWRAP);
 }
 $logdata = array();
 if ($adding) {
     Logs::action('cgs', array('action' => 'add', 'groupid' => $Group['groupid'], 'ponyid' => $AppearanceID, 'label' => $data['label'], 'order' => $data['order'] ?? null));
 } else {
     if ($data['label'] !== $Group['label']) {
         $logdata['oldlabel'] = $Group['label'];
         $logdata['newlabel'] = $data['label'];