Skip to content
Browse files

beacon.spec: rpm release number changed from 5 to 6.

beacon/js/Beacon.js: changed to remove confirmation dialog that pops up while
closing browser window.

php/ajax.php:
php/login.php:
php/beacon.php: changed to automatically redirect to index.php in case of any
error, like expired session etc.
  • Loading branch information...
1 parent 20e3458 commit 2f2aa41a2404d26b833edc10293f8644ea4551ff @pjps pjps committed Jun 25, 2011
Showing with 21 additions and 11 deletions.
  1. +5 −1 beacon.spec
  2. +1 −2 beacon/js/Beacon.js
  3. +3 −2 php/ajax.php
  4. +6 −3 php/beacon.php
  5. +6 −3 php/login.php
View
6 beacon.spec
@@ -1,6 +1,6 @@
Name: beacon
Version: 0.5
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: WYSIWYG editor for docbook xml
Group: Applications/Editors
@@ -51,6 +51,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Jun 24 2011 P J P <pj.pandit@yahoo.co.in> 0.5-6
+- updated to load external files - Bug=704375.
+- redirects to index.php, in case of an error: expired session etc.
+
* Sat Jun 18 2011 P J P <pj.pandit@yahoo.co.in> 0.5-5
- Updated source to include upstream bug fixes.
- included httpd-beacon.conf into the source tarball.
View
3 beacon/js/Beacon.js
@@ -195,7 +195,7 @@ Beacon.prototype.init = function() {
$("#BeaconLogOut").bind("click", this.logout.attach(this));
- window.onbeforeunload = this.beaconExit.attach(this)
+ // window.onbeforeunload = this.beaconExit.attach(this)
}.attach(this)
});
};
@@ -208,7 +208,6 @@ Beacon.prototype.logout = function() {
Beacon.prototype.beaconExit = function() {
var str = "You are leaving Beacon. All unsaved documents will be lost.";
-
return str;
};
View
5 php/ajax.php
@@ -27,15 +27,16 @@
$beacon_mysql_password);
if ($beacon_runnable < 0) {
- echo '<h3>Database Error. <a href="index.php">Go to main page</a> to review the problem.</h3>';
+ header('Location: index.php');
exit();
}
$auth = new BeaconAuth($beacon_db_instance);
if (!$auth->check_session()) {
- echo '<h3>You are not authorized to view this page. <a href="index.php">Login Here.</a></h3>';
@session_destroy();
+ header('Location: index.php');
+
exit();
}
View
9 php/beacon.php
@@ -23,14 +23,17 @@
$beacon_mysql_password);
if ($beacon_runnable < 0) {
- echo '<h3>Database Error. <a href="index.php">Go to main page</a> to review the problem.</h3>';
+ header('Location: index.php');
+ exit();
}
$auth = new BeaconAuth($beacon_db_instance);
if (!$auth->check_session()) {
- echo '<h3>You are not authorized to view this page. <a href="index.php">Login Here.</a></h3>';
@session_destroy();
+ header('Location: index.php');
+
+ exit();
} else {
$request = json_decode(file_get_contents($beacon_conf_path));
@@ -83,4 +86,4 @@
<?php
}
-?>
+?>
View
9 php/login.php
@@ -23,16 +23,18 @@
$beacon_mysql_password);
if ($beacon_runnable < 0) {
- echo '<h3>Database Error. <a href="index.php">Go to main page</a> to review the problem.</h3>';
@session_destroy();
+ header("Location: index.php");
+
+ exit();
}
$auth = new BeaconAuth($beacon_db_instance);
if (!$auth->check_session()) {
if (!isset($_POST['name1'])) {
- echo '<h3>You are not authorized to view this page. <a href="index.php">Login Here.</a></h3>';
@session_destroy();
+ header("Location: index.php");
} else {
$username = $_POST['name1'];
$password = $_POST['password1'];
@@ -78,8 +80,9 @@
/* BEGIN: MySQL Login */
if (!$auth->login($username, md5($password))) {
- echo '<h3>Incorrect Login. <a href="index.php">Go Back.</a></h3>';
@session_destroy();
+ echo '<h3>Incorrect Login.</h3>';
+ header)('Refresh: 1; url=index.php');
} else {
header("Location: beacon.php");
}

0 comments on commit 2f2aa41

Please sign in to comment.
Something went wrong with that request. Please try again.