disinclined.org
/
git
/
mudd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move conf outside of webroot; fix func invocation
[mudd.git]
/
mud.php
diff --git
a/mud.php
b/mud.php
index
f3db120
..
4309fef
100644
(file)
--- a/
mud.php
+++ b/
mud.php
@@
-22,7
+22,8
@@
abstract class model {
public function query() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
public function query() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
- if ($args) call_user_func_array(array($statement, 'bind_param'), &$args);
+ #if ($args) call_user_func_array(array($statement, 'bind_param'), &$args);
+ if ($args) call_user_func_array(array($statement, 'bind_param'), $args);
$statement->execute();
$statement->store_result();
$statement->store_result();
$statement->execute();
$statement->store_result();
$statement->store_result();
@@
-44,7
+45,7
@@
abstract class model {
public function insert() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
public function insert() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
- call_user_func_array(array($statement, 'bind_param'),
&
$args);
+ call_user_func_array(array($statement, 'bind_param'), $args);
$statement->execute();
return $this->db->insert_id;
}
$statement->execute();
return $this->db->insert_id;
}
@@
-52,7
+53,7
@@
abstract class model {
public function update() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
public function update() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
- call_user_func_array(array($statement, 'bind_param'),
&
$args);
+ call_user_func_array(array($statement, 'bind_param'), $args);
$statement->execute();
return $this->db->insert_id;
}
$statement->execute();
return $this->db->insert_id;
}
@@
-241,10
+242,10
@@
class mud extends model {
$this->yell($_GET['msg']);
break;
case 'say':
$this->yell($_GET['msg']);
break;
case 'say':
- $this->say($_GET['
dest'], $_GET['
msg']);
+ $this->say($_GET['msg']);
break;
case 'tell':
break;
case 'tell':
- $this->tell();
+ $this->tell(
$_GET['dest'], $_GET['msg']
);
break;
case 'poll':
$this->response($this->poll());
break;
case 'poll':
$this->response($this->poll());
@@
-253,7
+254,7
@@
class mud extends model {
$this->update('DELETE FROM players');
break;
default:
$this->update('DELETE FROM players');
break;
default:
- $this->error(400, '
U
nknown command');
+ $this->error(400, '
u
nknown command');
}
}
}
}