douhuan1380 2011-09-30 12:37
浏览 44
已采纳

MVCTable中未定义的getUserId()函数

I use atk 4.1.2. I found a problem while I tried to Insert/Update my Model. It seems like because I added two fields in my table, i.e. : created_by and updated_by.

I found these lines caused the problem in MVCTable.php:

if (isset($this->fields['created_by']))
            $this->dsql('modify',false)->set('created_by',$this->api->getUserId());

if (isset($this->fields['updated_by']))
            $this->dsql('modify',false)->set('updated_by',$this->api->getUserId());

The method $this->api->getUserId() is not defined anywhere. I don't know whether this same problem occurs for the previous atk versions.

  • 写回答

1条回答 默认 最新

  • dongpu4141 2011-09-30 12:57
    关注

    Yes, it's a bit of legacy code which I haven't cleaned up yet. Please delete those lines manually and they will not be there in further versions.

    https://github.com/atk4/atk4-addons/commit/e3b2379

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 ROS Turtlebot3 多机协同自主探索环境时遇到的多机任务分配问题,explore节点
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?
  • ¥15 cgictest.cgi文件无法访问
  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改
  • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
  • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?
  • ¥40 串口调试助手打开串口后,keil5的代码就停止了
  • ¥15 电脑最近经常蓝屏,求大家看看哪的问题