Make WordPress Core

Ticket #3799: wp-ajax-emptyexists.patch

File wp-ajax-emptyexists.patch, 884 bytes (added by Mikiupdown2, 18 years ago)
  • wp-ajax.js

     
    5858                if ( -1 == r ) {
    5959                        Element.update(this.myResponseElement,"<div class='error'><p>" + this.permText + "</p></div>");
    6060                        return false;
    61                 } else if ( 0 == r ) {
    62                         Element.update(this.myResponseElement,"<div class='error'><p>" + this.strangeText + "</p></div>");
    63                         return false;
    64                 }
     61                } else if ( 4 == r ) {
     62                Element.update(this.myResponseElement,"<div class='error'><p><?php _e("The category name feild is empty."); ?></p></div>"); return false;
     63
     64    } else if ( 5 == r ) {
     65
     66        Element.update(this.myResponseElement,"<div class='error'><p><?php _e("A category using the same name already exists."); ?></p></div>"); return false;
     67
     68    }
     69
    6570                return true;
    6671        },
    6772        addOnComplete: function(f) {