reverse merge rollback

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10714 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-05-17 02:38:33 +00:00
parent e3685a7bd8
commit 3afad81016
44 changed files with 333 additions and 742 deletions

View file

@ -4,7 +4,7 @@ if(!defined('__XE__')) exit();
/**
* @file member_communication.addon.php
* @author NHN (developers@xpressengine.com)
* @brief Promote user communication
* @brief Promote user communication
*
* - Pop-up the message if new message comes in
* - When calling MemberModel::getMemberMenu, feature to send a message is added
@ -46,7 +46,7 @@ if($called_position == 'before_module_init' && $this->module != 'member') {
$mid = Context::get('cur_mid');
// Creates communication model object
$oCommunicationModel = &getModel('communication');
// Add a feature to display own message box.
// Add a feature to display own message box.
if($logged_info->member_srl == $member_srl) {
// Add your own viewing Note Template
$oMemberController->addMemberPopupMenu(getUrl('','mid',$mid,'act','dispCommunicationMessages'), 'cmd_view_message_box', '', 'self');
@ -55,7 +55,7 @@ if($called_position == 'before_module_init' && $this->module != 'member') {
// If not, Add menus to send message and to add friends
} else {
// Get member information
$oMemberModel = &getModel('member');
$oMemberModel = &getModel('member');
$target_member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
if(!$target_member_info->member_srl) return;
// Get logged-in user information

View file

@ -6,19 +6,13 @@ window.xeNotifyMessage = function(text, count){
$bar = $('<div class="message info" />')
.hide()
.prependTo(document.body);
.css({
'position' : 'absolute',
'z-index' : '100',
})
.appendTo(document.body);
}
text = text.replace('%d', count);
h = $bar.html('<p><a href="'+current_url.setQuery('act','dispCommunicationMessages')+'">'+text+'</a></p>').height();
$bar.css('top', -h-4).show().animate({top:0});
$bar.show().animate({top:0});
// hide after 10 seconds
setTimeout(function(){
$bar.slideUp();
}, 5000);
}, 10000);
};
})(jQuery);

View file

@ -177,12 +177,6 @@
* @return list of supported db
**/
function _getSupportedList() {
static $get_supported_list = '';
if(is_array($get_supported_list)) {
$this->supported_list = $get_supported_list;
return $this->supported_list;
}
$get_supported_list = array();
$db_classes_path = _XE_PATH_."classes/db/";
$filter = "/^DB([^\.]+)\.class\.php/i";
$supported_list = FileHandler::readDir($db_classes_path, $filter, true);
@ -209,9 +203,9 @@
$obj->db_type = $db_type;
$obj->enable = $oDB->isSupported() ? true : false;
$get_supported_list[] = $obj;
$this->supported_list[] = $obj;
}
$this->supported_list = $get_supported_list;
return $this->supported_list;
}
@ -338,7 +332,6 @@
* @remarks this function finds xml file or cache file of $query_id, compiles it and then execute it
**/
function executeQuery($query_id, $args = NULL, $arg_columns = NULL) {
static $cache_file = array();
if(!$query_id) return new Object(-1, 'msg_invalid_queryid');
if(!$this->db_type) return;
@ -346,40 +339,38 @@
$this->query_id = $query_id;
if(!isset($cache_file[$query_id])) {
$id_args = explode('.', $query_id);
if(count($id_args) == 2) {
$target = 'modules';
$module = $id_args[0];
$id = $id_args[1];
} elseif(count($id_args) == 3) {
$target = $id_args[0];
if(!in_array($target, array('addons','widgets'))){
$this->actDBClassFinish();
return;
}
$module = $id_args[1];
$id = $id_args[2];
}
if(!$target || !$module || !$id){
$this->actDBClassFinish();
return new Object(-1, 'msg_invalid_queryid');
}
$id_args = explode('.', $query_id);
if(count($id_args) == 2) {
$target = 'modules';
$module = $id_args[0];
$id = $id_args[1];
} elseif(count($id_args) == 3) {
$target = $id_args[0];
if(!in_array($target, array('addons','widgets'))){
$this->actDBClassFinish();
return;
}
$module = $id_args[1];
$id = $id_args[2];
}
if(!$target || !$module || !$id){
$this->actDBClassFinish();
return new Object(-1, 'msg_invalid_queryid');
}
$xml_file = sprintf('%s%s/%s/queries/%s.xml', _XE_PATH_, $target, $module, $id);
if(!file_exists($xml_file)){
$this->actDBClassFinish();
return new Object(-1, 'msg_invalid_queryid');
}
$xml_file = sprintf('%s%s/%s/queries/%s.xml', _XE_PATH_, $target, $module, $id);
if(!file_exists($xml_file)){
$this->actDBClassFinish();
return new Object(-1, 'msg_invalid_queryid');
}
// look for cache file
$cache_file[$query_id] = $this->checkQueryCacheFile($query_id, $xml_file);
}
$result = $this->_executeQuery($cache_file[$query_id], $args, $query_id, $arg_columns);
// look for cache file
$cache_file = $this->checkQueryCacheFile($query_id, $xml_file);
$result = $this->_executeQuery($cache_file, $args, $query_id, $arg_columns);
$this->actDBClassFinish();
// execute query
return $result;
$this->actDBClassFinish();
// execute query
return $result;
}
@ -390,6 +381,7 @@
* @return cache file
**/
function checkQueryCacheFile($query_id,$xml_file){
// first try finding cache file
$cache_file = sprintf('%s%s%s.%s.%s.cache.php', _XE_PATH_, $this->cache_file, $query_id, __ZBXE_VERSION__, $this->db_type);
@ -428,7 +420,6 @@
// execute appropriate query
switch($output->getAction()) {
case 'insert' :
case 'insert-select' :
$this->resetCountCache($output->tables);
$output = $this->_executeInsertAct($output);
break;
@ -854,4 +845,4 @@
}
}
?>
?>

View file

@ -834,8 +834,9 @@
return $buff;
}
function getParser($force = FALSE){
return new DBParser('"', '"', $this->prefix);
function &getParser($force = FALSE){
$dbParser = new DBParser('"', '"', $this->prefix);
return $dbParser;
}
function getSelectPageSql($query, $with_values = true, $start_count = 0, $list_count = 0) {

View file

@ -540,8 +540,9 @@
else return $this->queryPageLimit($queryObject, $result, $connection);
}
function getParser($force = FALSE){
return new DBParser("[", "]", $this->prefix);
function &getParser($force = FALSE){
$dbParser = new DBParser("[", "]", $this->prefix);
return $dbParser;
}
function queryError($queryObject){
@ -614,7 +615,7 @@
$buff->page_navigation = new PageHandler($total_count, $total_page, $page, $page_count);
return $buff;
}
$start_count = ($page - 1) * $list_count;
$this->param = $queryObject->getArguments();
$virtual_no = $total_count - $start_count;

View file

@ -317,20 +317,9 @@ class DBMysql extends DB {
if(!is_array($xml_obj->table->column)) $columns[] = $xml_obj->table->column;
else $columns = $xml_obj->table->column;
$primary_list = array();
$unique_list = array();
$index_list = array();
foreach($columns as $column) {
$name = $column->attrs->name;
$type = $column->attrs->type;
$size = $column->attrs->size;
$notnull = $column->attrs->notnull;
$primary_key = $column->attrs->primary_key;
$index = $column->attrs->index;
$unique = $column->attrs->unique;
$default = $column->attrs->default;
$auto_increment = $column->attrs->auto_increment;
$primary_list = array();
$unique_list = array();
$index_list = array();
foreach($columns as $column) {
$name = $column->attrs->name;
@ -379,22 +368,14 @@ class DBMysql extends DB {
if(!$output) return false;
}
/**
* @brief Handle selectAct
*
* In order to get a list of pages easily when selecting \n
* it supports a method as navigation
**/
function _executeSelectAct($queryObject, $connection = null, $with_values = true) {
$limit = $queryObject->getLimit();
$result = NULL;
if ($limit && $limit->isPageHandler())
return $this->queryPageLimit($queryObject, $result, $connection, $with_values);
else {
$query = $this->getSelectSql($queryObject, $with_values);
if (is_a($query, 'Object'))
return;
$query .= (__DEBUG_QUERY__ & 1 && $queryObject->query_id) ? sprintf(' ' . $this->comment_syntax, $this->query_id) : '';
/**
* @brief Handle the insertAct
**/
function _executeInsertAct($queryObject, $with_values = true) {
$query = $this->getInsertSql($queryObject, $with_values, true);
if(is_a($query, 'Object')) return;
return $this->_query($query);
}
/**
* @brief Handle updateAct
@ -448,41 +429,33 @@ class DBMysql extends DB {
return mysql_insert_id($connection);
}
function getParser($force = FALSE){
return new DBParser('`', '`', $this->prefix);
}
function db_fetch_object(&$result)
{
return mysql_fetch_object($result);
}
function db_fetch_object(&$result)
{
return mysql_fetch_object($result);
}
function db_free_result(&$result){
return mysql_free_result($result);
}
function queryPageLimit($queryObject, $result, $connection, $with_values = true){
$limit = $queryObject->getLimit();
// Total count
$temp_where = $queryObject->getWhereString($with_values, false);
$count_query = sprintf('select count(*) as "count" %s %s', 'FROM ' . $queryObject->getFromString($with_values), ($temp_where === '' ? '' : ' WHERE '. $temp_where));
// Check for distinct query and if found update count query structure
$temp_select = $queryObject->getSelectString($with_values);
$uses_distinct = false;
if(strpos(strtolower($temp_select), "distinct") !== false) {
$count_query = sprintf('select %s %s %s', 'FROM ' . $queryObject->getFromString($with_values), $temp_select, ($temp_where === '' ? '' : ' WHERE '. $temp_where));
$uses_distinct = true;
}
// If query uses grouping or distinct, count from original select
if ($queryObject->getGroupByString() != '' || $uses_distinct) {
$count_query = sprintf('select count(*) as "count" from (%s) xet', $count_query);
}
function &getParser($force = FALSE){
$dbParser = new DBParser('`', '`', $this->prefix);
return $dbParser;
}
$count_query .= (__DEBUG_QUERY__&1 && $queryObject->query_id)?sprintf (' '.$this->comment_syntax, $this->query_id):'';
$result_count = $this->_query($count_query, $connection);
$count_output = $this->_fetch($result_count);
$total_count = (int)(isset($count_output->count) ? $count_output->count : NULL);
function queryError($queryObject){
$limit = $queryObject->getLimit();
if ($limit && $limit->isPageHandler()){
$buff = new Object ();
$buff->total_count = 0;
$buff->total_page = 0;
$buff->page = 1;
$buff->data = array ();
$buff->page_navigation = new PageHandler (/*$total_count*/0, /*$total_page*/1, /*$page*/1, /*$page_count*/10);//default page handler values
return $buff;
}else
return;
}
function queryPageLimit($queryObject, $result, $connection, $with_values = true){
$limit = $queryObject->getLimit();

View file

@ -1,4 +1,3 @@
<<<<<<< .working
<?php
class Query extends Object {
@ -94,65 +93,6 @@
$this->tables = $tables;
}
=======
<?php
class Query extends Object {
var $queryID;
var $action;
var $priority;
var $columns;
var $tables;
var $conditions;
var $groups;
var $orderby;
var $limit;
var $arguments = null;
var $columnList = null;
var $_orderByString;
function Query($queryID = null
, $action = null
, $columns = null
, $tables = null
, $conditions = null
, $groups = null
, $orderby = null
, $limit = null
, $priority = null){
$this->queryID = $queryID;
$this->action = $action;
$this->priority = $priority;
if(!isset($tables)) return;
$this->columns = $this->setColumns($columns);
$this->tables = $this->setTables($tables);
$this->conditions = $this->setConditions($conditions);
$this->groups = $this->setGroups($groups);
$this->orderby = $this->setOrder($orderby);
$this->limit = $this->setLimit($limit);
}
function show(){
return true;
}
function setQueryId($queryID){
$this->queryID = $queryID;
}
function setAction($action){
$this->action = $action;
}
>>>>>>> .merge-right.r10563
function setSubquery($subquery){
$this->subquery = $subquery;
}
function setConditions($conditions){
$this->conditions = array();
@ -246,21 +186,6 @@
function getInsertString($with_values = true){
$columnsList = '';
if($this->subquery){ // means we have insert-select
foreach($this->columns as $column){
$columnsList .= $column->getColumnName() . ', ';
}
$columnsList = substr($columnsList, 0, -2);
$selectStatement = $this->subquery->toString($with_values);
$selectStatement = substr($selectStatement, 1, -1);
return "($columnsList) \n $selectStatement";
}
<<<<<<< .working
$valuesList = '';
foreach($this->columns as $column){
if($column->show()){
@ -416,159 +341,3 @@
?>
=======
$valuesList = '';
foreach($this->columns as $column){
if($column->show()){
$columnsList .= $column->getColumnName() . ', ';
$valuesList .= $column->getValue($with_values) . ', ';
}
}
$columnsList = substr($columnsList, 0, -2);
$valuesList = substr($valuesList, 0, -2);
return "($columnsList) \n VALUES ($valuesList)";
}
function getTables(){
return $this->tables;
}
// from table_a
// from table_a inner join table_b on x=y
// from (select * from table a) as x
// from (select * from table t) as x inner join table y on y.x
function getFromString($with_values = true){
$from = '';
$simple_table_count = 0;
foreach($this->tables as $table){
if($table->isJoinTable() || !$simple_table_count) $from .= $table->toString($with_values) . ' ';
else $from .= ', '.$table->toString($with_values) . ' ';
if(is_a($table, 'Subquery')) $from .= $table->getAlias() ? ' as ' . $table->getAlias() . ' ' : ' ';
$simple_table_count++;
}
if(trim($from) == '') return '';
return $from;
}
function getWhereString($with_values = true, $with_optimization = true){
$where = '';
$condition_count = 0;
foreach ($this->conditions as $conditionGroup) {
if ($condition_count === 0) {
$conditionGroup->setPipe("");
}
$condition_string = $conditionGroup->toString($with_values);
$where .= $condition_string;
$condition_count++;
}
if ($with_optimization &&
(strstr($this->getOrderByString(), 'list_order') || strstr($this->getOrderByString(), 'update_order'))) {
if ($condition_count !== 0)
$where = '(' . $where . ') ';
foreach ($this->orderby as $order) {
$colName = $order->getColumnName();
if (strstr($colName, 'list_order') || strstr($colName, 'update_order')) {
$opt_condition = new ConditionWithoutArgument($colName, 2100000000, 'less', 'and');
if ($condition_count === 0)
$opt_condition->setPipe("");
$where .= $opt_condition->toString($with_values) . ' ';
$condition_count++;
}
}
}
return trim($where);
}
function getGroupByString(){
$groupBy = '';
if($this->groups) if($this->groups[0] !== "")
$groupBy = implode(', ', $this->groups);
return $groupBy;
}
function getOrderByString(){
if(!$this->_orderByString){
if(count($this->orderby) === 0) return '';
$orderBy = '';
foreach($this->orderby as $order){
$orderBy .= $order->toString() .', ';
}
$orderBy = substr($orderBy, 0, -2);
$this->_orderByString = $orderBy;
}
return $this->_orderByString;
}
function getLimit(){
return $this->limit;
}
function getLimitString(){
$limit = '';
if(count($this->limit) > 0){
$limit = '';
$limit .= $this->limit->toString();
}
return $limit;
}
function getFirstTableName(){
return $this->tables[0]->getName();
}
function getArguments(){
if(!isset($this->arguments)){
$this->arguments = array();
// Join table arguments
if(count($this->tables) > 0)
{
foreach($this->tables as $table)
{
if($table->isJoinTable())
{
$args = $table->getArguments();
if($args) $this->arguments = array_merge($this->arguments, $args);
}
}
}
// Column arguments
if(count($this->columns) > 0){ // The if is for delete statements, all others must have columns
foreach($this->columns as $column){
if($column->show()){
$args = $column->getArguments();
if($args) $this->arguments = array_merge($this->arguments, $args);
}
}
}
// Condition arguments
if(count($this->conditions) > 0)
foreach($this->conditions as $conditionGroup){
$args = $conditionGroup->getArguments();
if(count($args) > 0) $this->arguments = array_merge($this->arguments, $args);
}
// Navigation arguments
if(count($this->orderby) > 0)
foreach($this->orderby as $order){
$args = $order->getArguments();
if(count($args) > 0) $this->arguments = array_merge($this->arguments, $args);
}
}
return $this->arguments;
}
}
?>>>>>>>> .merge-right.r10563

View file

@ -35,11 +35,11 @@
function getArgument(){
return null;
}
function getArguments(){
return array();
}
}
?>
?>

View file

@ -70,8 +70,6 @@
$map = &$this->cssMap;
$mapIndex = &$this->cssMapIndex;
$key = $file->filePath . $file->fileName . "\t" . $file->targetIe . "\t" . $file->media;
$this->_arrangeCssIndex($pathInfo['dirname'], $file);
}
else if ($file->fileExtension == 'js')
{
@ -267,18 +265,4 @@
return $path;
}
private function _arrangeCssIndex($dirName, $file)
{
if($file->index !== 0)
{
return;
}
$dirName = str_replace('./', '', $dirName);
$tmp = explode('/', $dirName);
$cssSortList = array('common'=>-100000, 'layouts'=>-90000, 'modules'=>-80000, 'widgets'=>-70000, 'addons'=>-60000);
$file->index = $cssSortList[$tmp[0]];
}
}

View file

@ -617,21 +617,10 @@
$kind = strtolower($kind);
$type = strtolower($type);
$kinds = explode(' ', 'svc admin');
if(!in_array($kind, $kinds)) $kind = $kinds[0];
$kinds = explode(' ', 'svc admin');
if(!in_array($kind, $kinds)) $kind = $kinds[0];
$key = $module.'.'.($kind!='admin'?'':'admin').'.'.$type;
if(is_array($GLOBALS['__MODULE_EXTEND__']) && array_key_exists($key, $GLOBALS['__MODULE_EXTEND__']))
{
$module = $extend_module = $GLOBALS['__MODULE_EXTEND__'][$key];
}
// if there is no instance of the module in global variable, create a new one
if(!isset($GLOBALS['_loaded_module'][$module][$type][$kind]))
{
$parent_module = $module;
$key = $module.'.'.($kind!='admin'?'':'admin').'.'.$type;
if(is_array($GLOBALS['__MODULE_EXTEND__']) && array_key_exists($key, $GLOBALS['__MODULE_EXTEND__'])) {
$module = $extend_module = $GLOBALS['__MODULE_EXTEND__'][$key];

View file

@ -396,7 +396,7 @@ class TemplateHandler {
}
if(strpos($node, '|cond="') !== false) {
$node = preg_replace('@(\s[-\w:]+="[^"]+?")\|cond="(.+?)"@s', '<?php if($2){ ?>$1<?php } ?>', $node);
$node = preg_replace('@(\s[\w:\-]+="[^"]+?")\|cond="(.+?)"@s', '<?php if($2){ ?>$1<?php } ?>', $node);
$node = $this->_replaceVar($node);
}

View file

@ -21,7 +21,6 @@
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/ColumnTag.class.php');
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/SelectColumnTag.class.php');
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/InsertColumnTag.class.php');
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php');
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php');
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php');
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php');
@ -69,14 +68,14 @@
// Write query cache file
$parser = new QueryParser($xml_obj->query);
FileHandler::writeFile($cache_file, $parser->toString());
FileHandler::writeFile($cache_file, $parser->toString());
return $parser;
}
function parse($query_id = NULL, $xml_file = NULL, $cache_file = NULL)
{
$this->parse_xml_query($query_id, $xml_file, $cache_file);
$query_parser = &$this->parse_xml_query($query_id, $xml_file, $cache_file);
}
function getXmlFileContent($xml_file){

View file

@ -11,8 +11,8 @@
function getTableInfo($query_id, $table_name) {
$column_type = array();
$module = '';
$module = '';
$id_args = explode('.', $query_id);
if (count($id_args) == 2) {
$target = 'modules';

View file

@ -1,26 +0,0 @@
<?php
/**
* @class InsertColumnTagWithoutArgument
* @author Arnia Software
* @brief Models the <column> tag inside an XML Query file whose action is 'insert-select'
*
**/
class InsertColumnTagWithoutArgument extends ColumnTag {
function InsertColumnTagWithoutArgument($column) {
parent::ColumnTag($column->attrs->name);
$dbParser = DB::getParser();
$this->name = $dbParser->parseColumnName($this->name);
}
function getExpressionString(){
return sprintf('new Expression(\'%s\')', $this->name);
}
function getArgument(){
return null;
}
}
?>

View file

@ -19,7 +19,6 @@
foreach($xml_columns as $column){
if($column->name === 'query') $this->columns[] = new QueryTag($column, true);
else if(!isset($column->attrs->var) && !isset($column->attrs->default)) $this->columns[] = new InsertColumnTagWithoutArgument($column);
else $this->columns[] = new InsertColumnTag($column);
}
}

View file

@ -19,22 +19,19 @@
}
else
{
parent::ColumnTag($column->attrs->name);
$dbParser = DB::getParser();
parent::ColumnTag($column->attrs->name);
$dbParser = new DB(); $dbParser = &$dbParser->getParser();
$this->name = $dbParser->parseExpression($this->name);
$this->alias = $column->attrs->alias;
$this->click_count = $column->attrs->click_count;
}
}
}
function getExpressionString(){
if($this->name == '*') return "new StarExpression()";
if($this->click_count)
return sprintf('new ClickCountExpression(%s, %s, $args->%s)', $this->name, $this->alias,$this->click_count);
if(strpos($this->name, '$') === 0)
return sprintf('new SelectExpression($args->%s)', substr($this->name, 1));
$dbParser = DB::getParser();
return sprintf('new SelectExpression(\'%s\'%s)', $this->name, $this->alias ? ', \''.$dbParser->escape($this->alias) .'\'': '');
}

View file

@ -10,7 +10,6 @@ class QueryTag {
//xml tags
var $columns;
var $tables;
var $subquery;
var $conditions;
var $groups;
var $navigation;
@ -38,12 +37,9 @@ class QueryTag {
$this->getColumns();
$tables = $this->getTables();
$this->setTableColumnTypes($tables);
$this->getSubquery(); // Used for insert-select
$this->getConditions();
$this->getGroups();
$this->getNavigation();
$this->getPrebuff();
$this->getBuff();
}
@ -81,20 +77,19 @@ class QueryTag {
}
}
function getColumns(){
if($this->action == 'select'){
return $this->columns = new SelectColumnsTag($this->query->columns);
}else if($this->action == 'insert' || $this->action == 'insert-select'){
return $this->columns = new InsertColumnsTag($this->query->columns->column);
}else if($this->action == 'update') {
return $this->columns = new UpdateColumnsTag($this->query->columns->column);
}else if($this->action == 'delete') {
return $this->columns = null;
function getColumns() {
if ($this->action == 'select') {
return $this->columns = new SelectColumnsTag($this->query->columns);
} else if ($this->action == 'insert') {
return $this->columns = new InsertColumnsTag($this->query->columns->column);
} else if ($this->action == 'update') {
return $this->columns = new UpdateColumnsTag($this->query->columns->column);
} else if ($this->action == 'delete') {
return $this->columns = null;
}
}
function getPrebuff() {
if($this->isSubQuery) return;
// TODO Check if this work with arguments in join clause
$arguments = $this->getArguments();
@ -164,32 +159,24 @@ class QueryTag {
if ($this->columns)
$buff .= '$query->setColumns(' . $this->columns->toString() . ');' . PHP_EOL;
$buff .= '$query->setTables(' . $this->tables->toString() .');'.PHP_EOL;
if($this->action == 'insert-select')
$buff .= '$query->setSubquery(' . $this->subquery->toString() .');'.PHP_EOL;
$buff .= '$query->setConditions('.$this->conditions->toString() .');'.PHP_EOL;
$buff .= '$query->setGroups(' . $this->groups->toString() . ');'.PHP_EOL;
$buff .= '$query->setOrder(' . $this->navigation->getOrderByString() .');'.PHP_EOL;
$buff .= '$query->setLimit(' . $this->navigation->getLimitString() .');'.PHP_EOL;
$buff .= '$query->setTables(' . $this->tables->toString() . ');' . PHP_EOL;
$buff .= '$query->setConditions(' . $this->conditions->toString() . ');' . PHP_EOL;
$buff .= '$query->setGroups(' . $this->groups->toString() . ');' . PHP_EOL;
$buff .= '$query->setOrder(' . $this->navigation->getOrderByString() . ');' . PHP_EOL;
$buff .= '$query->setLimit(' . $this->navigation->getLimitString() . ');' . PHP_EOL;
$this->buff = $buff;
return $this->buff;
}
function getTables(){
function getTables() {
if($this->query->index_hint && ($this->query->index_hint->attrs->for == 'ALL' || Context::getDBType() == strtolower($this->query->index_hint->attrs->for)))
return $this->tables = new TablesTag($this->query->tables, $this->query->index_hint);
else
return $this->tables = new TablesTag($this->query->tables);
}
function getSubquery(){
if($this->query->query){
$this->subquery = new QueryTag($this->query->query, true);
}
}
function getConditions(){
function getConditions() {
return $this->conditions = new ConditionsTag($this->query->conditions);
}
@ -220,13 +207,11 @@ class QueryTag {
return $this->buff;
}
function getArguments(){
function getArguments() {
$arguments = array();
if ($this->columns)
$arguments = array_merge($arguments, $this->columns->getArguments());
if($this->action =='insert-select')
$arguments = array_merge($arguments, $this->subquery->getArguments());
$arguments = array_merge($arguments, $this->tables->getArguments());
$arguments = array_merge($arguments, $this->tables->getArguments());
$arguments = array_merge($arguments, $this->conditions->getArguments());
$arguments = array_merge($arguments, $this->navigation->getArguments());
return $arguments;

View file

@ -42,7 +42,7 @@
$this->tables[] = new QueryTag($tag, true);
}
else {
if(isset($indexes[$tag->attrs->name]) && $indexes[$tag->attrs->name])
if(isset($indexes) && $indexes && isset($indexes[$tag->attrs->name]))
$this->tables[] = new HintTableTag($tag, $indexes[$tag->attrs->name]);
else
$this->tables[] = new TableTag($tag);

View file

@ -7,6 +7,6 @@ fr,Français
de,Deutsch
ru,Русский
es,Español
tr,Türkçe
tr,Turkçe
vi,Tiếng Việt
mn,Mongolian

View file

@ -3002,10 +3002,6 @@ Xin vui lòng kiểm tra lại thông tin Database.]]></value>
<value xml:lang="zh-TW"><![CDATA[註冊失敗。]]></value>
<value xml:lang="de"><![CDATA[Misserfolg der Registrierung]]></value>
</item>
<item name="fail_to_update">
<value xml:lang="ko"><![CDATA[수정하지 못했습니다.]]></value>
<value xml:lang="en"><![CDATA[Fail to update.]]></value>
</item>
<item name="fail_to_delete">
<value xml:lang="ko"><![CDATA[삭제 실패했습니다.]]></value>
<value xml:lang="en"><![CDATA[Failed to delete.]]></value>

View file

@ -43,20 +43,20 @@
{Context::getHtmlHeader()}
</head>
<body{Context::getBodyClass()}>
<script type="text/javascript"|cond="$db_info->use_html5!='Y'">
//<![CDATA[
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
<script type="text/javascript"|cond="$db_info->use_html5!='Y'">
//<![CDATA[
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
<block cond="$vid">var xeVid = "{$vid}";</block>
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<block cond="count($ssl_actions)">"{implode('","',$ssl_actions)}"</block>);
var default_url = "{Context::getDefaultUrl()}";
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<block cond="count($ssl_actions)">"{implode('","',$ssl_actions)}"</block>);
var default_url = "{Context::getDefaultUrl()}";
<block cond="Context::get('_http_port')">var http_port = {Context::get("_http_port")};</block>
<block cond="Context::get('_https_port')">var https_port = {Context::get("_https_port")};</block>
<block cond="Context::get('_use_ssl') && Context::get('_use_ssl') == 'always'">var enforce_ssl = true;</block>
//]]>
</script>
//]]>
</script>
{Context::getBodyHeader()}

View file

@ -1,37 +1,33 @@
{@
$db_info = Context::getDBInfo();
$lang_type = Context::getLangType();
}
<!--@if($db_info->use_html5=='Y')-->
<!DOCTYPE html>
<!--@else-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--@end-->
<html lang="{$lang_type}" xmlns="http://www.w3.org/1999/xhtml"|cond="$db_info->use_html5!='Y'">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{Context::getLangType()}" xml:lang="{Context::getLangType()}">
<head>
{@$css_files=Context::getCssFile()}
{@$js_files=Context::getJsFile()}
<!-- META -->
<meta charset="UTF-8" cond="$db_info->use_html5=='Y'"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" cond="$db_info->use_html5!='Y'" />
<meta name="Generator" content="XpressEngine" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=2, user-scalable=yes, target-densitydpi=medium-dpi" />
<!-- TITLE -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=yes, target-densitydpi=medium-dpi" />
<title>{Context::getBrowserTitle()}</title>
<!-- CSS -->
<block loop="$css_files=>$key,$css_file">
<block cond="$css_file['targetie']"><!--[if {$css_file['targetie']}]></block>
<link rel="stylesheet" href="{$css_file['file']}" type="text/css"|cond="$db_info->use_html5!='Y'" media="{$css_file['media']}" />
<block cond="$css_file['targetie']"><![endif]--></block>
</block>
<!-- JS -->
<block loop="$js_files=>$key,$js_file">
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]></block>
<script type="text/javascript"|cond="$db_info->use_html5!='Y'" src="{$js_file['file']}"></script>
<block cond="$js_file['targetie']"><![endif]--></block>
</block>
<!-- RSS -->
{@ $css_files = Context::getCssFile() }
<!--@foreach($css_files as $key => $css_file)-->
<!--@if($css_file['targetie'])-->
<!--[if {$css_file['targetie']}]>
<!--@end-->
<link rel="stylesheet" href="{$css_file['file']}" type="text/css" charset="UTF-8" media="{$css_file['media']}" />
<!--@if($css_file['targetie'])-->
<![endif]-->
<!--@end-->
<!--@end-->
{@ $js_files = Context::getJsFile() }
<!--@foreach($js_files as $key => $js_file)-->
<!--@if($js_file['targetie'])-->
<!--[if {$js_file['targetie']}]>
<!--@end-->
<script type="text/javascript" src="{$js_file['file']}"></script>
<!--@if($js_file['targetie'])-->
<![endif]-->
<!--@end-->
<!--@end-->
<!--@if($rss_url)-->
<link rel="alternate" type="application/rss+xml" title="RSS" href="{$rss_url}" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="{$atom_url}" />
@ -40,22 +36,25 @@
<link rel="alternate" type="application/rss+xml" title="Site RSS" href="{$general_rss_url}" />
<link rel="alternate" type="application/atom+xml" title="Site Atom" href="{$general_atom_url}" />
<!--@end-->
<!-- ICON -->
<link cond="$favicon_url" rel="shortcut icon" href="{$favicon_url}" />
<link cond="$mobicon_url" rel="apple-touch-icon" href="{$mobicon_url}" />
<!--[if lt IE 9]>
<script type="text/javascript" src="../js/html5.js" cond="$db_info->use_html5=='Y'"></script>
<![endif]-->
{@ $ssl_actions = Context::getSSLActions() }
<script type="text/javascript"|cond="$db_info->use_html5!='Y'">//<![CDATA[
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
<script type="text/javascript">//<![CDATA[
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
<!--@if($vid)-->var xeVid = "{$vid}";<!--@end-->
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<!--@if(count($ssl_actions))-->"{implode('","',$ssl_actions)}"<!--@end-->);
var default_url = "{Context::getDefaultUrl()}";
<!--@if(Context::get("_http_port"))-->var http_port = {Context::get("_http_port")};<!--@end-->
<!--@if(Context::get("_https_port"))-->var https_port = {Context::get("_https_port")};<!--@end-->
<!--@if(Context::get("_use_ssl") && Context::get("_use_ssl") == "always")-->var enforce_ssl = true;<!--@end-->
//]]></script>
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<!--@if(count($ssl_actions))-->"{implode('","',$ssl_actions)}"<!--@end-->);
var default_url = "{Context::getDefaultUrl()}";
<!--@if(Context::get("_http_port"))-->var http_port = {Context::get("_http_port")};<!--@end-->
<!--@if(Context::get("_https_port"))-->var https_port = {Context::get("_https_port")};<!--@end-->
<!--@if(Context::get("_use_ssl") && Context::get("_use_ssl") == "always")-->var enforce_ssl = true;<!--@end-->
//]]></script>
{Context::getHtmlHeader()}
</head>
<body{Context::getBodyClass()}>
@ -66,11 +65,14 @@
{Context::getHtmlFooter()}
{@ $js_body_files = Context::getJsFile('body') }
<block loop="$js_body_files => $key, $js_file">
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]></block>
<script type="text/javascript"|cond="$db_info->use_html5!='Y'" src="{$js_file['file']}"></script>
<block cond="$js_file['targetie']"><![endif]--></block>
</block>
<!--@foreach($js_body_files as $key => $js_file)-->
<!--@if($js_file['targetie'])-->
<!--[if {$js_file['targetie']}]>
<!--@end-->
<script type="text/javascript" src="{$js_file['file']}"></script>
<!--@if($js_file['targetie'])-->
<![endif]-->
<!--@end-->
<!--@end-->
</body>
</html>

View file

@ -66,9 +66,9 @@
'+0600' => '[GMT +06:00] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time',
'+0630' => '[GMT +06:30] Cocos Islands Time, Myanmar Time',
'+0700' => '[GMT +07:00] Indochina Time, Krasnoyarsk Standard Time',
'+0800' => '[GMT +08:00] China Standard Time, Australian Western Standard Time, Irkutsk Standard Time',
'+0800' => '[GMT +08:00] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time',
'+0845' => '[GMT +08:45] Southeastern Western Australia Standard Time',
'+0900' => '[GMT +09:00] Korea Standard Time, Japan Standard Time',
'+0900' => '[GMT +09:00] Korea Standard Time, Japan Standard Time, China Standard Time',
'+0930' => '[GMT +09:30] Australian Central Standard Time',
'+1000' => '[GMT +10:00] Australian Eastern Standard Time, Vladivostok Standard Time',
'+1030' => '[GMT +10:30] Lord Howe Standard Time',

View file

@ -11,7 +11,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
<h1 class="h1">{$lang->comment}</h1>
<div class="table even">
<div class="cnb">
<a href="{getUrl('act','dispCommentAdminList', 'search_target','', 'search_keyword', '')}" <!--@if($search_keyword == '')-->class="active"<!--@end-->>{$lang->all}</a>
<a href="{getUrl('search_keyword','','act','dispCommentAdminList', 'Y')}" <!--@if($search_keyword == '')-->class="active"<!--@end-->>{$lang->all}</a>
| <a href="{getUrl('search_target','is_secret','search_keyword', 'N')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'N')-->class="active"<!--@end-->>{$secret_name_list['N']}</a>
| <a href="{getUrl('search_target','is_secret','search_keyword', 'Y')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'Y')-->class="active"<!--@end-->>{$secret_name_list['Y']}</a>
| <a href="{getUrl('search_target','is_published','search_keyword', 'N')}" <!--@if($search_target == 'is_published' && $search_keyword == 'N')-->class="active"<!--@end-->>{$lang->published_name_list['N']}</a>

View file

@ -325,12 +325,10 @@
$logged_info = Context::get('logged_info');
$member_srl = $logged_info->member_srl;
// Check variables
$friend_srl_list = Context::get('friend_srl_list');
$friend_srl_list = trim(Context::get('friend_srl_list'));
if(!$friend_srl_list) return new Object(-1, 'msg_cart_is_null');
if(!is_array($friend_srl_list))
{
$friend_srl_list = explode('|@|', $friend_srl_list);
}
$friend_srl_list = explode('|@|', $friend_srl_list);
if(!count($friend_srl_list)) return new Object(-1, 'msg_cart_is_null');
$friend_count = count($friend_srl_list);

View file

@ -37,7 +37,7 @@
<th>{$lang->friend_group}</th>
<th>{$lang->nick_name}</th>
<th>{$lang->regdate}</th>
<th><input name="check_all" type="checkbox" onclick="XE.checkboxToggleAll('friend_srl_list[]', { wrap:'fo_friend_list' });" /></th>
<th><input name="check_all" type="checkbox" onclick="XE.checkboxToggleAll('friend_srl_list', { wrap:'fo_friend_list' });" /></th>
</tr>
</thead>
<tbody>
@ -45,7 +45,7 @@
<td>{$val->group_title?$val->group_title:"&nbsp;"}</td>
<td><a href="#popup_menu_area" class="member_{$val->target_srl}">{$val->nick_name}</a></td>
<td>{zdate($val->regdate,"Y-m-d")}</td>
<td><input type="checkbox" name="friend_srl_list[]" value="{$val->friend_srl}" /></td>
<td><input type="checkbox" name="friend_srl_list" value="{$val->friend_srl}" /></td>
</tr>
</tbody>
</table>

View file

@ -60,7 +60,7 @@
</th>
<th scope="col">{$lang->regdate}</th>
<th scope="col">{$lang->readed_date}</th>
<th scope="col"><input name="check_all" type="checkbox" onclick="XE.checkboxToggleAll('message_srl_list[]', { wrap:'fo_message_list' });" /></th>
<th scope="col"><input name="check_all" type="checkbox" onclick="XE.checkboxToggleAll('message_srl_list[]', { wrap:'fo_message_list' }); return false;" /></th>
</tr>
</thead>
<tbody>

View file

@ -104,11 +104,10 @@
function getDocument($document_srl=0, $is_admin = false, $load_extra_vars=true, $columnList = array()) {
if(!$document_srl) return new documentItem();
if(!isset($GLOBALS['XE_DOCUMENT_LIST'][$document_srl]) || $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->columnListKey != serialize($columnList)) {
if(!isset($GLOBALS['XE_DOCUMENT_LIST'][$document_srl])) {
$oDocument = new documentItem($document_srl, $load_extra_vars, $columnList);
$GLOBALS['XE_DOCUMENT_LIST'][$document_srl] = $oDocument;
if($load_extra_vars) $this->setToAllDocumentExtraVars();
$GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->columnListKey = serialize($columnList);
}
if($is_admin) $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->setGrant();
@ -994,10 +993,7 @@
$args->title = $title;
$output = executeQuery('document.getDocumentSrlByTitle', $args);
if(!$output->data) return null;
else {
if(is_array($output->data)) return $output->data[0]->document_srl;
return $output->data->document_srl;
}
else return $output->data->document_srl;
}
function getAlias($document_srl){

View file

@ -51,9 +51,15 @@
$style = $xml_obj->attrs->style;
$margin = (int)$xml_obj->attrs->margin;
if(!$alt) {
$tmp_arr = explode('/',$src);
$alt = array_pop($tmp_arr);
}
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
$src = str_replace('&amp;amp;', '&amp;', $src);
if(!$alt) $alt = $src;
// Image containing the address to the address conversion request uri (rss output, etc. purposes)
$temp_src = explode('/', $src);
if(substr($src, 0,2)=='./') $src = Context::getRequestUri().substr($src, 2);
@ -66,8 +72,9 @@
$attr_output = array();
$attr_output = array("src=\"".$src."\"");
$attr_output[] = "alt=\"".$alt."\"";
if($alt) {
$attr_output[] = "alt=\"".$alt."\"";
}
if($title) {
$attr_output[] = "title=\"".$title."\"";
}

View file

@ -1399,12 +1399,6 @@
$output = executeQuery('member.addMemberToGroup',$args);
$output2 = ModuleHandler::triggerCall('member.addMemberToGroup', 'after', $args);
$oCacheHandler = &CacheHandler::getInstance('object');
if($oCacheHandler->isSupport()){
$cache_key = 'object_member_groups:'.$member_srl.'_'.$site_srl;
$oCacheHandler->delete($cache_key);
}
return $output;
}
@ -1435,13 +1429,6 @@
$output = executeQuery('member.addMemberToGroup', $obj);
if(!$output->toBool()) return $output;
}
$oCacheHandler = &CacheHandler::getInstance('object');
if($oCacheHandler->isSupport()){
$cache_key = 'object_member_groups:'.$member_srl.'_'.$site_srl;
$oCacheHandler->delete($cache_key);
}
return new Object();
}
@ -1855,7 +1842,7 @@
unset($args->denied);
}
// check member identifier form
// check mamber identifier form
$config = $oMemberModel->getMemberConfig();
$output = executeQuery('member.getMemberInfoByMemberSrl', $args);
@ -1868,7 +1855,7 @@
$args->email_address = $orgMemberInfo->email_address;
}else{
$member_srl = $oMemberModel->getMemberSrlByUserID($args->user_id);
if($member_srl&&$args->member_srl!=$member_srl) return new Object(-1,'msg_exists_user_id');
if($member_srl&&$args->member_srl!=$member_srl) return new Object(-1,'msg_exists_email_address');
$args->user_id = $orgMemberInfo->user_id;
}

View file

@ -83,8 +83,7 @@
$oMemberController->addMemberPopupMenu($url,'cmd_view_member_info',$icon_path,'self');
}
// When click other's nickname
if($member_srl != $logged_info->member_srl && $logged_info->member_srl)
{
if($member_srl != $logged_info->member_srl) {
// Send an email
if($member_info->email_address) {
$url = 'mailto:'.htmlspecialchars($member_info->email_address);

View file

@ -25,8 +25,6 @@
// 2009. 02. 11 menu added to the table site_srl
if(!$oDB->isColumnExists('menu', 'site_srl')) return true;
// 2012. 02. 01 title index check
if(!$oDB->isIndexExists("menu", "idx_title")) return true;
return false;
}
@ -40,11 +38,6 @@
$oDB->addColumn('menu','site_srl','number',11,0,true);
}
// 2012. 02. 01 title index check
if(!$oDB->isIndexExists("menu","idx_title")) {
$oDB->addIndex('menu', 'idx_title', array('title'));
}
return new Object(0, 'success_updated');
}

