Plugin Directory

Changeset 1182983


Ignore:
Timestamp:
06/18/2015 12:03:22 AM (11 years ago)
Author:
latorante
Message:

Updating to version 2.8.9

  • Warning message if default Genoo form is missing after flushing the latest form list
Location:
genoo/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • genoo/trunk/Genoo.php

    r1182955 r1182983  
    66    Author URI: http://www.genoo.com/
    77    Author Email: info@genoo.com
    8     Version: 2.8.8
     8    Version: 2.8.9
    99    License: GPLv2
    1010    Text Domain: genoo
  • genoo/trunk/libs/Genoo/TableForms.php

    r1148584 r1182983  
    149149            $this->set_pagination_args(array('total_items' => count($allLogs), 'per_page' => $perPage));
    150150            $this->items = $this->found_data;
     151            $this->checkActiveForm($this->items);
    151152        } catch (\Genoo\ApiException $e){
    152153            $this->addNotice('error', 'Genoo API: ' . $e->getMessage());
     
    161162     * Process it!
    162163     */
    163 
    164164    public function process()
    165165    {
     
    180180        }
    181181    }
     182
     183    /**
     184     * Check if Active default form has been changed / removed
     185     *
     186     * @param $forms
     187     */
     188    public function checkActiveForm($forms)
     189    {
     190        if(!empty($this->activeForm)){
     191            $found = FALSE;
     192            if(is_array($forms) && !empty($forms) && !empty($this->activeForm)){
     193                foreach($forms as $form){
     194                    if(isset($form['id'])){
     195                        if($form['id'] == $this->activeForm){
     196                            $found = TRUE;
     197                            break;
     198                        }
     199                    }
     200                }
     201            }
     202            // Only if none of the forms inside matches active form
     203            if($found == FALSE){
     204                $this->addNotice('error', 'Have you recently changed your Genoo forms? Your default form seems to be missing, don’t forget to select a new one!');
     205            }
     206        }
     207    }
    182208}
  • genoo/trunk/readme.txt

    r1182955 r1182983  
    66License: GPLv2 or later
    77License URI: http://www.gnu.org/licenses/gpl-2.0.html
    8 Stable tag: 2.8.8
     8Stable tag: 2.8.9
    99
    1010Combine the flexibility of WordPress with the power of Genoo and experience amazing results!
Note: See TracChangeset for help on using the changeset viewer.