コード例 #1
0
ファイル: userref.php プロジェクト: johngrange/wookeyholeweb
 /**
  * Converts record to XML
  *
  * @param     boolean    $mapKeysToText    Map foreign keys to text values
  * @return    string                       Record in XML format
  */
 public function toXML($mapKeysToText = false)
 {
     $db = JFactory::getDbo();
     if ($mapKeysToText) {
         $query = 'SELECT name' . ' FROM #__users' . ' WHERE id = ' . (int) $this->user_id;
         $db->setQuery($query);
         $this->user_name = $db->loadResult();
     }
     return parent::toXML($mapKeysToText);
 }
コード例 #2
0
ファイル: content.php プロジェクト: NavaINT1876/ccustoms
 /**
  * Converts record to XML
  *
  * @param   boolean  $mapKeysToText  Map foreign keys to text values
  *
  * @return  string  Record in XML format
  *
  * @since   11.1
  * @deprecated  12.1
  * @codeCoverageIgnore
  */
 public function toXML($mapKeysToText = false)
 {
     // Deprecation warning.
     JLog::add('JTableContent::toXML() is deprecated.', JLog::WARNING, 'deprecated');
     if ($mapKeysToText) {
         // Get the JDatabaseQuery object
         $query = $this->_db->getQuery(true);
         $query->select($this->_db->quoteName('name'));
         $query->from($this->_db->quoteName('#__categories'));
         $query->where($this->_db->quoteName('id') . ' = ' . (int) $this->catid);
         $this->_db->setQuery($query);
         $this->catid = $this->_db->loadResult();
         $query->clear();
         $query->select($this->_db->quoteName('name'));
         $query->from($this->_db->quoteName('#__users'));
         $query->where($this->_db->quoteName('id') . ' = ' . (int) $this->created_by);
         $this->_db->setQuery($query);
         $this->created_by = $this->_db->loadResult();
     }
     return parent::toXML($mapKeysToText);
 }
コード例 #3
0
ファイル: content.php プロジェクト: omarmm/MangLuoiBDS
 /**
  * Converts record to XML
  * @param boolean Map foreign keys to text values
  */
 function toXML($mapKeysToText = false)
 {
     $db =& JFactory::getDBO();
     if ($mapKeysToText) {
         $query = 'SELECT name' . ' FROM #__sections' . ' WHERE id = ' . (int) $this->sectionid;
         $db->setQuery($query);
         $this->sectionid = $db->loadResult();
         $query = 'SELECT name' . ' FROM #__categories' . ' WHERE id = ' . (int) $this->catid;
         $db->setQuery($query);
         $this->catid = $db->loadResult();
         $query = 'SELECT name' . ' FROM #__users' . ' WHERE id = ' . (int) $this->created_by;
         $db->setQuery($query);
         $this->created_by = $db->loadResult();
     }
     return parent::toXML($mapKeysToText);
 }