View file

@ -1,7 +1,7 @@
<table name="menu">
<column name="menu_srl" type="number" size="12" notnull="notnull" primary_key="primary_key" />
<column name="site_srl" type="number" size="11" notnull="notnull" default="0" index="menu_site_srl" />
<column name="title" type="varchar" size="250" index="idx_title"/>
<column name="title" type="varchar" size="250" />
<column name="listorder" type="number" size="11" default="0" index="idx_listorder" />
<column name="regdate" type="date" index="idx_regdate" />
</table>

View file

@ -695,11 +695,8 @@
/**
* @brief Change user-defined language
**/
function replaceDefinedLangCode(&$output, $isReplaceLangCode = true) {
if($isReplaceLangCode)
{
$output = preg_replace_callback('!\$user_lang->([a-z0-9\_]+)!is', array($this,'_replaceLangCode'), $output);
}
function replaceDefinedLangCode(&$output) {
$output = preg_replace_callback('!\$user\_lang\-\>([A-Za-z0-9\_]+)!s', array($this,'_replaceLangCode'), $output);
}
function _replaceLangCode($matches) {
static $lang = null;

View file

@ -630,10 +630,8 @@
$info->menu->{$action->attrs->menu_name}->index = $name;
$buff .= sprintf('$info->menu->%s->index=\'%s\';', $action->attrs->menu_name, $name);
}
if(is_array($info->menu->{$action->attrs->menu_name}->acts)) {
array_push($info->menu->{$action->attrs->menu_name}->acts, $name);
$currentKey = array_search($name, $info->menu->{$action->attrs->menu_name}->acts);
}
array_push($info->menu->{$action->attrs->menu_name}->acts, $name);
$currentKey = array_search($name, $info->menu->{$action->attrs->menu_name}->acts);
$buff .= sprintf('$info->menu->%s->acts[%d]=\'%s\';', $action->attrs->menu_name, $currentKey, $name);
$i++;

View file

@ -43,10 +43,12 @@
<td class="nowr">
<!--@foreach($val->author as $author)-->
<!--@if($author->homepage)-->
<a href="{$author->homepage}" onclick="window.open(this.href);return false;" target="_blank">{$author->name}</a>
<!--@else-->
{$author->name}
<!--@endif-->
<a href="{$author->homepage}" onclick="window.open(this.href);return false;" target="_blank">
<!--@end-->
{$author->name}
<!--@if($author->homepage)-->
</a>
<!--@end-->
<!--@endforeach-->
</td>
<td class="nowr">{$val->path}</td>

View file

@ -254,8 +254,7 @@
Context::set('content', $content);
// Convert them to teach the widget
$oWidgetController = &getController('widget');
$content = $oWidgetController->transWidgetCode($content, true, false);
$content = str_replace('$', '&#36;', $content);
$content = $oWidgetController->transWidgetCode($content, true);
Context::set('page_content', $content);
// Set widget list
$oWidgetModel = &getModel('widget');

View file

@ -230,10 +230,10 @@
/**
* @breif By converting the specific content of the widget tag return
**/
function transWidgetCode($content, $javascript_mode = false, $isReplaceLangCode = true) {
function transWidgetCode($content, $javascript_mode = false) {
// Changing user-defined language
$oModuleController = &getController('module');
$oModuleController->replaceDefinedLangCode($content, $isReplaceLangCode);
$oModuleController->replaceDefinedLangCode($content);
// Check whether to include information about editing
$this->javascript_mode = $javascript_mode;
// Widget code box change

View file

@ -1,21 +0,0 @@
<query id="getMemberInfo" action="select">
<tables>
<table name="member" alias="member" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<query operation="equal" column="regdate" notnull="notnull" alias="documentMaxRegdate">
<tables>
<table name="documents" alias="documents" />
</tables>
<columns>
<column name="max(regdate)" alias="maxregdate" />
</columns>
<conditions>
<condition operation="equal" column="documents.user_id" var="member.user_id" notnull="notnull" />
</conditions>
</query>
</conditions>
</query>

View file

@ -21,39 +21,18 @@ class MysqlInsertTest extends MysqlTest
{
$this->_testQuery($xml_file, $argsString, $expected, 'getInsertSql', $columnList);
}
/**
* @brief testInsertSelectStatement - checks that when query action is 'insert-selct' an 'INSERT INTO .. SELECT ...' statement is properly generated
* @developer Corina Udrescu (xe_dev@arnia.ro)
* @access public
* @return void
*/
function testInsertSelectStatement()
function testInsertIntoNumericColumnConvertsValue()
{
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/insert_select.xml";
$argsString = '$args->condition_value = 7;';
$expected = 'insert into `xe_table1` (`column1`, `column2`, `column3`)
select `column4`, `column5`, `column6`
from `xe_table2` as `table2`
where `column4` >= 7';
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/member_insert_injection.xml";
$argsString = '$args->member_srl = 7;
$args->find_account_question = "1\'";
';
$expected = 'insert into `xe_member` (`member_srl`, `find_account_question`) values (7, 1)';
$this->_test($xml_file, $argsString, $expected);
}
function testInsertSelectStatement2()
{
$xml_file = _XE_PATH_ . "modules/wiki/queries/insertLinkedDocuments.xml";
$argsString = '$args->document_srl = 7;
$args->module_srl = 10;
$args->alias_list = array("unu", "doi");
';
$expected = 'insert into `xe_wiki_links`
(`cur_doc_srl`, `link_doc_srl`)
select 7, `document_srl`
from `xe_document_aliases` as `document_aliases`
where `module_srl` = 10
and `alias_title` in (\'unu\',\'doi\')';
$this->_test($xml_file, $argsString, $expected);
}
}
/* End of file MysqlInsertTest.php */

View file

@ -1,23 +0,0 @@
<query id="QUERY_ID" action="insert-select">
<tables>
<table name="table1" />
</tables>
<columns>
<column name="column1" />
<column name="column2" />
<column name="column3" />
</columns>
<query>
<tables>
<table name="table2" />
</tables>
<columns>
<column name="column4" />
<column name="column5" />
<column name="column6" />
</columns>
<conditions>
<condition operation="more" column="column4" default="100" var="condition_value" />
</conditions>
</query>
</query>

View file

@ -1,43 +1,54 @@
@charset "utf-8";
.xeBanner{position:relative; z-index:100}
.xeBanner .section{position:static; height:100%;width:100%; padding-top:1px; margin:0 !important}
.xeBanner { position:relative; z-index:100;}
.xeBanner .section{ position:static; height:100%;width:100%; padding-top:1px; margin:0 !important; }
.xeBanner.v1 #v1,
.xeBanner.v2 #v2,
.xeBanner.v3 #v3{display:block}
.xeBanner #v1{background-position:0 0}
.xeBanner.v3 #v3{ display:block;}
.xeBanner #v1{ background-position:0 0;}
/*.xeBanner #v2{ background-position:0 -347px;}
.xeBanner #v3{ background-position:0 -694px;}*/
.xeBanner .section h2,
.xeBanner .section p{position:relative; margin:0; z-index:-1; line-height:1.2}
.xeBanner .section a{position:absolute; height:22px; top:160px; left:15px; font-size:11px; padding:0 8px; overflow:hidden; text-decoration:none}
.xeBanner .section a span{position:relative; top:-22px}
ul.pagination{width:75px;height:10px;margin:0 auto !important;text-align:center !important}
ul.pagination li{float:left;list-style:none;width:10px;height:10px;margin-right:5px;background:url(../images/slide_page_off.gif) no-repeat top left}
ul.pagination li.current{background:url(../images/slide_page_on.gif) no-repeat top left}
ul.pagination a{text-decoration:none;outline:none;ie-dummy: expression(this.hideFocus=true)}
.xeBanner .section p{ position:relative; margin:0; z-index:-1; line-height:1.2;}
.xeBanner .section a{ position:absolute; height:22px; top:160px; left:15px; font-size:11px; padding:0 8px; overflow:hidden; text-decoration:none;}
.xeBanner .section a span{ position:relative; top:-22px;}
ul.pagination {width:75px;height:10px;margin:0 auto !important;text-align:center !important;}
ul.pagination li {float:left;list-style:none;width:10px;height:10px;margin-right:5px;background:url(../images/slide_page_off.gif) no-repeat top left;}
ul.pagination li.current {background:url(../images/slide_page_on.gif) no-repeat top left;}
ul.pagination a {text-decoration:none;outline:none;ie-dummy: expression(this.hideFocus=true);}
/* slide_widget */
.slide_widget{position:relative}
.slide_widget .mask{position:relative;z-index:80;margin:0 auto;padding:0;overflow:hidden}
.slide_widget ul{margin:0}
.slide_widget li{float:left;list-style:none}
.slide_widget {position:relative;}
.slide_widget .mask {position:relative;z-index:80;margin:0 auto;padding:0;overflow:hidden;}
.slide_widget ul {margin:0;}
.slide_widget li {float:left;list-style:none;}
/* slide_widget */
#slide_widget{width:100%;height:446px; position:relative;background:url(../images/slide_box_bg.gif) repeat-x top left}
#slide_widget .mask{width:958px;height:418px;position:relative;z-index:80;margin:0 auto;padding:0;overflow:hidden}
#slide_widget ul{margin:0; padding:0}
#slide_widget li{float:left;list-style:none}
ul.imgSet{height:418px;position:absolute;left:width:100%;top:0}
.imgSet li{width:958px;height:420px;float:left}
.imgSet div.item{position:relative;z-index:50}
.imgSet li p{position:absolute;x:0;y:0;z-index:20;margin:0}
.slides_container div.shadow{position:absolute;left:0;margin-top:-105px;z-index:10}
.slides_container .section img{position:relative;z-index:50}
ul.paging{width:75px;height:10px;margin:0 auto !important;text-align:center}
.pagingli{width:10px;height:10px;margin-right:5px}
.paging li.on{background:url(../images/slide_page_on.gif) no-repeat top left}
.paging li.off{background:url(../images/slide_page_off.gif) no-repeat top left}
.pagingli span{visibility:hidden}
.paginga{text-decoration:none}
#shadow{left: 15px;margin-top: -105px;position: absolute;z-index: -10}
.slide_widget .mask{width:958px !important}
#slides,.slides_container,.slides_container div{width:958px !important;height:431px !important;display:block}
.buttonBox{z-index:201}
.section div{z-index:200}
.slide_widget ul{position:relative;bottom:18px;z-index:150}
#slide_widget {width:100%;height:446px; position:relative;background:url(../images/slide_box_bg.gif) repeat-x top left;}
#slide_widget .mask {width:958px;height:418px;position:relative;z-index:80;margin:0 auto;padding:0;overflow:hidden;}
#slide_widget ul {margin:0; padding:0;}
#slide_widget li {float:left;list-style:none;}
ul.imgSet {height:418px;position:absolute;left:width:100%;top:0;}
.imgSet li {width:958px;height:420px;float:left;}
.imgSet div.item {position:relative;z-index:50;}
.imgSet li p {position:absolute;x:0;y:0;z-index:20;margin:0;}
.slides_container div.shadow {position:absolute;left:0;margin-top:-105px;z-index:10;}
.slides_container .section img{position:relative;z-index:50;}
ul.paging {width:75px;height:10px;margin:0 auto !important;text-align:center;}
.paging li {width:10px;height:10px;margin-right:5px;}
.paging li.on {background:url(../images/slide_page_on.gif) no-repeat top left;}
.paging li.off {background:url(../images/slide_page_off.gif) no-repeat top left;}
.paging li span {visibility:hidden;}
.paging a {text-decoration:none;}
#shadow {left: 15px;margin-top: -105px;position: absolute;z-index: -10;}
.slide_widget .mask {width:958px !important;}
#slides,.slides_container,.slides_container div {width:958px !important;height:431px !important;display:block;}
.buttonBox {z-index:201}
.section div {z-index:200}
.slide_widget ul {position:relative;bottom:18px;z-index:150;}

View file

@ -1,62 +1,77 @@
@charset "utf-8";
/* CSS Document */
body{font-size:12px;font-family:sans-serif;margin:0;padding:0}
img{border:none}
body {font-size: 12px;font-family:sans-serif; margin: 0; padding: 0;}
img{border:none;}
/* head */
#wrap{width:100%}
#wrap .top{width:100%;height:73px;z-index:300;background:url(../images/header_bg.gif) repeat-x top left}
#wrap .header{width:960px;height:73px;margin:0 auto;position:relative;z-index:150}
.header .logo{margin-top:15px;float:left}
.header ul{margin:0;padding:0}
.header li{list-style:none}
#wrap .main{width:100%;z-index:200}
.main .container{width:960px;position:relative;padding-top:50px;margin:0 auto 30px auto;_margin-bottom:50px;overflow:hidden}
#wrap .slide_banner{width:100%;height:446px;background:url(../images/slide_box_bg.gif) repeat-x top left;padding-top:15px}
.container .search_box_layout{position:absolute;top:10px;right:0px}
.search_box_layout .inputBox{width:218px;height:29px;background:url(../images/search_box_bg.gif) no-repeat top left}
.search_box_layout .inputBox .iText{width:175px;float:left;background:none;;outline:none;border:0 none;padding-left:10px;margin-top:3px}
.search_box_layout .inputBox .is_submit{width:15px;height:14px;float:right;margin-top:6px;margin-right:10px}
#wrap {width:100%;}
#wrap .top {width:100%;height:73px;z-index:300;background:url(../images/header_bg.gif) repeat-x top left;}
#wrap .header {width:960px;height:73px;margin:0 auto;position:relative; z-index:150;}
.header .logo {margin-top:15px;float:left;}
.header ul {margin:0;padding:0;}
.header li {list-style:none;}
#wrap .main {width:100%;z-index:200;}
.main .container {width:960px;position:relative;padding-top:50px;margin:0 auto 30px auto;_margin-bottom:50px;overflow:hidden;}
#wrap .slide_banner {width:100%;height:446px;background:url(../images/slide_box_bg.gif) repeat-x top left; padding-top:15px;}
.container .search_box_layout {position:absolute;top:10px;right:0px;}
.search_box_layout .inputBox {width:218px;height:29px;background:url(../images/search_box_bg.gif) no-repeat top left;}
.search_box_layout .inputBox .iText {width:175px;float:left;background:none;;outline:none;border:0 none;padding-left:10px;margin-top:3px;}
.search_box_layout .inputBox .is_submit {width:15px;height:14px;float:right;margin-top:6px;margin-right:10px;}
/* GNB */
.header .gnb{position:absolute;top:36px;left:220px;z-index:300}
.gnb li.m1{width:109px;height:35px;float:left;position:relative}
.gnb li.m_on{background:url(../images/gnb_m1_on_n.gif) no-repeat top left}
.gnb a{font-family:Arial, Helvetica, sans-serif;font-weight:bold;outline:none;ie-dummy:expression(this.hideFocus=true)}
.gnb li.m1 a.m1_a{color:#FFF;font-size:14px;line-height:14px;text-decoration:none;display:block;width:109px;height:35px;cursor:pointer}
.gnb li.m_on a.m1_a{color:#0f0f0f !important}
.gnb li.m1 span.m1_span{display:block;width:109px;height:25px;text-align:center;padding-top:10px}
.gnb .lnb{margin:0;padding:1px 0 0 0;background:url(../images/lnb_bg.gif) no-repeat top left}
.gnb .sub{width:106px;position:absolute;left:2px;z-index:1000;display:none}
.gnb .lnb .s1{width:106px;height:32px;background:url(../images/lnb_bg.gif) no-repeat top left}
.gnb .lnb .s1 a{width:106px;height:24px;padding-top:8px;font-size:12px;text-align:center;color:#5e5e60;display:block;font-weight:bold;text-decoration:none}
.gnb .lnb .s1 a:hover{color:white;background:url(../images/lnb_bg_on.gif) no-repeat 1px 0}
.gnb .lnb .s1 a.a_on{color:white;background:url(../images/lnb_bg_on.gif) no-repeat 1px 0}
.gnb .bottom{width:106px;height:3px;background:url(../images/lnb_bg.gif) no-repeat bottom left}
.gnb .bottom span{width:0;height:0;background:#000}
.header .gnb {position:absolute;top:36px; left:220px;z-index:300;}
.gnb li.m1 {width:109px;height:35px;float:left;position:relative;}
.gnb li.m_on {background:url(../images/gnb_m1_on_n.gif) no-repeat top left;}
.gnb a {font-family:Arial, Helvetica, sans-serif;font-weight:bold;outline:none;ie-dummy: expression(this.hideFocus=true);}
.gnb li.m1 a.m1_a {color:#FFF;font-size:14px;line-height:14px;text-decoration:none;
display:block;width:109px;height:35px;cursor:pointer;}
.gnb li.m_on a.m1_a {color:#0f0f0f !important;}
.gnb li.m1 span.m1_span {display:block;width:109px;height:25px;text-align:center;padding-top:10px;}
.gnb .lnb {margin:0;padding:1px 0 0 0;background:url(../images/lnb_bg.gif) no-repeat top left;}
.gnb .sub {width:106px;position:absolute;left:2px;z-index:1000; display:none;}
.gnb .lnb .s1 {width:106px;height:32px;background: url(../images/lnb_bg.gif) no-repeat top left;}
.gnb .lnb .s1 a {width:106px;height:24px;padding-top:8px;font-size:12px;text-align:center;color:#5e5e60;display:block;font-weight:bold;text-decoration:none;}
.gnb .lnb .s1 a:hover {color:white;background:url(../images/lnb_bg_on.gif) no-repeat 1px 0;}
.gnb .lnb .s1 a.a_on {color:white;background:url(../images/lnb_bg_on.gif) no-repeat 1px 0;}
.gnb .bottom {width:106px;height:3px;background:url(../images/lnb_bg.gif) no-repeat bottom left;}
.gnb .bottom span {width:0;height:0;background:#000;}
/* slide_widget */
#slide_widget{width:100%;height:446px;position:relative;background:url(../images/slide_box_bg.gif) repeat-x top left}
#slide_widget .mask{width:958px;height:446px;position:relative;z-index:80;margin:0 auto;padding:0;overflow:hidden}
#slide_widget ul{margin:0;padding:0}
#slide_widget li{float:left;list-style:none}
ul.imgSet{height:418px;position:absolute;left:width:100%;top:0}
.imgSet li{width:958px;height:420px;float:left}
.imgSet div.item{position:relative;z-index:50}
.imgSet li p{position:absolute;x:0;y:0;z-index:20;margin:0}
.imgSet li div.shadow{position:absolute;left:15px;top:323px;z-index:10}
ul.paging{width:75px;height:10px;margin:0 auto !important;text-align:center}
.pagingli{width:10px;height:10px;margin-right:5px}
.paging li.on{background:url(../images/slide_page_on.gif) no-repeat top left}
.paging li.off{background:url(../images/slide_page_off.gif) no-repeat top left}
.pagingli span{visibility:hidden}
.paginga{text-decoration:none}
.footer{width:960px;margin:0 auto;border-top:#dbdbdb solid 1px;position:relative;font-family:Tahoma, Geneva, sans-serif;}
.footer .footer_p{color:#9fa09f;margin:12px auto}
#selectLang{position:absolute;top:-1px;right:0;margin:0}
#selectLang dt{float:left;padding:4px 11px 0 0;font-family:"Times New Roman", Times, serif;font-size:12px;color:#aaabad}
#selectLang dd{float:left;margin:0}
#selectLang .langBtn{width:61px;height:20px;cursor:pointer;padding-top:7px;padding-left:7px;color:#5a5a5a;text-decoration:none;font-size:11px;line-height:11px;background:url(../images/btn_language.gif) no-repeat top left}
#selectLang .langSet{display:none;width:68px;padding:3px 0 0 0;margin:0;position:absolute;bottom:27px;_bottom:26px;z-index:500;background:url(../images/language_ul_top.png) no-repeat top left}
#selectLang ul li{list-style:none;border-right:#bdbaba solid 1px;border-left:#bdbaba solid 1px;background:#f0f0f0}
#selectLang ul li a{height:12px;padding:6px 0 6px 7px;display:block}
#selectLang li.on{border:#c3c3c3 solid 1px;background:#d7d7d7}
#selectLang li.on a{height:12px;padding:5px 0 5px 7px}
#selectLang li a{color:#5a5a5a;text-decoration:none;font-size:11px;line-height:11px;vertical-align:text-top}
#slide_widget {width:100%;height:446px; position:relative;background:url(../images/slide_box_bg.gif) repeat-x top left;}
#slide_widget .mask {width:958px;height:446px;position:relative;z-index:80;margin:0 auto;padding:0;overflow:hidden;}
#slide_widget ul {margin:0; padding:0;}
#slide_widget li {float:left;list-style:none;}
ul.imgSet {height:418px;position:absolute;left:width:100%;top:0;}
.imgSet li {width:958px;height:420px;float:left;}
.imgSet div.item {position:relative;z-index:50;}
.imgSet li p {position:absolute;x:0;y:0;z-index:20;margin:0;}
.imgSet li div.shadow {position:absolute;left:15px;top:323px;z-index:10;}
ul.paging {width:75px;height:10px;margin:0 auto !important;text-align:center;}
.paging li {width:10px;height:10px;margin-right:5px;}
.paging li.on {background:url(../images/slide_page_on.gif) no-repeat top left;}
.paging li.off {background:url(../images/slide_page_off.gif) no-repeat top left;}
.paging li span {visibility:hidden;}
.paging a {text-decoration:none;}
.footer {width:960px;margin:0 auto;border-top:#dbdbdb solid 1px;position:relative;font-family:Tahoma, Geneva, sans-serif; }
.footer .footer_p {color:#9fa09f;margin:12px auto;}
#selectLang {position:absolute;top:-1px;right:0;margin:0;}
#selectLang dt {float:left;padding:4px 11px 0 0;font-family:"Times New Roman", Times, serif;font-size:12px;color:#aaabad;}
#selectLang dd {float:left;margin:0;}
#selectLang .langBtn {width:61px;height:20px; cursor:pointer;padding-top:7px;padding-left:7px;color:#5a5a5a;text-decoration:none;font-size:11px;line-height:11px;background:url(../images/btn_language.gif) no-repeat top left;}
#selectLang .langSet {display:none;width:68px;padding:3px 0 0 0;margin:0;position:absolute;bottom:27px;_bottom:26px;z-index:500;background:url(../images/language_ul_top.png) no-repeat top left;}
#selectLang ul li {list-style:none;border-right:#bdbaba solid 1px;border-left:#bdbaba solid 1px; background:#f0f0f0;}
#selectLang ul li a {height:12px;padding:6px 0 6px 7px;display:block;}
#selectLang li.on {border:#c3c3c3 solid 1px;background:#d7d7d7;}
#selectLang li.on a {height:12px;padding:5px 0 5px 7px;}
#selectLang li a {color:#5a5a5a;text-decoration:none;font-size:11px;line-height:11px;vertical-align:text-top;}

View file

@ -24,7 +24,7 @@
<table cellspacing="0" class="rowTable">
<tr><th colspan="2" class="title"><div>{$lang->member_default_info}</div></th></tr>
<tr>
<th><div>{$identifierForm->title} <em style="color:red">*</em></div></th>
<th><div>{$identifierForm->title} *</div></th>
<td class="wide">
{$identifierForm->value}
<input type="hidden" name="{$identifierForm->name}" value="{$identifierForm->value}" />