Commit 058a00ea authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic
Browse files

Bug 1620416: replace all $smarty->assign_by_ref()

with $smarty->assign()
behatnotneeded

Change-Id: I667463b7732bd3f1dd2619b2836cf4b8c560d264
parent 7de2bdc6
......@@ -210,7 +210,7 @@ uksort($upgrades, 'sort_upgrades');
$js .= "\n" . 'var todo = ' . json_encode(array_keys($upgrades)) . ";\n";
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign_by_ref('upgrades', $upgrades);
$smarty->assign('upgrades', $upgrades);
if (isset($upgrades['core'])) {
$smarty->assign('releaseargs', array($upgrades['core']->torelease, $upgrades['core']->to));
}
......
......@@ -121,8 +121,8 @@ $userids = array_keys($users);
if ($selected == 'users') {
$smarty = smarty_core();
$smarty->assign_by_ref('users', $users);
$smarty->assign_by_ref('USER', $USER);
$smarty->assign('users', $users);
$smarty->assign('USER', $USER);
$userlisthtml = $smarty->fetch('admin/users/userlist.tpl');
if ($USER->get('admin') || $USER->is_institutional_admin()) {
......@@ -152,8 +152,8 @@ else if ($selected == 'accesslist') {
$users[$v['owner']]->views[$k] = $v;
}
$smarty = smarty_core();
$smarty->assign_by_ref('users', $users);
$smarty->assign_by_ref('USER', $USER);
$smarty->assign('users', $users);
$smarty->assign('USER', $USER);
$userlisthtml = $smarty->fetch('admin/users/accesslists.tpl');
}
else if ($selected == 'loginaslog') {
......@@ -184,8 +184,8 @@ else if ($selected == 'loginaslog') {
$note = false;
}
$smarty = smarty_core();
$smarty->assign_by_ref('log', $log);
$smarty->assign_by_ref('USER', $USER);
$smarty->assign('log', $log);
$smarty->assign('USER', $USER);
$smarty->assign('note', $note);
$userlisthtml = $smarty->fetch('admin/users/loginaslog.tpl');
}
......@@ -196,4 +196,3 @@ $smarty->assign('users', $users);
$smarty->assign('userlisthtml', $userlisthtml);
$smarty->assign('csv', isset($csv));
$smarty->display('admin/users/report.tpl');
......@@ -556,8 +556,8 @@ class LeapImportAnnotation extends LeapImportArtefactPlugin {
}
}
$smarty = smarty_core();
$smarty->assign_by_ref('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign_by_ref('entryannotations', $entryannotations);
$smarty->assign('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign('entryannotations', $entryannotations);
return $smarty->fetch('artefact:annotation:import/annotations.tpl');
}
}
......@@ -903,7 +903,7 @@ class ArtefactTypeAnnotationfeedback extends ArtefactType {
(isset($data->block) ? '&block=' . $data->block : '');
$smarty = smarty_core();
$smarty->assign_by_ref('data', $data->data);
$smarty->assign('data', $data->data);
$smarty->assign('canedit', $data->canedit);
$smarty->assign('viewid', $data->view);
$smarty->assign('position', $data->position);
......
......@@ -392,8 +392,8 @@ class LeapImportBlog extends LeapImportArtefactPlugin {
}
}
$smarty = smarty_core();
$smarty->assign_by_ref('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign_by_ref('entryblogs', $entryblogs);
$smarty->assign('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign('entryblogs', $entryblogs);
return $smarty->fetch('artefact:blog:import/blogs.tpl');
}
......
......@@ -91,7 +91,7 @@ if (empty($blogs->institution) && empty($blogs->group)) {
ArtefactTypeBlog::build_blog_list_html($blogs);
$smarty = smarty(array('paginator'));
$smarty->assign_by_ref('blogs', $blogs);
$smarty->assign('blogs', $blogs);
$smarty->assign('institutionname', $institutionname);
$smarty->assign('group', $groupid);
$js = '';
......
......@@ -337,7 +337,7 @@ class ArtefactTypeBlog extends ArtefactType {
$smarty->assign('owner', $this->get('owner'));
$smarty->assign('tags', $this->get('tags'));
$smarty->assign_by_ref('posts', $posts);
$smarty->assign('posts', $posts);
return array('html' => $smarty->fetch('artefact:blog:blog.tpl'), 'javascript' => '');
}
......@@ -401,7 +401,7 @@ class ArtefactTypeBlog extends ArtefactType {
public static function build_blog_list_html(&$blogs) {
$smarty = smarty_core();
$smarty->assign_by_ref('blogs', $blogs);
$smarty->assign('blogs', $blogs);
$blogs->tablerows = $smarty->fetch('artefact:blog:bloglist.tpl');
$pagination = build_pagination(array(
'id' => 'bloglist_pagination',
......
......@@ -107,7 +107,7 @@ $form['elements']['group'] = array('type' => 'hidden', 'value' => ($groupid) ? $
$form = pieform($form);
$smarty = smarty();
$smarty->assign_by_ref('form', $form);
$smarty->assign('form', $form);
$smarty->display('form.tpl');
exit;
......
......@@ -218,7 +218,7 @@ $smarty = smarty(array(), array(), array(), array(
),
));
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign_by_ref('form', $form);
$smarty->assign('form', $form);
$smarty->display('artefact:blog:editpost.tpl');
......
......@@ -111,8 +111,8 @@ if (!$institutionname && !$groupid) {
}
}
$smarty->assign_by_ref('editform', $form);
$smarty->assign_by_ref('blog', $blog);
$smarty->assign('editform', $form);
$smarty->assign('blog', $blog);
$smarty->display('artefact:blog:settings.tpl');
exit;
......
......@@ -210,8 +210,8 @@ else if (!$USER->get_account_preference('multipleblogs')) {
}
}
$smarty->assign_by_ref('blog', $blog);
$smarty->assign_by_ref('posts', $posts);
$smarty->assign('blog', $blog);
$smarty->assign('posts', $posts);
$smarty->display('artefact:blog:view.tpl');
exit;
......
......@@ -348,8 +348,8 @@ class LeapImportComment extends LeapImportArtefactPlugin {
}
}
$smarty = smarty_core();
$smarty->assign_by_ref('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign_by_ref('entrycomments', $entrycomments);
$smarty->assign('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign('entrycomments', $entrycomments);
return $smarty->fetch('artefact:comment:import/comments.tpl');
}
}
......@@ -868,7 +868,7 @@ class ArtefactTypeComment extends ArtefactType {
}
$smarty = smarty_core();
$smarty->assign_by_ref('data', $data->data);
$smarty->assign('data', $data->data);
$smarty->assign('canedit', $data->canedit);
$smarty->assign('position', $data->position);
$smarty->assign('viewid', $data->view);
......
......@@ -168,8 +168,8 @@ class LeapImportFile extends LeapImportArtefactPlugin {
}
}
$smarty = smarty_core();
$smarty->assign_by_ref('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign_by_ref('entryfiles', $entryfiles);
$smarty->assign('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign('entryfiles', $entryfiles);
return $smarty->fetch('artefact:file:import/files.tpl');
}
......
......@@ -157,7 +157,7 @@ $smarty = smarty(array(), array(), array(), array(
),
));
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign_by_ref('form', $form);
$smarty->assign('form', $form);
$smarty->assign('PAGEHEADING', $artefact->get('title'));
$smarty->assign('pagedescriptionhtml', $othernotesmsg);
$smarty->display('form.tpl');
......
......@@ -1180,8 +1180,8 @@ class LeapImportInternal extends LeapImportArtefactPlugin {
$profilegroups[] = $profilegroup;
}
$smarty = smarty_core();
$smarty->assign_by_ref('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign_by_ref('profilegroups', $profilegroups);
$smarty->assign('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign('profilegroups', $profilegroups);
return $smarty->fetch('artefact:internal:import/profilefields.tpl');
}
......
......@@ -193,7 +193,7 @@ $pagination = build_pagination(array(
));
$smarty = smarty_core();
$smarty->assign_by_ref('data', $data);
$smarty->assign('data', $data);
$html = $smarty->fetch('artefact:internal:noteresults.tpl');
function deletenote_form($id, $notedata) {
......@@ -236,4 +236,4 @@ json_reply(false, array(
'offset' => $offset,
'setlimit' => $setlimit,
)
));
\ No newline at end of file
));
......@@ -203,7 +203,7 @@ jQuery(function($) {
$smarty = smarty(array('paginator'));
$smarty->assign('PAGEHEADING', $pageheading);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign_by_ref('data', $data);
$smarty->assign('data', $data);
$html = $smarty->fetch('artefact:internal:noteresults.tpl');
$smarty->assign('datarows', $html);
$smarty->assign('pagination', $pagination['html']);
......
......@@ -335,8 +335,8 @@ class LeapImportPlans extends LeapImportArtefactPlugin {
}
}
$smarty = smarty_core();
$smarty->assign_by_ref('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign_by_ref('entryplans', $entryplans);
$smarty->assign('displaydecisions', $importer->get('displaydecisions'));
$smarty->assign('entryplans', $entryplans);
return $smarty->fetch('artefact:plans:import/plans.tpl');
}
}
......@@ -39,7 +39,7 @@ addLoadEvent(function () {
EOF;
$smarty = smarty(array('paginator'));
$smarty->assign_by_ref('plans', $plans);
$smarty->assign('plans', $plans);
$smarty->assign('strnoplansaddone',
get_string('noplansaddone', 'artefact.plans',
'<a href="' . get_config('wwwroot') . 'artefact/plans/new.php">', '</a>'));
......
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