22 private function getAmdName(
$name) {
23 $pieces = explode(
"/",
$name);
24 if (count($pieces) <= 1 || $pieces[0] !=
'js') {
29 $basename = basename(array_pop($pieces),
".js");
30 array_push($pieces, $basename);
32 return implode(
"/", $pieces);
44 $amdName = $this->getAmdName($viewName);
46 if (!empty($amdName)) {
47 $content = preg_replace(
'/^define\(([^\'"])/m',
"define(\"$amdName\", \$1",
$content, 1);
if($guid==elgg_get_logged_in_user_guid()) $name
filter($viewName, $content)
Inserts the AMD name into $content and returns the new value.
$content
Set robots.txt action.