From: <ru...@us...> - 2009-06-04 10:46:05
|
Revision: 6859 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6859&view=rev Author: rurban Date: 2009-06-04 10:45:52 +0000 (Thu, 04 Jun 2009) Log Message: ----------- Implement proper page permissions, remove lock Modified Paths: -------------- trunk/lib/plugin/WikiBlog.php Modified: trunk/lib/plugin/WikiBlog.php =================================================================== --- trunk/lib/plugin/WikiBlog.php 2009-06-04 08:47:23 UTC (rev 6858) +++ trunk/lib/plugin/WikiBlog.php 2009-06-04 10:45:52 UTC (rev 6859) @@ -1,7 +1,7 @@ <?php // -*-php-*- rcs_id('$Id$'); /* - Copyright 2002,2003,2007 $ThePhpWikiProgrammingTeam + Copyright 2002,2003,2007,2009 $ThePhpWikiProgrammingTeam This file is part of PhpWiki. @@ -213,6 +213,9 @@ // Version meta-data $summary = trim($posted['summary']); + // edit: private only + $perm = new PagePermission(); + $perm->perm['edit'] = $perm->perm['remove']; $version_meta = array('author' => $blog_meta['creator'], 'author_id' => $blog_meta['creator_id'], 'markup' => 2.0, // assume new markup @@ -220,6 +223,7 @@ 'mtime' => $now, 'pagetype' => $type, $type => $blog_meta, + 'perm' => $perm->perm, ); if ($type == 'comment') unset($version_meta['summary']); @@ -287,12 +291,6 @@ // have just created a blog with the same name, // we'll have locked it before we discover that the name // is taken. - /* - * FIXME: For now all blogs are locked. It would be - * nice to allow only the 'creator' to edit by default. - */ - $p->set('locked', true); //lock by default - // TOOD: use ACL perms $saved = $p->save($body, 1, $version_meta); $now++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2013-04-02 09:05:06
|
Revision: 8737 http://sourceforge.net/p/phpwiki/code/8737 Author: vargenau Date: 2013-04-02 09:05:00 +0000 (Tue, 02 Apr 2013) Log Message: ----------- Use Wikicreole syntax for RedirectTo Modified Paths: -------------- trunk/lib/plugin/WikiBlog.php Modified: trunk/lib/plugin/WikiBlog.php =================================================================== --- trunk/lib/plugin/WikiBlog.php 2013-04-02 08:25:32 UTC (rev 8736) +++ trunk/lib/plugin/WikiBlog.php 2013-04-02 09:05:00 UTC (rev 8737) @@ -220,7 +220,7 @@ if (!$parent) $parent = HOME_PAGE; require_once 'lib/loadsave.php'; $pageinfo = array('pagename' => $redirected, - 'content' => '<?plugin RedirectTo page="' . $parent . '" ?>', + 'content' => '<<RedirectTo page="' . $parent . '">>', 'pagedata' => array(), 'versiondata' => array('author' => $blog_meta['creator'], 'is_minor_edit' => 1), ); @@ -231,7 +231,7 @@ if (!$parent) $parent = HOME_PAGE; require_once 'lib/loadsave.php'; $pageinfo = array('pagename' => $redirected, - 'content' => '<?plugin RedirectTo page="' . $parent . '" ?>', + 'content' => '<<RedirectTo page="' . $parent . '">>', 'pagedata' => array(), 'versiondata' => array('author' => $blog_meta['creator'], 'is_minor_edit' => 1), ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-07-02 09:10:38
|
Revision: 8947 http://sourceforge.net/p/phpwiki/code/8947 Author: vargenau Date: 2014-07-02 09:10:30 +0000 (Wed, 02 Jul 2014) Log Message: ----------- Fix undefined $summary warning Modified Paths: -------------- trunk/lib/plugin/WikiBlog.php Modified: trunk/lib/plugin/WikiBlog.php =================================================================== --- trunk/lib/plugin/WikiBlog.php 2014-07-01 15:46:57 UTC (rev 8946) +++ trunk/lib/plugin/WikiBlog.php 2014-07-02 09:10:30 UTC (rev 8947) @@ -305,9 +305,10 @@ if ($type == 'wikiblog') $basepage = "Blog"; elseif ($type == 'comment') - $basepage = "Comment"; elseif ($type == 'wikiforum') - $basepage = substr($summary, 0, 12); - //$basepage = _("Message"); // FIXME: we use now the first 12 chars of the summary + $basepage = "Comment"; + elseif ($type == 'wikiforum') + // $basepage = substr($summary, 0, 12); + $basepage = _("Message"); // FIXME: we use now the first 12 chars of the summary return $basepage; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2015-02-11 16:08:41
|
Revision: 9525 http://sourceforge.net/p/phpwiki/code/9525 Author: vargenau Date: 2015-02-11 16:08:34 +0000 (Wed, 11 Feb 2015) Log Message: ----------- PHP Doc Modified Paths: -------------- trunk/lib/plugin/WikiBlog.php Modified: trunk/lib/plugin/WikiBlog.php =================================================================== --- trunk/lib/plugin/WikiBlog.php 2015-02-11 15:47:25 UTC (rev 9524) +++ trunk/lib/plugin/WikiBlog.php 2015-02-11 16:08:34 UTC (rev 9525) @@ -273,6 +273,12 @@ // Any way to jump back to preview mode??? } + /** + * @param WikiRequest $request + * @param array $args + * @param string $type + * @return XmlContent + */ function showAll(&$request, $args, $type = "wikiblog") { // FIXME: currently blogSearch uses WikiDB->titleSearch to @@ -309,8 +315,13 @@ return $html; } - // Subpage for the basepage. All Blogs/Forum/Comment entries are - // Subpages under this pagename, to find them faster. + /** + * Subpage for the basepage. All Blogs/Forum/Comment entries are + * Subpages under this pagename, to find them faster. + * + * @param string $type + * @return string + */ protected function blogPrefix($type = 'wikiblog') { if ($type == 'wikiblog') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |