Module: appdb
Branch: master
Commit: 634840878bb26990b0de005bba33b760f3e3c690
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=634840878bb26990b0de005b…
Author: Jeremy Newman <jnewman(a)codeweavers.com>
Date: Mon Nov 14 14:49:22 2016 -0600
cleanup, set method and property visibility, modernize constructor
---
include/session.php | 50 +++++++++++++++++++++++++-------------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/include/session.php b/include/session.php
index 31b8761..0a90584 100644
--- a/include/session.php
+++ b/include/session.php
@@ -9,14 +9,14 @@
class session
{
// defines
- var $_server;
- var $_expire;
- var $_db;
- var $name;
- var $msg;
-
+ private $_server;
+ private $_expire;
+ private $_db;
+ private $name;
+ public $msg;
+
// create session object
- function session ($name, $server = "127.0.0.1", $expire = 30)
+ public function __construct ($name, $server = "127.0.0.1", $expire = 30)
{
// set the connection server
$this->_server = $server;
@@ -31,7 +31,7 @@ class session
ini_set('session.name', $this->name);
ini_set('session.use_cookies', true);
ini_set('session.use_only_cookies', true);
-
+
// setup session object
session_set_save_handler(
array(&$this, "_open"),
@@ -41,16 +41,16 @@ class session
array(&$this, "_destroy"),
array(&$this, "_gc")
);
-
+
// default lifetime on session cookie
session_set_cookie_params(
$this->_expire,
'/'
);
-
+
// start the loaded session
session_start();
-
+
// make sure we have a valid memcache server connection
if (!$this->_db->getVersion())
{
@@ -59,26 +59,26 @@ class session
}
// register variables into session (dynamic load and save of vars)
- function register ($var)
+ public function register ($var)
{
global $$var;
-
+
// load $var into memory
if (isset($_SESSION[$var]))
$$var = $_SESSION[$var];
-
+
// store var into session
$_SESSION[$var] =& $$var;
}
// destroy session
- function destroy ()
+ public function destroy ()
{
session_destroy();
}
// add alert message to buffer that will be displayed on the Next page view of the same user in html class
- function addmsg ($text, $color = "black")
+ public function addmsg ($text, $color = "black")
{
if (!isset($_SESSION['_msg']))
$_SESSION['_msg'] = array();
@@ -89,7 +89,7 @@ class session
}
// add alert message that will be displayed on the current page output in html class
- function alert ($text, $color = "black")
+ public function alert ($text, $color = "black")
{
$this->msg[] = array(
'msg' => $text,
@@ -98,14 +98,14 @@ class session
}
// clear session messages
- function purgemsg ()
+ public function purgemsg ()
{
$this->msg[] = array();
$_SESSION['_msg'][] = array();
}
// output msg_buffer and clear it.
- function dumpmsgbuffer ()
+ public function dumpmsgbuffer ()
{
if (isset($_SESSION['_msg']) and is_array($_SESSION['_msg']))
{
@@ -118,26 +118,26 @@ class session
}
// connect to session
- function _open ($save_path, $session_name)
+ public function _open ($save_path, $session_name)
{
$this->_db = new Memcache;
return $this->_db->connect($this->_server, "11211");
}
// close the session
- function _close ()
+ public function _close ()
{
return $this->_db->close();
}
// restore a session from memory
- function _read ($id)
+ public function _read ($id)
{
return $this->_db->get($id);
}
// write the session
- function _write ($id, $data)
+ public function _write ($id, $data)
{
if ($this->_db->get($id))
{
@@ -151,13 +151,13 @@ class session
}
// Delete the Session
- function _destroy ($id)
+ public function _destroy ($id)
{
return $this->_db->delete($id, 0);
}
// Garbage Collector (Not Needed for MemCache)
- function _gc ($maxlifetime)
+ public function _gc ($maxlifetime)
{
return true;
}
Module: appdb
Branch: master
Commit: 3aeea4886fb661a2f684669f13f4953c39119879
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=3aeea4886fb661a2f684669f…
Author: Jeremy Newman <jnewman(a)codeweavers.com>
Date: Mon Nov 14 13:14:49 2016 -0600
move help links into the wiki
---
index.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/index.php b/index.php
index b1560ea..0ef4ae1 100644
--- a/index.php
+++ b/index.php
@@ -23,11 +23,11 @@ compatibility with Wine.</p>
<?php
$str_benefits="
<ul>
- <li>Ability to <a href=\"".BASE."help/?sTopic=voting\" title=\"help on voting\" style=\"cursor: help\">vote</a> on your favorite applications</li>
+ <li>Ability to <a href=\"https://wiki.winehq.org/AppDB_Voting_Help\" title=\"help on voting\">vote</a> on your favorite applications</li>
<li>Ability to customize the layout and behavior of the AppDB and comments system</li>
<li>Take credit for your witty posts</li>
- <li>Ability to sign up to be an <a href=\"".BASE."help/?sTopic=maintainer_guidelines\"
- title=\"information about application maintainers\" style=\"cursor: help\">application maintainer</a></li>
+ <li>Ability to sign up to be an <a href=\"https://wiki.winehq.org/AppDB_Maintainer_Guidelines\"
+ title=\"information about application maintainers\">application maintainer</a></li>
<li>Submit new applications and versions</li>
<li>Submit new screenshots</li>
</ul>