[packages/w3pw] do not rename the files. direct to main if session started

glen glen at pld-linux.org
Mon Nov 17 19:49:55 CET 2014


commit ea6944e85251e920925d8efe8445f3242a896365
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Nov 17 20:49:44 2014 +0200

    do not rename the files. direct to main if session started

 authpassword.patch | 16 +++++++++++++++-
 w3pw.spec          |  4 +---
 2 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/w3pw.spec b/w3pw.spec
index 3eb77b4..85a72e6 100644
--- a/w3pw.spec
+++ b/w3pw.spec
@@ -3,7 +3,7 @@
 Summary:	Web-based password wallet manager
 Name:		w3pw
 Version:	1.40
-Release:	0.11
+Release:	0.14
 License:	GPL v2
 Group:		Applications/WWW
 Source0:	http://downloads.sourceforge.net/w3pw/%{name}-%{version}.tar.gz
@@ -54,8 +54,6 @@ Features:
 
 %prep
 %setup -q
-mv index.php login.php
-mv main.php index.php
 %patch0 -p1
 
 # simple sql to create and load db schema
diff --git a/authpassword.patch b/authpassword.patch
index 9f8d19b..4648a3c 100644
--- a/authpassword.patch
+++ b/authpassword.patch
@@ -1,5 +1,5 @@
 --- ./main.php	2014-11-16 14:53:38.235094774 +0200
-+++ ./index.php	2014-11-16 14:52:37.000000000 +0200
++++ ./main.php	2014-11-16 14:52:37.000000000 +0200
 @@ -15,6 +15,20 @@
  
  <?php
@@ -45,3 +45,17 @@
  // don't report Database-Errors on Frontend
  //error_reporting(E_ERROR);
  ?>
+--- w3pw-1.40/index.php	2014-11-17 20:42:31.565202759 +0200
++++ w3pw-1.40/index.php	2014-11-17 20:45:06.000000000 +0200
+@@ -1,4 +1,10 @@
+-<html>
++<?php
++session_start();
++if (!empty($_SESSION['logged_in'])) {
++	header("Location: main.php");
++	exit;
++}
++?><html>
+ <head>
+ <title>w3pw Login</title>
+ <?php 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/w3pw.git/commitdiff/ea6944e85251e920925d8efe8445f3242a896365



More information about the pld-cvs-commit mailing list