예제 #1
0
 /**
  * This function replaces a string identifier <var>$prefix</var> with the
  * string held is the <var>_table_prefix</var> class variable.
  *
  * @param   string    The SQL query
  * @param   string    The common table prefix
  *
  * @return  string
  */
 public function replacePrefix($sql, $prefix = '#__')
 {
     $app = JFactory::getApplication();
     $package = $app->getUserStateFromRequest('com_fabrik.package', 'package', 'fabrik', 'cmd');
     $sql = str_replace('{package}', $package, $sql);
     return parent::replacePrefix($sql, $prefix);
 }