Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Approval broken? #117

Open
flack opened this issue Sep 22, 2013 · 1 comment
Open

Approval broken? #117

flack opened this issue Sep 22, 2013 · 1 comment

Comments

@flack
Copy link
Member

flack commented Sep 22, 2013

When I run the following code:

$user = new midgard_user($lokin_tokens);
$user->login();

$t = new midgard_topic;
$t->create();
$t->approve();
var_dump($t->is_approved());
$t = new midgard_topic($t->id);
var_dump($t->is_approved());
$t->update();
var_dump($t->is_approved());
$t = new midgard_topic($t->id);
var_dump($t->is_approved());

I would expect this output:

bool(true)
bool(true)
bool(false)
bool(false)

instead, I get:

bool(true)
bool(true)
bool(true)
bool(true)

Not sure if I'm missing something here, but shouldn't approval be automatically revoked when the object changes? At least I always thought that is_approved() implicitly checks that metadata.revised <= metadata.approved

@piotras
Copy link
Member

piotras commented Sep 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants