MDL-29218 Repository: Hide the repo if repository::plugin_init returns false
MDL-29218 Repository: $pname, get rid of all the useless code

More details in the Tracker.
MDL-29218 Repository: fixed a typo in the PHPDoc