コード例 #1
0
 public function find($id)
 {
     if (PERCH_RUNWAY) {
         return parent::find((int) $id);
     }
     return parent::find(1);
 }
コード例 #2
0
 function __construct($api = false)
 {
     $this->cache = array();
     parent::__construct($api);
     if (self::$preview_mode) {
         PerchBlog_Cache::disable();
     }
 }
コード例 #3
0
 function __construct($api = false)
 {
     $this->cache = array();
     parent::__construct($api);
     if (self::$preview_mode) {
         PerchBlog_Cache::disable();
     }
     if (!class_exists('PerchCategories_Categories')) {
         include_once PERCH_CORE . '/apps/categories/PerchCategories_Categories.class.php';
         include_once PERCH_CORE . '/apps/categories/PerchCategories_Category.class.php';
         include_once PERCH_CORE . '/apps/categories/PerchCategories_Sets.class.php';
         include_once PERCH_CORE . '/apps/categories/PerchCategories_Set.class.php';
     }
 }
コード例 #4
0
 /**
  * Insert a new log into the database, filtering sensitive information
  * and encoding data for storage.
  *
  * @param array $data
  * @return JwActivityLog_Action
  */
 public function create($data)
 {
     // Meta data
     $data['actionDateTime'] = date("Y-m-d H:i:s");
     $data['resourceUrl'] = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
     // Remove sensitive information
     if (isset($data['userAccountData']['userPassword'])) {
         unset($data['userAccountData']['userPassword']);
     }
     if (isset($data['userAccountData']['userHash'])) {
         unset($data['userAccountData']['userHash']);
     }
     // Encode for storage
     $data['userAccountData'] = PerchUtil::json_safe_encode($data['userAccountData']);
     return parent::create($data);
 }
 function __construct($api = false)
 {
     $this->cache = array();
     parent::__construct($api);
 }
コード例 #6
0
 function __construct($api = false)
 {
     $this->authenticator_path = PerchUtil::file_path(PERCH_PATH . '/addons/apps/perch_members/authenticators/');
     parent::__construct($api);
 }
コード例 #7
0
 /**
  * Insert a new record into the database
  *
  * @param array $data
  *
  * @return bool
  */
 public function create($data)
 {
     $data['addressUpdated'] = date('Y-m-d H:i:s');
     return parent::create($data);
 }