hananils/datetime — Issue #101: Bad check for Administration in displayPublishPanel
Author: brendo
Created: 2012-02-01 06:35:55+00:00
State: open

Hello :)

Found a bug today when using DateTime with Section Schemas. [This commit](https://github.com/hananils/datetime/commit/cc3fa581c7f97c38e4e7ea2b79d8d4875d3796c9) changed the detection from checking for `Administration` class to using the `Administration::instance()->getPageCallback()` function.

While this is fine, the check for the `Administration` also needs to exist otherwise if this extension has been called in the `Frontend` context (which Section Schemas does), it will fail with:

`Class 'Administration' not found in site-here.com/extensions/datetime/fields/field.datetime.php on line 170`