diff --git a/docs/NEWS b/docs/NEWS index 5a8b2f9b..002ccd15 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,8 @@ Version 2.0-beta4 / RC? () ------------------------------------------------------------------------ + * Change name and fix $serendipity['capabilities']['jquery_noConflictMode'] + * Fix bug in entry listing, which showed wrong categories for entries (Issue #201) @@ -97,7 +99,7 @@ Version 2.0-beta3 (July 25th, 2014) to older plugins. This mode is now considered deprecated and will be removed in future releases. A new variable: - $serendipity['capabilities']['jquery-noconflict'] = false; + $serendipity['capabilities']['jquery_noConflictMode'] = false; in your theme's config.inc.php file can now turn of that noConflict-mode. diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php index 572bbbb2..2702d213 100644 --- a/include/plugin_api.inc.php +++ b/include/plugin_api.inc.php @@ -1,4 +1,5 @@ - serendipity_owner = $owner[0]; } } - + $p->pluginPath = $p->act_pluginPath = $pluginPath; if (empty($p->act_pluginPath)) { $p->act_pluginPath = $class_name; @@ -672,7 +675,7 @@ class serendipity_plugin_api * @param type The type of the plugin (local|spartacus|...) * @return array Information about the plugin */ - static function &getPluginInfo(&$pluginFile, &$class_data, $type) + static function &getPluginInfo(&$pluginFile, &$class_data, $type) { global $serendipity; @@ -725,7 +728,7 @@ class serendipity_plugin_api * @param string The location/type of a plugin (local|spartacus) * @return */ - static function &setPluginInfo(&$plugin, &$pluginFile, &$bag, &$class_data, $pluginlocation = 'local') + static function &setPluginInfo(&$plugin, &$pluginFile, &$bag, &$class_data, $pluginlocation = 'local') { global $serendipity; @@ -914,7 +917,7 @@ class serendipity_plugin_api if (count($plugins) == 0) { $serendipity['prevent_sidebar_plugins_' . $side] = true; } - + $loggedin = false; if (serendipity_userLoggedIn() && serendipity_checkPermission('adminPlugins')) { $loggedin = true; @@ -931,7 +934,7 @@ class serendipity_plugin_api $show_plugin = $plugin->generate_content($title); $content = ob_get_contents(); ob_end_clean(); - + if ($loggedin) { $content .= '
' . EDIT . '
'; } @@ -1006,7 +1009,7 @@ class serendipity_plugin_api * @param string Name of a plugin * @return boolean */ - static function is_event_plugin($name) + static function is_event_plugin($name) { return (strstr($name, '_event_')); } @@ -1019,7 +1022,7 @@ class serendipity_plugin_api * @param boolean If set to true, the list of cached event plugins will be refreshed * @return mixed Either returns the whole list of event plugins, or only a specific instance */ - static function &get_event_plugins($getInstance = false, $refresh = false) + static function &get_event_plugins($getInstance = false, $refresh = false) { static $event_plugins; static $false = false; @@ -1073,7 +1076,7 @@ class serendipity_plugin_api * @param mixed May contain any type of variables that are passed to an event plugin * @return true */ - static function hook_event($event_name, &$eventData, $addData = null) + static function hook_event($event_name, &$eventData, $addData = null) { global $serendipity; @@ -1097,7 +1100,7 @@ class serendipity_plugin_api $apifunc($event_name, $bag, $eventData, $addData); } } - + // execute backend needed core hooks serendipity_plugin_api_core_event_hook($event_name, $bag, $eventData, $addData); @@ -1105,7 +1108,7 @@ class serendipity_plugin_api $apifunc = 'serendipity_plugin_api_pre_event_hook'; $apifunc($event_name, $bag, $eventData, $addData); } - + // Function names cannot contain ":" etc, so if we ever have event looks like "backend:js" this // needs to be replaced to "backend_js". The real event name is passed as a function argument // These specific per-hook functions are utilized for theme's config.inc.php files @@ -1161,7 +1164,7 @@ class serendipity_plugin_api * @param string A name (may contain wildcards) of a plugin class to check * @return boolean True if a plugin was found */ - static function exists($instance_id) + static function exists($instance_id) { global $serendipity; @@ -1187,7 +1190,7 @@ class serendipity_plugin_api * @param boolean Indicates if the plugin is an event plugin * @return object Returns the plugin object or false, if failure */ - static function &autodetect_instance($plugin_name, $authorid, $is_event_plugin = false) + static function &autodetect_instance($plugin_name, $authorid, $is_event_plugin = false) { if ($is_event_plugin) { $side = 'event'; @@ -1219,16 +1222,16 @@ class serendipity_plugin_api if (file_exists($probelang)) { include $probelang; } - + include $path . '/lang_en.inc.php'; } } -/** - * holds a bunch of properties; since serendipity 0.8 only one value per key is - * allowed [was never really useful] +/** + * holds a bunch of properties; since serendipity 0.8 only one value per key is + * allowed [was never really useful] */ -class serendipity_property_bag +class serendipity_property_bag { /** * @access private @@ -1282,9 +1285,9 @@ class serendipity_property_bag } /** - * A core plugin, with methods that both event and sidebar plugins share + * A core plugin, with methods that both event and sidebar plugins share */ -class serendipity_plugin +class serendipity_plugin { var $instance = null; var $protected = false; @@ -1420,7 +1423,7 @@ class serendipity_plugin * @param value The value of a config item * @return */ - function validate($config_item, &$cbag, &$value) + function validate($config_item, &$cbag, &$value) { static $pattern_mail = '([\.\-\+~@_0-9a-z]+?)'; static $pattern_url = '([@!=~\?:&;0-9a-z#\.\-_\/]+?)'; @@ -1655,7 +1658,7 @@ class serendipity_plugin * Events can be called on several occasions when s9y performs an action. * One or multiple plugin can be registered for each of those hooks. */ -class serendipity_event extends serendipity_plugin +class serendipity_event extends serendipity_plugin { /** @@ -1685,7 +1688,7 @@ class serendipity_event extends serendipity_plugin * @param array The entry superarray to get the reference from * @return array The value of the array for the fieldname (reference) */ - function &getFieldReference($fieldname = 'body', &$eventData) + function &getFieldReference($fieldname = 'body', &$eventData) { // Get a reference to a content field (body/extended) of // $entries input data. This is a unifying function because @@ -1734,7 +1737,7 @@ class serendipity_event extends serendipity_plugin * @param mixed Any additional data from the hook_event call * @return true */ - function event_hook($event, &$bag, &$eventData, $addData = null) + function event_hook($event, &$bag, &$eventData, $addData = null) { // Define event hooks here, if you want you plugin to execute those instead of being a sidebar item. // Look at external plugins 'serendipity_event_mailer' or 'serendipity_event_weblogping' for usage. @@ -1748,4 +1751,4 @@ class serendipity_event extends serendipity_plugin } -/* vim: set sts=4 ts=4 expandtab : */ \ No newline at end of file +/* vim: set sts=4 ts=4 expandtab : */