/** * Delete a project. * * @param string $p_username The name of the user trying to access the versions. * @param string $p_password The password of the user. * @param integer $p_project_id A project's id * @return bool returns true or false depending on the success of the delete action */ function mc_project_delete($p_username, $p_password, $p_project_id) { $t_user_id = mci_check_login($p_username, $p_password); if ($t_user_id === false) { return new soap_fault('Client', '', 'Access Denied', 'Username/password combination was incorrect'); } if (!project_exists($p_project_id)) { return new soap_fault('Client', '', "Project '{$p_project_id}' does not exist."); } if (!mci_has_administrator_access($t_user_id, $p_project_id)) { return new soap_fault('Client', '', 'Access Denied', 'User does not have administrator access'); } return project_delete($p_project_id); }
/** * Delete a project. * * @param string $p_username The name of the user trying to access the versions. * @param string $p_password The password of the user. * @param integer $p_project_id A project's id * @return bool returns true or false depending on the success of the delete action */ function mc_project_delete($p_username, $p_password, $p_project_id) { $t_user_id = mci_check_login($p_username, $p_password); if ($t_user_id === false) { return mci_soap_fault_login_failed(); } if (!project_exists($p_project_id)) { return new soap_fault('Client', '', "Project '{$p_project_id}' does not exist."); } if (!mci_has_administrator_access($t_user_id, $p_project_id)) { return mci_soap_fault_access_denied($t_user_id); } return project_delete($p_project_id); }
/** * Delete a project. * * @param string $p_username The name of the user trying to access the versions. * @param string $p_password The password of the user. * @param integer $p_project_id A project's identifier. * @return boolean returns true or false depending on the success of the delete action */ function mc_project_delete($p_username, $p_password, $p_project_id) { global $g_project_override; $t_user_id = mci_check_login($p_username, $p_password); if ($t_user_id === false) { return mci_soap_fault_login_failed(); } if (!project_exists($p_project_id)) { return SoapObjectsFactory::newSoapFault('Client', 'Project \'' . $p_project_id . '\' does not exist.'); } $g_project_override = $p_project_id; if (!mci_has_administrator_access($t_user_id, $p_project_id)) { return mci_soap_fault_access_denied($t_user_id); } return project_delete($p_project_id); }