@@ -20,7 +20,7 @@ public function handleArgs($args){
20
20
if (isset ($ args ['user ' ]) && isset ($ args ['pass ' ])){
21
21
$ loginStatus = $ this ->ScriptRepo ->loginUser ($ args ['user ' ], $ args ['pass ' ]);
22
22
if ($ loginStatus ['loginSuccess ' ]){
23
- $ sessionKey = makeSessionID ();
23
+ $ sessionKey = $ this -> makeSessionID ();
24
24
$ user = $ this ->ScriptRepo ->databaseHandle ->real_escape_string ($ args ['user ' ]);
25
25
$ time = time ()+3600 ;
26
26
$ this ->ScriptRepo ->queryDatabase ("INSERT INTO repo_sessions (id, username, sessionKey, time) VALUES ('NULL', ' $ user', ' $ sessionKey', ' $ time') " );
@@ -48,10 +48,10 @@ public function handleArgs($args){
48
48
case isset ($ args ['browse ' ]):
49
49
if (isset ($ args ['count ' ])){ $ count = intval ($ args ['count ' ]); }else { $ count = 20 ; }
50
50
if (isset ($ args ['page ' ])){ $ page = intval ($ args ['page ' ]); }else { $ page = 1 ; }
51
- $ queryBrowse = $ this ->ScriptRepo ->queryDatabase ("SELECT * FROM repo_entries " );
51
+ $ queryBrowse = $ this ->ScriptRepo ->queryDatabase ("SELECT * FROM repo_entries WHERE privacy=1 " );
52
52
$ this ->data = array_merge (array ('success ' => true ), $ this ->ScriptRepo ->getResults ($ queryBrowse , $ count , $ page ));
53
53
break ;
54
- case 'view ' :
54
+ case isset ( $ args [ 'view ' ]) :
55
55
if (isset ($ args ['pubID ' ])){
56
56
$ pubID = $ this ->ScriptRepo ->databaseHandle ->real_escape_string ($ args ['pubID ' ]);
57
57
$ queryView = $ this ->ScriptRepo ->queryDatabase ("SELECT * FROM repo_entries WHERE pubID=' $ pubID' " );
@@ -64,6 +64,7 @@ public function handleArgs($args){
64
64
}else {
65
65
$ this ->data = array ('success ' => false );
66
66
}
67
+ break ;
67
68
}
68
69
}
69
70
public function outputData (){
0 commit comments