Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » _cm_post_getData
Re: _cm_post_getData [message #1098 is a reply to message #1097] Fri, 14 September 2007 14:45 Go to previous messageGo to previous message
interop is currently offline  interop
Messages: 45
Registered: October 2006
Member
If it matters I'm using linux OS

Here are the values I get while in getEntryPoint() during the "export table to php" procedure

$classname = 'dict_table_s02'
$parentclass = 'dict_table'

$array[0]['file'] = '...std.table.class.inc'
$array[0]['function'] = 'getEntryPoint'
$array[0]['class'] is not set
$array[0]['type'] is not set

$array[1]['file'] = '...std.update4.inc'
$array[1]['function'] = 'getData'
$array[1]['class'] = 'Default_Table'
$array[1]['type'] = '->'

$array[2]['file'] = '...table_export.php'
$array[2]['function'] = 'require_once'
$array[2]['class'] is not set
$array[2]['type'] is not set

'type' is only set for $array[1] so this is the only entry that gets checked and $array[1]['class'] doesn't match $classname or $parentclass so $method never gets set.

I verified that I did upgrade include.general.inc to version 1.28.0 but here's getEntryPoint() in case:

function getEntryPoint ($object)
// get the name of the first method that was used to access the specified object.
{
if (is_object($object)) {
// get class name for the current object
$classname = get_class($object);
$parentclass = get_parent_class($object);
} else {
// assume input is a string
$classname = $object;
$parentclass = '';
} // if

$method = null; // initialise
$array = debug_backtrace(); // get trace data

// start at the end of the array and move backwards
for ($i = count($array)-1; $i >= 0; $i--) {
// is this entry for a method call?
if (isset($array[$i]['type'])) {
if ($array[$i]['class'] == $classname) {
$method = $array[$i]['function'];
break;
} // if
if ($array[$i]['class'] == $parentclass) {
$method = $array[$i]['function'];
break;
} // if
if (isset($array[$i]['object'])) {
if (is_a($array[$i]['object'], $classname)) {
$method = $array[$i]['function'];
break;
} // if
if (is_a($array[$i]['object'], $parentclass)) {
$method = $array[$i]['function'];
break;
} // if
} // if
// if ($array[$i]['class'] != 'Default_Table') {
// if (is_subclass_of($object, $array[$i]['class'])) {
// $method = $array[$i]['function'];
// break;
// } // if
// } // if
} // if
} // for

return $method;

} // getEntryPoint



[Updated on: Fri, 14 September 2007 14:59]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Restricting access to user's own record
Next Topic: Search and NOEDIT
Goto Forum:
  


Current Time: Thu May 16 22:11:08 EDT 2024

Total time taken to generate the page: 0.00993 seconds