summaryrefslogtreecommitdiffstats
path: root/lib/class/core.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-12-20 16:52:43 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-12-20 16:52:43 +0000
commitd8ea07a04acc03160ac73f5db2a9249890e5fd13 (patch)
tree63e0dfedbfc9565a265cb342da405cd79b4ff341 /lib/class/core.class.php
parent69c56f829da3fc44e6dbcc14c364901b86f55421 (diff)
downloadampache-d8ea07a04acc03160ac73f5db2a9249890e5fd13.tar.gz
ampache-d8ea07a04acc03160ac73f5db2a9249890e5fd13.tar.bz2
ampache-d8ea07a04acc03160ac73f5db2a9249890e5fd13.zip
sync from 3.5.x and fix display issue on playlist view
Diffstat (limited to 'lib/class/core.class.php')
-rw-r--r--lib/class/core.class.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/class/core.class.php b/lib/class/core.class.php
index d93b542a..8ca59851 100644
--- a/lib/class/core.class.php
+++ b/lib/class/core.class.php
@@ -41,7 +41,7 @@ class Core {
* This registers a form with a SID, inserts it into the session variables
* and then returns a string for use in the HTML form
*/
- public static function form_register($name) {
+ public static function form_register($name,$type='post') {
// Make ourselves a nice little sid
$sid = md5(uniqid(rand(), true));
@@ -49,7 +49,15 @@ class Core {
// Register it
$_SESSION['forms'][$name] = array('sid'=>$sid,'expire'=>time() + Config::get('session_length'));
- $string = '<input type="hidden" name="form_validation" value="' . $sid . '" />';
+ switch ($type) {
+ default:
+ case 'post':
+ $string = '<input type="hidden" name="form_validation" value="' . $sid . '" />';
+ break;
+ case 'get':
+ $string = $sid;
+ break;
+ } // end switch on type
return $string;