Plugin Directory

Changeset 2487955


Ignore:
Timestamp:
03/05/2021 03:00:16 PM (5 years ago)
Author:
roccomarco
Message:

Added Piwi-Warehouse stable 3.1.1

Location:
piwi-warehouse
Files:
170 added
6 edited

Legend:

Unmodified
Added
Removed
  • piwi-warehouse/trunk/core/items/item-api.php

    r2438298 r2487955  
    2222function pwwh_core_item_api_get_item_by_title($title) {
    2323
    24   $item = get_page_by_title($title, OBJECT, PWWH_CORE_ITEM);
    25 
    26   if(is_a($item, 'WP_Post')) {
    27     return $item;
     24  if($title) {
     25    $args = array('post_type' => PWWH_CORE_ITEM,
     26                  'posts_per_page' => -1,
     27                  'post_status' => 'publish',
     28                  'title' => $title);
     29    $items = get_posts($args);
     30    if((count($items) == 1) && is_a($items[0], 'WP_Post')) {
     31      return $items[0];
     32    }
     33    else if(count($items) > 1) {
     34      $msg = sprintf('Multiple item with the same name in %s()', __FUNCTION__);
     35      pwwh_logger_append($msg, PWWH_LOGGER_EFLAG_CRITICAL);
     36      $msg = sprintf('The name is: %s', $title);
     37      pwwh_logger_append($msg, PWWH_LOGGER_EFLAG_CRITICAL);
     38      return false;
     39    }
     40    else {
     41      return false;
     42    }
    2843  }
    2944  else {
  • piwi-warehouse/trunk/core/movements/js/pwwh.movement.common.js

    r2438298 r2487955  
    8282    let status = pwwhCoreGetStatus(loc_obj.post.type);
    8383    let label;
    84     if(status != active) {
     84    if(status == 'concluded') {
    8585      label = loc_obj.ui.button.publish.label.activate;
    86 
     86    }
     87    else if((status == 'draft') || (status == 'auto-draft')){
     88      label = loc_obj.ui.button.publish.label.confirm;
    8789    }
    8890    else {
    89       label = loc_obj.ui.button.publish.label.update
     91      label = loc_obj.ui.button.publish.label.update     
    9092    }
    9193
     
    108110    let status = pwwhCoreGetStatus(loc_obj.post.type);
    109111    let label;
    110     if(status != concluded) {
     112    if(status == 'active') {
    111113      label = loc_obj.ui.button.publish.label.conclude;
    112114    }
     115    else if((status == 'draft') || (status == 'auto-draft')) {
     116      label = loc_obj.ui.button.publish.label.confirm;
     117    }
    113118    else {
    114       label = loc_obj.ui.button.publish.label.update
     119      label = loc_obj.ui.button.publish.label.update     
    115120    }
    116121
  • piwi-warehouse/trunk/core/movements/movement-ui.php

    r2438298 r2487955  
    435435
    436436    /* Generating Item box. */
    437     $args = array('post_type' => PWWH_CORE_ITEM, 'posts_per_page' => -1);
     437    $args = array('post_type' => PWWH_CORE_ITEM, 'posts_per_page' => -1,
     438                  'post_status' => 'publish');
    438439    $id = $instance . ':' . $ui_facts['input']['item']['id'];
    439440    $dl_data  = get_posts($args);
  • piwi-warehouse/trunk/core/purchases/purchase-ui.php

    r2438298 r2487955  
    310310
    311311    /* Generating Item box. */
    312     $args = array('post_type' => PWWH_CORE_ITEM, 'posts_per_page' => -1);
     312    $args = array('post_type' => PWWH_CORE_ITEM, 'posts_per_page' => -1,
     313                  'post_status' => 'publish');
    313314    $id = $instance . ':' . $ui_facts['input']['item']['id'];
    314315    $dl_data  = get_posts($args);
  • piwi-warehouse/trunk/piwi-warehouse.php

    r2438298 r2487955  
    1414 * Plugin URI:
    1515 * Description:       Warehouse manager.
    16  * Version:           3.1.0
     16 * Version:           3.1.1
    1717 * Author:            Piwi Graphics
    1818 * Author URI:        http://piwi.graphics/
  • piwi-warehouse/trunk/readme.txt

    r2438326 r2487955  
    33Tags: warehouse, management system
    44Requires at least: 5.0
    5 Tested up to: 5.6
     5Tested up to: 5.7
    66Requires PHP: 7.2
    77Stable tag: 3.0
     
    3838== Changelog ==
    3939
     40= 3.1.1 =
     41 * BUG: Fixed wrong label for the movement publish button (bug #27).
     42 * BUG: Fixed Wrong locations list when a draft item with a duplicated name is
     43        saved (bug #26).
     44
    4045= 3.1.0 =
    4146 * NEW: Purchases are now tied to the locations: when purchasing an item, it is
    42        required to assign a destination. Item locations are automatically
    43        assigned on a Purchase. Validation mechanism have been changed.
     47        required to assign a destination. Item locations are automatically
     48        assigned on a Purchase. Validation mechanism have been changed.
    4449 * NEW: Extended Item Record postbox to handle the availability per location.
    4550 * NEW: Item availabilities are now tied to location. Aside of the total
    46        availability, each item has an availability per location.
     51        availability, each item has an availability per location.
    4752 * NEW: Implemented a new notes system for Purchase an Movement
    48  * NEW: Improved Post Submit Box management
    49  * BUG: Fixed issue with capability page restore action (bug #25)
    50        (backported to 3.0.1).
     53 * NEW: Improved Post Submit Box management.
    5154       
    5255= 3.0.1 =
     
    5760       the various part of the system
    5861 * NEW: Introduced a new engine to manage the back-end pages
    59  * BUG: Fixed issue with item titles (bug #24)(backported to 2.0.1).
    60  * BUG: Fixed issue which prevent deletion of first movement item (bug #23)
    61        (backported to 2.0.1).
    62  * BUG: Fixed misuse of a variable in Item Type column (bug #22)
    63        (backported to 2.0.1).
    64  * BUG: Fixed vrong aphostrope management in Item title (bug #21)
    65        (backported to 2.0.1).
    66  * BUG: Fixed a check in History insert to ensure an error log when Holder ID
    67        is NULL (bug #20) (backported to 2.0.1).
    68  * BUG: Fixed issue in History insert when movement transitate from active to
    69        something else (bug #19) (backported to 2.0.1).
    7062       
    7163= 2.0.2 =
     
    10395 * BUG: Fixed post date button style issue (bug #14).
    10496 * BUG: Fixed wrong sorting of Balance, Purchase and Movement title column of
    105        Post List (bug #13).
     97        Post List (bug #13).
    10698 * BUG: Fixed error in Shelfmark/Type column of Item List (bug #12).
    10799       
     
    116108 * NEW: Added Settings page.
    117109 * NEW: Improved admin sub-menu order.
    118  * NEW: Added Item related css for minor style improvements
    119        (backported to 1.0.1).
    120  * BUG: Fixed unescaped attribute in prefilled item metabox (bug #10)
    121        (backported to 1.0.1).
    122  * BUG: Improved update lent js (bug #9) (backported to 1.0.1).
    123  * BUG: Fixed Conclude button not properly internationalized (bug #8)
    124        (backported to 1.0.1).
    125  * BUG: Fixed extra div when no featured is available in info box (bug #7)
    126        (backported to 1.0.1).
    127  * BUG: Fixed misleading submit div title (bug #6) (backported to 1.0.1).
    128  * BUG: Fixed purchase quantity error message (bug #5) (backported to 1.0.1).
    129  * BUG: Fixed item datalist limit (bug #4) (backported to 1.0.1).
    130  * BUG: Fixed wrong initialization of Item amount and availability (bug #3)
    131        (backported to 1.0.1).
    132  * BUG: Fixed wrong translation (bug #2) (backported to 1.0.1).
    133  * BUG: Fixed wrong JS inclusion and removed old files (bug #1)
    134        (backported to 1.0.1).
    135110       
    136111= 1.0.2 =
Note: See TracChangeset for help on using the changeset viewer.