Exemplo n.º 1
0
 /**
  * @param CSocial $oSocial
  * @return string
  */
 public function UpdateSocial(CSocial $oSocial)
 {
     $aResult = api_AContainer::DbUpdateArray($oSocial, $this->oHelper);
     $sSql = 'UPDATE %sawm_social SET %s WHERE type_str = %s AND id_social = %s';
     return sprintf($sSql, $this->Prefix(), implode(', ', $aResult), $this->escapeString(strtolower($oSocial->TypeStr)), $oSocial->IdSocial);
 }
Exemplo n.º 2
0
 /**
  * @param CSubscription $oSubscription
  *
  * @return string
  */
 public function updateSubscription($oSubscription)
 {
     $aResult = api_AContainer::DbUpdateArray($oSubscription, $this->oHelper);
     $sSql = 'UPDATE %sawm_fetchers SET %s WHERE %s = %d AND %s = %d';
     return sprintf($sSql, $this->prefix(), implode(', ', $aResult), $this->escapeColumn('id_tenant'), $oSubscription->IdTenant, $this->escapeColumn('id_subscription'), $oSubscription->IdSubscription);
 }
Exemplo n.º 3
0
 /**
  * @param CTwofactorauth $oObject
  * @return string
  */
 public function UpdateAccount(\CTwofactorauth $oObject)
 {
     $aResult = api_AContainer::DbUpdateArray($oObject, $this->oHelper);
     $sSql = 'UPDATE %stwofa_accounts SET %s WHERE auth_type = %s AND account_id = %s';
     return sprintf($sSql, $this->prefix(), implode(', ', $aResult), $this->escapeString(strtolower($oObject->AuthType)), $oObject->AccountId);
 }
Exemplo n.º 4
0
 /**
  * @param CCalUser $oCalUser
  * @return string
  */
 public function UpdateCalUser(CCalUser $oCalUser)
 {
     $aResult = api_AContainer::DbUpdateArray($oCalUser, $this->oHelper);
     $sSql = 'UPDATE %sacal_users_data SET %s WHERE settings_id = %d';
     return sprintf($sSql, $this->Prefix(), implode(', ', $aResult), $oCalUser->IdCalUser);
 }
Exemplo n.º 5
0
 /**
  * @param CTenantSocials $oSocial
  *
  * @return bool
  */
 public function updateSocial(CTenantSocials $oSocial)
 {
     $aResult = api_AContainer::DbUpdateArray($oSocial, $this->oHelper);
     $sSql = 'UPDATE %sawm_tenant_socials SET %s WHERE id = %d';
     return sprintf($sSql, $this->prefix(), implode(', ', $aResult), $oSocial->Id);
 }
Exemplo n.º 6
0
 /**
  * @param CAccount $oAccount
  * @param CFetcher $oFetcher
  * @return string
  */
 public function updateFetcher($oAccount, $oFetcher)
 {
     $aResult = api_AContainer::DbUpdateArray($oFetcher, $this->oHelper);
     $sSql = 'UPDATE %sawm_fetchers SET %s WHERE %s = %d AND %s = %d';
     return sprintf($sSql, $this->prefix(), implode(', ', $aResult), $this->escapeColumn('id_acct'), $oAccount->IdAccount, $this->escapeColumn('id_fetcher'), $oFetcher->IdFetcher);
 }
Exemplo n.º 7
0
 /**
  * @param CHelpdeskUser $oHelpdeskUser
  * @param CHelpdeskThread $oHelpdeskThread
  * @return string
  */
 public function UpdateThread(CHelpdeskUser $oHelpdeskUser, CHelpdeskThread $oHelpdeskThread)
 {
     $aResult = api_AContainer::DbUpdateArray($oHelpdeskThread, $this->oHelper);
     $sSql = 'UPDATE %sahd_threads SET %s WHERE %s = %d AND %s = %d';
     return sprintf($sSql, $this->Prefix(), implode(', ', $aResult), $this->escapeColumn('id_tenant'), $oHelpdeskUser->IdTenant, $this->escapeColumn('id_helpdesk_thread'), $oHelpdeskThread->IdHelpdeskThread);
 }
Exemplo n.º 8
0
 /**
  * @param CGroup $oGroup
  * @return string
  */
 public function UpdateGroup($oGroup)
 {
     $sSql = 'UPDATE %sawm_addr_groups SET %s WHERE id_user = %d AND id_group = %d';
     return sprintf($sSql, $this->prefix(), implode(', ', api_AContainer::DbUpdateArray($oGroup, $this->oHelper)), $oGroup->IdUser, $oGroup->IdGroup);
 }
Exemplo n.º 9
0
 /**
  * @param CDomain $oDomain
  * @return string
  */
 public function UpdateDomain(CDomain $oDomain)
 {
     $aResult = api_AContainer::DbUpdateArray($oDomain, $this->oHelper);
     $sSql = 'UPDATE %sawm_domains SET %s WHERE id_domain = %d';
     return sprintf($sSql, $this->Prefix(), implode(', ', $aResult), $oDomain->IdDomain);
 }
Exemplo n.º 10
0
 /**
  * @param CTenant $oTenant
  *
  * @return string
  */
 function UpdateTenant(CTenant $oTenant)
 {
     $aResult = api_AContainer::DbUpdateArray($oTenant, $this->oHelper);
     $sSql = 'UPDATE %sawm_tenants SET %s WHERE id_tenant = %d';
     return sprintf($sSql, $this->Prefix(), implode(', ', $aResult), $oTenant->IdTenant);
 }