CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Wrong example code?
Pages: [1]

Author Topic: Wrong example code?  (Read 310 times)

kenahoo

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.3.16
Wrong example code?
January 07, 2014, 08:25:17 pm
At the top of api/class.api.php, I see the following:

Code: [Select]
/**                                                                                                                     
 *                                                                                                                     
 * This class allows to consume the API, either from within a module that knows civicrm already:                       
 *                                                                                                                     
 * @code                                                                                                               
 *   require_once('api/class/api.php');                                                                                 
 *   $api = new civicrm_api3();                                                                                         
 * @endcode                                                                                                             

Is that path outdated?  There's no api/class/ directory, and I wonder if it means class.api.php instead of api.php.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Wrong example code?
January 08, 2014, 11:47:18 pm
Sounds about right :-), it should be class.api.php as far as I know
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

kenahoo

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.3.16
Re: Wrong example code?
January 09, 2014, 05:33:30 am
I submitted a pull request then:

https://github.com/civicrm/civicrm-core/pull/2318

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Wrong example code?

This forum was archived on 2017-11-26.