fixed Post:: setter
This commit is contained in:
parent
ccb15c2da6
commit
730d4d77c5
@ -199,6 +199,7 @@ trait PostSqlMethods
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_string($q['user'])) {
|
if (is_string($q['user'])) {
|
||||||
|
$joins[] = "JOIN users u ON p.user_id = u.id";
|
||||||
$conds[] = "lower(u.name) = lower(?)";
|
$conds[] = "lower(u.name) = lower(?)";
|
||||||
$cond_params[] = $q['user'];
|
$cond_params[] = $q['user'];
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ trait PostStatusMethods
|
|||||||
$this->set_flag_detail($this->status_reason, null);
|
$this->set_flag_detail($this->status_reason, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function setIsHeld($hold)
|
public function setIsHeld($hold)
|
||||||
{
|
{
|
||||||
# Hack because the data comes in as a string:
|
# Hack because the data comes in as a string:
|
||||||
if ($hold === "false")
|
if ($hold === "false")
|
||||||
@ -104,6 +104,8 @@ trait PostStatusMethods
|
|||||||
|
|
||||||
$was_held = $this->is_held;
|
$was_held = $this->is_held;
|
||||||
|
|
||||||
|
$this->attributes['is_held'] = $hold;
|
||||||
|
|
||||||
# When a post is unheld, bump it.
|
# When a post is unheld, bump it.
|
||||||
if ($was_held && !$hold) {
|
if ($was_held && !$hold) {
|
||||||
$this->touch_index_timestamp();
|
$this->touch_index_timestamp();
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.4.0",
|
"php": ">=5.4.0",
|
||||||
"myimouto/railsphp": "v1.0.6",
|
"myimouto/railsphp": "dev-master",
|
||||||
"railsphp/willpaginate": "dev-master",
|
"railsphp/willpaginate": "dev-master",
|
||||||
"railsphp/actsasversioned": "dev-master",
|
"railsphp/actsasversioned": "dev-master",
|
||||||
"michelf/php-markdown": "1.3.*"
|
"michelf/php-markdown": "1.3.*"
|
||||||
|
Reference in New Issue
Block a user