mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
reverse merge from 1.6.0 (r10156, r10469, r10370, r10369, r10365, r10111, r10110, r10108, r10064, r10063, r10060, r10054, r10052, r10051, r10050, r10049, r10044, r10042, r10041, r10030, r10029, r10024, r10014, r10013)
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10715 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3afad81016
commit
57a0cc59b1
24 changed files with 258 additions and 77 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@ window.xeNotifyMessage = function(text, count){
|
|||
if(!$bar.length) {
|
||||
$bar = $('<div class="message info" />')
|
||||
.hide()
|
||||
.css({
|
||||
'position' : 'absolute',
|
||||
'z-index' : '100',
|
||||
})
|
||||
.prependTo(document.body);
|
||||
}
|
||||
text = text.replace('%d', count);
|
||||
|
|
@ -13,6 +17,6 @@ window.xeNotifyMessage = function(text, count){
|
|||
// hide after 10 seconds
|
||||
setTimeout(function(){
|
||||
$bar.slideUp();
|
||||
}, 10000);
|
||||
}, 5000);
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
|
|||
|
|
@ -177,6 +177,12 @@
|
|||
* @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);
|
||||
|
|
@ -203,9 +209,9 @@
|
|||
$obj->db_type = $db_type;
|
||||
$obj->enable = $oDB->isSupported() ? true : false;
|
||||
|
||||
$this->supported_list[] = $obj;
|
||||
$get_supported_list[] = $obj;
|
||||
}
|
||||
|
||||
$this->supported_list = $get_supported_list;
|
||||
return $this->supported_list;
|
||||
}
|
||||
|
||||
|
|
@ -332,6 +338,7 @@
|
|||
* @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;
|
||||
|
||||
|
|
@ -339,38 +346,40 @@
|
|||
|
||||
$this->query_id = $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');
|
||||
}
|
||||
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');
|
||||
}
|
||||
|
||||
$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 = $this->checkQueryCacheFile($query_id, $xml_file);
|
||||
$result = $this->_executeQuery($cache_file, $args, $query_id, $arg_columns);
|
||||
// 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);
|
||||
|
||||
$this->actDBClassFinish();
|
||||
// execute query
|
||||
return $result;
|
||||
$this->actDBClassFinish();
|
||||
// execute query
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -381,7 +390,6 @@
|
|||
* @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);
|
||||
|
||||
|
|
@ -420,6 +428,7 @@
|
|||
// execute appropriate query
|
||||
switch($output->getAction()) {
|
||||
case 'insert' :
|
||||
case 'insert-select' :
|
||||
$this->resetCountCache($output->tables);
|
||||
$output = $this->_executeInsertAct($output);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -93,6 +93,10 @@
|
|||
|
||||
$this->tables = $tables;
|
||||
}
|
||||
|
||||
function setSubquery($subquery){
|
||||
$this->subquery = $subquery;
|
||||
}
|
||||
|
||||
function setConditions($conditions){
|
||||
$this->conditions = array();
|
||||
|
|
@ -186,6 +190,20 @@
|
|||
|
||||
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";
|
||||
}
|
||||
|
||||
|
||||
$valuesList = '';
|
||||
foreach($this->columns as $column){
|
||||
if($column->show()){
|
||||
|
|
|
|||
|
|
@ -622,14 +622,14 @@
|
|||
|
||||
$key = $module.'.'.($kind!='admin'?'':'admin').'.'.$type;
|
||||
|
||||
if(is_array($GLOBALS['__MODULE_EXTEND__']) && array_key_exists($key, $GLOBALS['__MODULE_EXTEND__'])) {
|
||||
if(is_array($GLOBALS['__MODULE_EXTEND__']) && array_key_exists($key, $GLOBALS['__MODULE_EXTEND__']))
|
||||
{
|
||||
$module = $extend_module = $GLOBALS['__MODULE_EXTEND__'][$key];
|
||||
}else{
|
||||
unset($parent_module);
|
||||
}
|
||||
|
||||
// if there is no instance of the module in global variable, create a new one
|
||||
if(!$GLOBALS['_loaded_module'][$module][$type][$kind]) {
|
||||
if(!isset($GLOBALS['_loaded_module'][$module][$type][$kind]))
|
||||
{
|
||||
$parent_module = $module;
|
||||
|
||||
$class_path = ModuleHandler::getModulePath($module);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
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');
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
<?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;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
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) .'\'': '');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ class QueryTag {
|
|||
//xml tags
|
||||
var $columns;
|
||||
var $tables;
|
||||
var $subquery;
|
||||
var $conditions;
|
||||
var $groups;
|
||||
var $navigation;
|
||||
|
|
@ -37,9 +38,12 @@ 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();
|
||||
}
|
||||
|
|
@ -77,19 +81,20 @@ class QueryTag {
|
|||
}
|
||||
}
|
||||
|
||||
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 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 getPrebuff() {
|
||||
if($this->isSubQuery) return;
|
||||
// TODO Check if this work with arguments in join clause
|
||||
$arguments = $this->getArguments();
|
||||
|
||||
|
|
@ -159,11 +164,13 @@ class QueryTag {
|
|||
if ($this->columns)
|
||||
$buff .= '$query->setColumns(' . $this->columns->toString() . ');' . 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;
|
||||
$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;
|
||||
|
||||
$this->buff = $buff;
|
||||
return $this->buff;
|
||||
|
|
@ -176,7 +183,13 @@ class QueryTag {
|
|||
return $this->tables = new TablesTag($this->query->tables);
|
||||
}
|
||||
|
||||
function getConditions() {
|
||||
function getSubquery(){
|
||||
if($this->query->query){
|
||||
$this->subquery = new QueryTag($this->query->query, true);
|
||||
}
|
||||
}
|
||||
|
||||
function getConditions(){
|
||||
return $this->conditions = new ConditionsTag($this->query->conditions);
|
||||
}
|
||||
|
||||
|
|
@ -207,11 +220,13 @@ class QueryTag {
|
|||
return $this->buff;
|
||||
}
|
||||
|
||||
function getArguments() {
|
||||
function getArguments(){
|
||||
$arguments = array();
|
||||
if ($this->columns)
|
||||
$arguments = array_merge($arguments, $this->columns->getArguments());
|
||||
$arguments = array_merge($arguments, $this->tables->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->conditions->getArguments());
|
||||
$arguments = array_merge($arguments, $this->navigation->getArguments());
|
||||
return $arguments;
|
||||
|
|
|
|||
|
|
@ -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] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time',
|
||||
'+0800' => '[GMT +08:00] China 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, China Standard Time',
|
||||
'+0900' => '[GMT +09:00] Korea Standard Time, Japan 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',
|
||||
|
|
|
|||
|
|
@ -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' }); return false;" /></th>
|
||||
<th scope="col"><input name="check_all" type="checkbox" onclick="XE.checkboxToggleAll('message_srl_list[]', { wrap:'fo_message_list' });" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
|||
|
|
@ -104,10 +104,11 @@
|
|||
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])) {
|
||||
if(!isset($GLOBALS['XE_DOCUMENT_LIST'][$document_srl]) || $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->columnListKey != serialize($columnList)) {
|
||||
$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();
|
||||
|
||||
|
|
@ -993,7 +994,10 @@
|
|||
$args->title = $title;
|
||||
$output = executeQuery('document.getDocumentSrlByTitle', $args);
|
||||
if(!$output->data) return null;
|
||||
else return $output->data->document_srl;
|
||||
else {
|
||||
if(is_array($output->data)) return $output->data[0]->document_srl;
|
||||
return $output->data->document_srl;
|
||||
}
|
||||
}
|
||||
|
||||
function getAlias($document_srl){
|
||||
|
|
|
|||
|
|
@ -1399,6 +1399,12 @@
|
|||
$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;
|
||||
}
|
||||
|
||||
|
|
@ -1429,6 +1435,13 @@
|
|||
$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();
|
||||
}
|
||||
|
||||
|
|
@ -1842,7 +1855,7 @@
|
|||
unset($args->denied);
|
||||
}
|
||||
|
||||
// check mamber identifier form
|
||||
// check member identifier form
|
||||
$config = $oMemberModel->getMemberConfig();
|
||||
|
||||
$output = executeQuery('member.getMemberInfoByMemberSrl', $args);
|
||||
|
|
@ -1855,7 +1868,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_email_address');
|
||||
if($member_srl&&$args->member_srl!=$member_srl) return new Object(-1,'msg_exists_user_id');
|
||||
|
||||
$args->user_id = $orgMemberInfo->user_id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,8 @@
|
|||
$oMemberController->addMemberPopupMenu($url,'cmd_view_member_info',$icon_path,'self');
|
||||
}
|
||||
// When click other's nickname
|
||||
if($member_srl != $logged_info->member_srl) {
|
||||
if($member_srl != $logged_info->member_srl && $logged_info->member_srl)
|
||||
{
|
||||
// Send an email
|
||||
if($member_info->email_address) {
|
||||
$url = 'mailto:'.htmlspecialchars($member_info->email_address);
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
// 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;
|
||||
}
|
||||
|
||||
|
|
@ -38,6 +40,11 @@
|
|||
$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');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
<column name="title" type="varchar" size="250" index="idx_title"/>
|
||||
<column name="listorder" type="number" size="11" default="0" index="idx_listorder" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -630,8 +630,10 @@
|
|||
$info->menu->{$action->attrs->menu_name}->index = $name;
|
||||
$buff .= sprintf('$info->menu->%s->index=\'%s\';', $action->attrs->menu_name, $name);
|
||||
}
|
||||
array_push($info->menu->{$action->attrs->menu_name}->acts, $name);
|
||||
$currentKey = array_search($name, $info->menu->{$action->attrs->menu_name}->acts);
|
||||
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);
|
||||
}
|
||||
|
||||
$buff .= sprintf('$info->menu->%s->acts[%d]=\'%s\';', $action->attrs->menu_name, $currentKey, $name);
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -43,12 +43,10 @@
|
|||
<td class="nowr">
|
||||
<!--@foreach($val->author as $author)-->
|
||||
<!--@if($author->homepage)-->
|
||||
<a href="{$author->homepage}" onclick="window.open(this.href);return false;" target="_blank">
|
||||
<!--@end-->
|
||||
{$author->name}
|
||||
<!--@if($author->homepage)-->
|
||||
</a>
|
||||
<!--@end-->
|
||||
<a href="{$author->homepage}" onclick="window.open(this.href);return false;" target="_blank">{$author->name}</a>
|
||||
<!--@else-->
|
||||
{$author->name}
|
||||
<!--@endif-->
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
<td class="nowr">{$val->path}</td>
|
||||
|
|
|
|||
21
tests/classes/db/db/xml_query/cubrid/data/doc_subquery.xml
Normal file
21
tests/classes/db/db/xml_query/cubrid/data/doc_subquery.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<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>
|
||||
|
|
@ -21,7 +21,7 @@ class MysqlInsertTest extends MysqlTest
|
|||
{
|
||||
$this->_testQuery($xml_file, $argsString, $expected, 'getInsertSql', $columnList);
|
||||
}
|
||||
|
||||
|
||||
function testInsertIntoNumericColumnConvertsValue()
|
||||
{
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/member_insert_injection.xml";
|
||||
|
|
@ -35,5 +35,41 @@ class MysqlInsertTest extends MysqlTest
|
|||
|
||||
}
|
||||
|
||||
/* End of file MysqlInsertTest.php */
|
||||
/* Location: ./tests/classes/db/db/xml_query/mysql/MysqlInsertTest.php */
|
||||
/**
|
||||
* @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()
|
||||
{
|
||||
$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';
|
||||
$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 */
|
||||
/* Location: ./tests/classes/db/db/xml_query/mysql/MysqlInsertTest.php */
|
||||
|
|
|
|||
23
tests/classes/db/db/xml_query/mysql/data/insert_select.xml
Normal file
23
tests/classes/db/db/xml_query/mysql/data/insert_select.xml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<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>
|
||||
|
|
@ -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} *</div></th>
|
||||
<th><div>{$identifierForm->title} <em style="color:red">*</em></div></th>
|
||||
<td class="wide">
|
||||
{$identifierForm->value}
|
||||
<input type="hidden" name="{$identifierForm->name}" value="{$identifierForm->value}" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue