Changeset 1447
- Timestamp:
- 12/12/07 16:37:25 (8 months ago)
- Files:
-
- devel/cron.php (modified) (1 diff)
- devel/index.php (modified) (1 diff)
- devel/lib/templates.php (modified) (4 diffs)
- devel/mod/blog/lib.php (modified) (2 diffs)
- devel/mod/commentwall/do_action.php (modified) (1 diff)
- devel/mod/community/lib.php (modified) (2 diffs)
- devel/mod/elggadmin/lib/elggadmin.inc.php (modified) (1 diff)
- devel/mod/pages/index.php (modified) (1 diff)
- devel/mod/pages/lib.php (modified) (1 diff)
- devel/mod/template/lib.php (modified) (1 diff)
- devel/mod/template/lib/templates_preview.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/cron.php
r1439 r1447 4 4 // later this will go through /mod 5 5 // and things like auth plugins 6 // but we don't have those yet, so.... 6 // but we don't have those yet, so... 7 8 define('context','external'); 7 9 8 10 $starttime = microtime(); devel/index.php
r1378 r1447 3 3 global $CFG; 4 4 5 define('context', 'external'); 5 6 require_once(dirname(__FILE__)."/includes.php"); 6 7 devel/lib/templates.php
r1444 r1447 70 70 'html' => templates_draw(array( 'context' => 'submenuitem', 71 71 'name' => __gettext("Change theme"), 72 'location' => url . ' _templates/')));72 'location' => url . 'mod/template/'))); 73 73 } 74 74 … … 727 727 $name .=" /> "; 728 728 $column1 = "<b>" . $template['name'] . "</b>"; 729 $column2 = "<a href=\"".url." _templates/preview.php?template_preview=".$template['shortname']."\" target=\"preview\">" . __gettext("Preview") . "</a>";729 $column2 = "<a href=\"".url."mod/template/preview.php?template_preview=".$template['shortname']."\" target=\"preview\">" . __gettext("Preview") . "</a>"; 730 730 $panel .=templates_draw(array( 731 731 'context' => 'adminTable', … … 759 759 $name .=" /> "; 760 760 $column1 = "<b>" . $template->name . "</b>"; 761 $column2 = "<a href=\"".url." _templates/preview.php?template_preview=".$template->shortname."\" target=\"preview\">" . __gettext("Preview") . "</a>";762 763 $column2 .= " | <a href=\"".url." _templates/edit.php?id=".$template->ident."\" >". __gettext("Edit") ."</a>";764 $column2 .= " | <a href=\"".url." _templates/?action=deletetemplate&delete_template_id=".$template->ident."\" onclick=\"return confirm('" . __gettext("Are you sure you want to permanently remove this template?") . "')\">" . __gettext("Delete") . "</a>";761 $column2 = "<a href=\"".url."mod/template/preview.php?template_preview=".$template->shortname."\" target=\"preview\">" . __gettext("Preview") . "</a>"; 762 763 $column2 .= " | <a href=\"".url."mod/template/edit.php?id=".$template->ident."\" >". __gettext("Edit") ."</a>"; 764 $column2 .= " | <a href=\"".url."mod/template/?action=deletetemplate&delete_template_id=".$template->ident."\" onclick=\"return confirm('" . __gettext("Are you sure you want to permanently remove this template?") . "')\">" . __gettext("Delete") . "</a>"; 765 765 $panel .=templates_draw(array( 766 766 'context' => 'adminTable', … … 1226 1226 // TODO: check again if is readable? 1227 1227 if (is_readable($tpl)) { 1228 $template[$context] .= @file_get_contents($tpl); 1228 $content = @file_get_contents($tpl); 1229 $template[$context] = $template[$context] . @file_get_contents($tpl); 1229 1230 //print_object('Loaded: ' . $tpl); 1230 1231 } else { devel/mod/blog/lib.php
r1434 r1447 347 347 $anyComments = __gettext("comment(s)"); 348 348 349 $body .= '<h3><a href="' . $CFG->wwwroot . user_ name($post->weblog) . '/weblog/' . $post->ident . '.html">' . $post->title . '</a></h3>';349 $body .= '<h3><a href="' . $CFG->wwwroot . user_info('username', $post->weblog) . '/weblog/' . $post->ident . '.html">' . $post->title . '</a></h3>'; 350 350 $body .= $postedby . ' ' . $username . ' (' . $date . ')<br><br>'; 351 351 $body .= $post->body . '<br>'; … … 357 357 } 358 358 $numcomments = $_SESSION['comment_cache'][$post->ident]->data; 359 $comments = "<a href=\"".url.$username."/ {$post->ident}.html\">$numcomments $anyComments</a>";359 $comments = "<a href=\"".url.$username."/weblog/{$post->ident}.html\">$numcomments $anyComments</a>"; 360 360 361 $body .= $comments . '</div>'; 362 } 363 } 364 365 return array ( 366 'title' => __gettext("Weblog" 367 ), 'content' => $body); 361 $body .= $comments; 362 } 363 } 364 $body .= '</div>'; 365 366 return array ('title' => __gettext('Blog').' :: '.htmlspecialchars(user_name($blog_id), ENT_COMPAT, 'utf-8'), 'content' => $body); 368 367 369 368 } devel/mod/commentwall/do_action.php
r1218 r1447 28 28 29 29 // Store the rating 30 $success =commentwall_addcomment($wallowner, $comment_owner, $text);30 $success = (empty($text)) ? false : commentwall_addcomment($wallowner, $comment_owner, $text); 31 31 32 32 // Message devel/mod/community/lib.php
r1430 r1447 306 306 // members have access to upload files or create directories 307 307 if (run('community:membership:check', array($_SESSION['userid'], $object_owner))) { 308 returntrue;308 $result = true; 309 309 } 310 310 break; … … 312 312 // community owner can edit all files 313 313 if (record_exists('users', 'ident', $object_owner, 'owner', $_SESSION['userid'])) { 314 returntrue;314 $result = true; 315 315 } 316 316 break; 317 317 case 'profile': 318 // owner can edit profile 319 if (record_exists('users', 'ident', $object_owner, 'owner', $_SESSION['userid'])) { 320 $result = true; 321 } 322 break; 318 323 } 319 324 devel/mod/elggadmin/lib/elggadmin.inc.php
r1421 r1447 204 204 $page = new StdClass; 205 205 $page->title = __gettext('Front page'); 206 $page->body .= elggadmin_tpltextarea('frontpage_loggedout', __gettext('Front page (when logged out)'));206 $page->body = elggadmin_tpltextarea('frontpage_loggedout', __gettext('Front page (when logged out)')); 207 207 $page->body .= elggadmin_tpltextarea('frontpage_loggedin', __gettext('Front page (when logged in)')); 208 208 $page->body .= pages_html_input('hidden', array('name'=>'action','value'=>'elggadmin:frontpage')); devel/mod/pages/index.php
r1376 r1447 8 8 */ 9 9 10 define('context', 'pages');11 10 12 11 include(dirname(dirname(dirname(__FILE__))) . '/includes.php'); 13 12 require(dirname(__FILE__) . '/lib/pages.inc.php'); 13 14 if (page_owner() > 0) { 15 define('context', 'pages'); 16 } else { 17 define('context', 'external'); 18 } 14 19 15 20 // pages init devel/mod/pages/lib.php
r1421 r1447 451 451 } 452 452 453 if ( !empty($content)) {453 if (isset($content)) { 454 454 $result = "<{$tag}{$extra}>{$content}</{$tag}>\n"; 455 455 } else { devel/mod/template/lib.php
r1301 r1447 12 12 if ($page_owner == $_SESSION['userid'] && $page_owner != -1) { 13 13 $PAGE->menu_sub[] = array( 'name' => 'template:change', 14 'html' => a_href( "{$CFG->wwwroot} _templates/",14 'html' => a_href( "{$CFG->wwwroot}mod/template/", 15 15 __gettext("Change theme"))); 16 16 } devel/mod/template/lib/templates_preview.php
r1301 r1447 13 13 $body = <<< END 14 14 15 <img src="/ _templates/leaves.jpg" width="300" height="225" alt="A test image" align="right" />15 <img src="/mod/template/images/leaves.jpg" width="300" height="225" alt="A test image" align="right" /> 16 16 <h1>$heading1</h1> 17 17 <p>Paragraph text</p>
