Commit 52c97bc8 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files
parents 4d9f4df8 20083e4b
......@@ -1153,6 +1153,7 @@ EOF;
if (!preg_match('/^[a-zA-Z][a-zA-Z0-9_]*$/', $name)) {
throw new PieformException("'$name' is not a valid javascript callback name");
}
return $name;
}
/**
......
......@@ -25,7 +25,7 @@
*/
define('INTERNAL', 1);
require('init.php');
require(dirname(dirname(__FILE__)).'/init.php');
require('searchlib.php');
safe_require('search', 'internal', 'lib.php', 'require_once');
......
......@@ -25,19 +25,19 @@
*/
define('INTERNAL', 1);
require('init.php');
require_once('form.php');
require(dirname(dirname(__FILE__)).'/init.php');
require_once('pieforms/pieform.php');
/* If there is no query posted, the 'results' section of the page will
stay invisible until a query is submitted. */
$query = @param_variable('query','');
$searchform = form(array(
$searchform = pieform(array(
'name' => 'search',
'method' => 'post',
'ajaxpost' => true,
'ajaxsuccessfunction' => 'newsearch()',
'ajaxsuccessfunction' => 'newsearch',
'action' => '',
'elements' => array(
'query' => array(
......@@ -66,7 +66,7 @@ var results = new TableRenderer(
'searchresults',
'results.json.php',
[
function(r) { return TD(null,A({'href':'viewuser.php?id=' + r.id},r.displayname)); },
function(r) { return TD(null,A({'href':'view.php?id=' + r.id},r.displayname)); },
'institution',
]
);
......
......@@ -25,7 +25,7 @@
*/
define('INTERNAL', 1);
require('init.php');
require(dirname(dirname(__FILE__)).'/init.php');
$userid = param_integer('id','');
......@@ -35,11 +35,14 @@ if (!$user = @get_record('usr', 'id', $userid)) {
}
else {
$name = display_name($user);
safe_require('artefact', 'internal', 'lib.php');
$publicfields = ArtefactTypeProfile::get_public_fields();
foreach ($publicfields as $pf => $type) {
$profile[$pf]['name'] = $pf;
$profile[$pf]['value'] = '[]';
safe_require('artefact', 'internal');
$publicfields = call_static_method(generate_artefact_class_name('profile'),'get_public_fields');
foreach (array_keys($publicfields) as $field) {
$classname = generate_artefact_class_name($field);
$c = new $classname(0, array('owner' => $userid)); // email is different
//$c->render(ARTEFACT_FORMAT_LISTITEM);
//$profile[$pf]['name'] = $pf;
//$profile[$pf]['value'] = '[]';
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment