Skip to content

Commit

Permalink
Deprecated autosave plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
garvinhicking committed Jul 29, 2014
1 parent 13c1c5b commit 1db6a68
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion serendipity_event_autosave/serendipity_event_autosave.php
Expand Up @@ -32,7 +32,7 @@ function introspect(&$propbag)
'smarty' => '2.6.7',
'php' => '4.1.0'
));
$propbag->add('version', '0.2.2');
$propbag->add('version', '0.3');
$propbag->add('configuration', array());
$propbag->add('event_hooks', array(
'backend_entryform' => true,
Expand Down Expand Up @@ -109,6 +109,14 @@ function event_hook($event, &$bag, &$eventData, $addData = null) {
break;

case 'backend_entryform':
if (version_compare(serendipity_getCoreVersion($serendipity['version']), "2.0", ">=")) {
// Autosave plugin no longer supported
echo '<p>The serendipity_event_autosave Plugin is no longer supported in Serendipity 2.0 - you should remove it from your installation.</p>';
echo '<p>Please note that Serendipity 2.0 will save your written entry in the browser, and restore it upon crash.</p>';
return true;
}


?>
<script type="text/javascript" src="<?php echo $this->get_config('path') ?>/js/prototype.js"></script>
<script type="text/javascript" src="<?php echo $this->get_config('path') ?>/js/rico.js"></script>
Expand Down

2 comments on commit 1db6a68

@ophian
Copy link
Member

@ophian ophian commented on 1db6a68 Jul 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why you did not use if ($serendipity['version'][0] > 1) here?

@garvinhicking
Copy link
Member Author

@garvinhicking garvinhicking commented on 1db6a68 Jul 29, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.