joomla/joomla-cms — pull request #2698 by Bakual (2013-12-19 12:05:52+00:00)
Title: Remove PHP notice when languagecode plugin is published

### Issue
When the languagecode plugin is enabled, you get a PHP notice about `$data->name` each time you save another plugin. This is because `$data` is `null` during the save process when it comes to the `onContentPrepareForm` event. Thus the check fails.
Also `empty($data)` always returns true because `$data` is converted to an object (empty() returns always true for objects)

### Proposed Solution
I've added a new hidden parameter `languagecodeplugin` to the plugin manifest.
During the `onContentPrepareForm` event, I now only check for the presence of this field in the form and only process further if the field is present.
This makes the checks simpler and removes the PHP notice

### Test Instructions
* Enable the languagecode plugin and make sure you can edit and save the language codes.
* Edit and save any other plugin
* Check PHP error logs to make sure no notices are generated anymore.