This version corrects the Admin issue introduced by V4.4. V4.4.1 is available through the Joomla Updater or for download through your My Downloads area of our website.
Turns out a code change intended for our 5.0dev branch inadvertantly got pushed to the 4.x branch (by me, duh!). The javascript structure in 5.0 will change considerably and part of that change took effect with the inadvertant code change.
We have reverted the code change and released 4.4.1. V4.4 has been retracted.
Sorry for any inconvenience.
See the details here
/**
* If status is 1, allow edit. If status is 2, don't allow edit. If status is 3, punt and let normal ACLs decide
*/
switch ('{tablename___status_raw}') {
case '1':
return true;
case '2':
return false;
case '3':
return null;
}
/* This plugin compares the flight date to the jan 1 of the previous year and makes this record read only if the flight is that old.
* So - if it is 2021, and you try to edit a flight, if that flight happened in 2020 or 2021, you can edit it. If it happened in 2019, you cannot.
*/
$flight_date = strtotime('{daily_log___flight_date}'); // date of the flight as entered in the log.
$compare_date = strtotime(date('Y')-1 . '-01-01'); //Take this year - 1 and jan 1 to it and convert to unix time
if ( $flight_date < $compare_date) {
return false; // flight too old - cannot edit
}
return true; // Go ahead and edit.