equal
deleted
inserted
replaced
428 if ( !$db->check_query($query) ) |
428 if ( !$db->check_query($query) ) |
429 { |
429 { |
430 // aww crap, a query is bad |
430 // aww crap, a query is bad |
431 $return = array( |
431 $return = array( |
432 'mode' => 'error', |
432 'mode' => 'error', |
433 'error' => $lang->get('acppm_err_upgrade_bad_query'), |
433 'error' => $lang->get('acppl_err_upgrade_bad_query'), |
434 ); |
434 ); |
435 break 2; |
435 break 2; |
436 } |
436 } |
437 } |
437 } |
438 |
438 |
532 if ( !$db->check_query($query) ) |
532 if ( !$db->check_query($query) ) |
533 { |
533 { |
534 // aww crap, a query is bad |
534 // aww crap, a query is bad |
535 $return = array( |
535 $return = array( |
536 'mode' => 'error', |
536 'mode' => 'error', |
537 'error' => $lang->get('acppm_err_upgrade_bad_query'), |
537 'error' => $lang->get('acppl_err_upgrade_bad_query'), |
538 ); |
538 ); |
539 break 2; |
539 break 2; |
540 } |
540 } |
541 } |
541 } |
542 |
542 |
626 $db->die_json(); |
626 $db->die_json(); |
627 |
627 |
628 // send an error and notify the user even though it was technically a success |
628 // send an error and notify the user even though it was technically a success |
629 $return = array( |
629 $return = array( |
630 'mode' => 'error', |
630 'mode' => 'error', |
631 'error' => $lang->get('acppm_err_upgrade_not_supported'), |
631 'error' => $lang->get('acppl_err_upgrade_not_supported'), |
632 ); |
632 ); |
633 break; |
633 break; |
634 } |
634 } |
635 |
635 |
636 // build target list |
636 // build target list |
641 // is the current version upgradeable? |
641 // is the current version upgradeable? |
642 if ( !isset($indices[$installed]) ) |
642 if ( !isset($indices[$installed]) ) |
643 { |
643 { |
644 $return = array( |
644 $return = array( |
645 'mode' => 'error', |
645 'mode' => 'error', |
646 'error' => $lang->get('acppm_err_upgrade_bad_version'), |
646 'error' => $lang->get('acppl_err_upgrade_bad_version'), |
647 ); |
647 ); |
648 break; |
648 break; |
649 } |
649 } |
650 |
650 |
651 // does the plugin support upgrading to its own version? |
651 // does the plugin support upgrading to its own version? |
652 if ( !isset($indices[$installed]) ) |
652 if ( !isset($indices[$installed]) ) |
653 { |
653 { |
654 $return = array( |
654 $return = array( |
655 'mode' => 'error', |
655 'mode' => 'error', |
656 'error' => $lang->get('acppm_err_upgrade_bad_target_version'), |
656 'error' => $lang->get('acppl_err_upgrade_bad_target_version'), |
657 ); |
657 ); |
658 break; |
658 break; |
659 } |
659 } |
660 |
660 |
661 // list out which versions to do |
661 // list out which versions to do |
665 // Are we trying to go backwards? |
665 // Are we trying to go backwards? |
666 if ( $index_stop <= $index_start ) |
666 if ( $index_stop <= $index_start ) |
667 { |
667 { |
668 $return = array( |
668 $return = array( |
669 'mode' => 'error', |
669 'mode' => 'error', |
670 'error' => $lang->get('acppm_err_upgrade_to_older'), |
670 'error' => $lang->get('acppl_err_upgrade_to_older'), |
671 ); |
671 ); |
672 break; |
672 break; |
673 } |
673 } |
674 |
674 |
675 // build the list of version sets |
675 // build the list of version sets |
743 if ( !$db->check_query($query) ) |
743 if ( !$db->check_query($query) ) |
744 { |
744 { |
745 // aww crap, a query is bad |
745 // aww crap, a query is bad |
746 $return = array( |
746 $return = array( |
747 'mode' => 'error', |
747 'mode' => 'error', |
748 'error' => $lang->get('acppm_err_upgrade_bad_query'), |
748 'error' => $lang->get('acppl_err_upgrade_bad_query'), |
749 ); |
749 ); |
750 break 2; |
750 break 2; |
751 } |
751 } |
752 } |
752 } |
753 |
753 |