Skip to content

Instructions to patch apidamin 1.8b1

Mynt edited this page May 1, 2012 · 5 revisions

The mods-kpax version of apiadmin issues some errors when invoked, namely:

  • Deprecated in 1.8: You should pass $vars['name'] now instead of $vars['internalname'] Called from [#7] /Library/WebServer/Documents/elgg/mod/apiadmin/views/default/apiadmin/forms/add_key.php:3 -> [#6] /Library/WebServer/Documents/elgg/engine/lib/views.php:503

  • Deprecated in 1.8: isadminloggedin() is deprecated by elgg_is_admin_logged_in() Called from [#7] /Library/WebServer/Documents/elgg/mod/apiadmin/views/default/object/api_key.php:26

  • Deprecated in 1.8: elgg_view_listing deprecated by elgg_view_image_block Called from [#7] /Library/WebServer/Documents/elgg/mod/apiadmin/views/default/object/api_key.php:36

These can be avoided by editing the code and substituting the lines numbered by the ones below in:

/Library/WebServer/Documents/elgg/mod/apiadmin/views/default/apiadmin/forms/add_key.php:3
    $ref_control = elgg_view('input/text', array('name' => 'ref'));

/Library/WebServer/Documents/elgg/mod/apiadmin/views/default/object/api_key.php:26
    if (elgg_is_admin_logged_in()) {

/Library/WebServer/Documents/elgg/mod/apiadmin/views/default/object/api_key.php:36
     echo elgg_view_image_block($icon, $info);
Clone this wiki locally