This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
from sys import argv | |
from os.path import exists | |
from os import makedirs | |
from os import symlink | |
import getopt | |
# | |
# Show Usage, Output to STDERR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PayplansAppMysqlPeter extends PayplansAppMysqlquery | |
{ | |
protected $_location = __FILE__; | |
public function onPayplansSubscriptionBeforeSave($prev, $new) | |
{ | |
if( | |
!($prev && $prev->getStatus() == PayplansStatus::SUBSCRIPTION_ACTIVE) // it was not a previously active subs | |
&& $new->getStatus() == PayplansStatus::SUBSCRIPTION_ACTIVE // we are activating it | |
&& $new->getOrder()->getParam('upgrading_from',0) // its a upgrade |
NewerOlder