function cleanDBonPurge() { $temp = new PluginProjetProjet_Item(); $temp->deleteByCriteria(array('plugin_projet_projets_id' => $this->fields['id'])); $temp = new PluginProjetTask(); $temp->deleteByCriteria(array('plugin_projet_projets_id' => $this->fields['id']), 1); $temp = new PluginProjetFollowup(); $temp->deleteByCriteria(array('plugin_projet_projets_id' => $this->fields['id'])); $temp = new PluginProjetProjet_Projet(); $temp->deleteByCriteria(array('plugin_projet_projets_id_1' => $this->fields['id'], 'plugin_projet_projets_id_2' => $this->fields['id'])); }
it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Projet is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Projet. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; Session::checkLoginUser(); $fup = new PluginProjetFollowup(); if (isset($_POST["add"])) { $fup->check(-1, 'w', $_POST); $fup->add($_POST); Html::back(); } else { if (isset($_POST["update"])) { $fup->check($_POST['id'], 'w'); $fup->update($_POST); Html::back(); } else { if (isset($_POST["delete"])) { $fup->check($_POST['id'], 'w'); $fup->delete($_POST); Html::back(); }
static function purgeFollowup($item) { $temp = new PluginProjetFollowup(); $temp->deleteByCriteria(array('plugin_projet_projets_id' => $item->getField('id'))); }