Commit 3f06145b authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Moved some of the blog files around so that the URLs are more consistent

parent 8a44a5d5
......@@ -27,7 +27,7 @@
define('INTERNAL', 1);
define('JSON', 1);
require(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
safe_require('artefact', 'blog');
json_headers();
......
......@@ -27,7 +27,7 @@
define('INTERNAL', 1);
define('MENUITEM', 'myblogs');
require(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
safe_require('artefact', 'blog');
// This is the wwwroot.
......
......@@ -46,7 +46,7 @@ class PluginArtefactBlog extends PluginArtefact {
return array(
array(
'name' => 'myblogs',
'link' => 'list/',
'link' => '',
)
);
}
......
......@@ -96,14 +96,14 @@ function newblog_submit(Pieform $form, $values) {
global $USER;
ArtefactTypeBlog::new_blog($USER, $values);
redirect(get_config('wwwroot') . 'artefact/blog/list/');
redirect('artefact/blog/');
}
/**
* This function gets called to cancel a submission.
*/
function newblog_cancel_submit() {
redirect(get_config('wwwroot') . 'artefact/blog/list/');
redirect('artefact/blog/');
}
?>
......@@ -657,10 +657,10 @@ function editpost_submit(Pieform $form, array $values) {
if ((!empty($values['id']) && ArtefactTypeBlogPost::edit_post($USER, $values))
|| (empty($values['id']) && ArtefactTypeBlogPost::new_post($USER, $values))) {
// Redirect to the blog page.
redirect(get_config('wwwroot') . 'artefact/blog/view/?id=' . $values['parent']);
redirect('artefact/blog/view/?id=' . $values['parent']);
}
redirect(get_config('wwwroot') . 'artefact/blog/list/');
redirect('artefact/blog/');
}
......@@ -671,7 +671,7 @@ function editpost_submit(Pieform $form, array $values) {
*/
function editpost_cancel_submit() {
$blog = param_integer('parent');
redirect(get_config('wwwroot') . 'artefact/blog/view/?id=' . $blog);
redirect('artefact/blog/view/?id=' . $blog);
}
?>
......@@ -16,7 +16,7 @@
<div id="myblogs">
<div class="blogsettings">
<div class="addicon">
<a href="{$WWWROOT}artefact/blog/editpost.php?blog={$blog->get('id')}">{str section="artefact.blog" tag="addpost"}</a>
<a href="{$WWWROOT}artefact/blog/post.php?blog={$blog->get('id')}">{str section="artefact.blog" tag="addpost"}</a>
</div>
<a href="{$WWWROOT}artefact/blog/settings/?id={$blog->get('id')}">{str section="artefact.blog" tag="settings"}</a>
</div>
......
......@@ -92,7 +92,7 @@ postlist.rowfunction = function(d, n, gd) {
{
'method' : 'get',
'style' : 'display: inline;',
'action' : {$enc_wwwroot} + 'artefact/blog/editpost.php'
'action' : {$enc_wwwroot} + 'artefact/blog/post.php'
},
INPUT(
{
......
......@@ -25,7 +25,7 @@
*/
define('INTERNAL', 1);
define('MENUITEM', 'profile');
define('MENUITEM', 'myprofile');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
$smarty = smarty(array('tablerenderer'));
......
......@@ -979,7 +979,7 @@ function main_nav() {
if ($plugins = get_records_array('artefact_installed')) {
foreach ($plugins as &$plugin) {
safe_require('artefact', $plugin->name, 'lib.php', 'require_once');
safe_require('artefact', $plugin->name);
$plugin_menu = call_static_method(generate_class_name('artefact',$plugin->name), 'menu_items');
foreach ($plugin_menu as &$menu_item) {
......
Supports Markdown
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