Cleanup recaptchalib and the signup page (signup needs more work) and remove the xmpp profile remove goto which causes some problems with tools.

This commit is contained in:
Mark Crane
2012-06-21 02:18:31 +00:00
parent 21a4b0ca20
commit a36b818b7f
3 changed files with 8 additions and 22 deletions
-1
View File
@@ -88,7 +88,6 @@ if ($fp) {
include "update_complete.php";
end:
//show the footer
require_once "includes/footer.php";
+4 -9
View File
@@ -86,7 +86,8 @@ if ($action == "update") {
if ((!isset($_REQUEST['submit'])) || ($_REQUEST['submit'] != 'Save')) {
// If we arent saving a Profile Display the form.
include "profile_edit.php";
goto end;
require_once "includes/footer.php";
exit;
}
foreach ($_REQUEST as $field => $data){
@@ -103,7 +104,8 @@ if (strlen($error) > 0) {
include "errors.php";
$profile = $request;
include "profile_edit.php";
goto end;
require_once "includes/footer.php";
exit;
}
// Save New Entry
@@ -162,7 +164,6 @@ if ($action == "add" && permission_exists('xmpp_add')) {
$sql .= ") ";
$db->exec(check_sql($sql));
goto writeout;
}
elseif ($action == "update" && permission_exists('xmpp_edit')) {
$sql = "";
@@ -194,19 +195,14 @@ elseif ($action == "update" && permission_exists('xmpp_edit')) {
$sql .= "where xmpp_profile_uuid = '" . $request['id'] . "' ";
$db->exec(check_sql($sql));
$xmpp_profile_uuid = $request['id'];
goto writeout;
}
writeout:
//prepare the xmpp files to be written. delete all jingle files that are prefixed with v_ and have a file extension of .xml
$jingle_list = glob($_SESSION['switch']['conf']['dir'] . "/jingle_profiles/*v_*.xml");
foreach($jingle_list as $name => $value) {
unlink($value);
}
if ($request['enabled'] == "true") {
//prepare the xml
include "client_template.php";
@@ -238,7 +234,6 @@ if ($fp) {
include "update_complete.php";
end:
//show the footer
require_once "includes/footer.php";