<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/*
*
* Save the file as UpdateMembershipRecord.php prior to running this script.
*/
+
+/**
+ * Class CRM_UpdateMembershipRecord
+ */
class CRM_UpdateMembershipRecord {
- function __construct() {
+ /**
+ */
+ public function __construct() {
// you can run this program either from an apache command, or from the cli
if (php_sapi_name() == "cli") {
- require_once ("cli.php");
+ require_once "cli.php";
$cli = new civicrm_cli();
//if it doesn't die, it's authenticated
}
}
}
- function initialize() {
+ public function initialize() {
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';
require_once 'CRM/Member/BAO/Membership.php';
CRM_Member_BAO_Membership::updateAllMembershipStatus();
}
+
}
$obj = new CRM_UpdateMembershipRecord();
echo "\n Updating ";
$obj->updateMembershipStatus();
echo "\n\n Membership records updated. (Done) \n";
-