Ignore:
Timestamp:
Jan 22, 2013, 9:01:03 PM (11 years ago)
Author:
mistic100
Message:

fixed: cannot create initial config, update Tumblr adapter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/oAuth/admin/providers.php

    r20324 r20337  
    88if (isset($_POST['save_config']))
    99{
    10   array_walk_recursive($_POST, 'trim');
    11  
    1210  $providers = array();
    1311  foreach ($_POST['providers'] as $id => $data)
     
    4240    }
    4341   
    44     if (!$error)
     42    if (is_array(@$data['keys']))
    4543    {
    46       $providers[$id] = $data;
     44      $data['keys'] = array_map('trim', $data['keys']);
    4745    }
     46   
     47    $providers[$id] = $data;
    4848  }
     49 
     50  $hybridauth_conf['providers'] = $providers;
    4951 
    5052  if (!count($page['errors']))
    5153  {
    5254    // generate config file
    53     $hybridauth_conf['providers'] = $providers;
    5455    $content = "<?php\ndefined('PHPWG_ROOT_PATH') or die('Hacking attempt!');\n\nreturn ";
    5556    $content.= var_export(array('providers'=>$providers), true);
    5657    $content.= ";\n?>";
     58   
    5759    file_put_contents(OAUTH_CONFIG, $content);
     60    array_push($page['infos'], l10n('Information data registered in database'));
    5861  }
    5962}
Note: See TracChangeset for help on using the changeset viewer.