From: <var...@us...> - 2009-06-12 14:14:58
|
Revision: 6927 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6927&view=rev Author: vargenau Date: 2009-06-12 13:37:14 +0000 (Fri, 12 Jun 2009) Log Message: ----------- Make WatchPage work for Gforge Modified Paths: -------------- trunk/lib/IniConfig.php trunk/lib/plugin/WatchPage.php trunk/themes/gforge/templates/actionbar.tmpl Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2009-06-12 12:10:12 UTC (rev 6926) +++ trunk/lib/IniConfig.php 2009-06-12 13:37:14 UTC (rev 6927) @@ -622,7 +622,7 @@ .'SearchHighlight:SemanticRelations:SemanticSearch:SystemInfo:' .'TitleSearch:' .'UpLoad:UserPreferences:' - .'WantedPages:WhoIsOnline:WikiAdminSelect:WikiBlog:' + .'WantedPages:WatchPage:WhoIsOnline:WikiAdminSelect:WikiBlog:' // plus some derivations .'AllPagesCreatedByMe:AllPagesLastEditedByMe:AllPagesOwnedByMe:AllUserPages:' .'FullRecentChanges:' @@ -654,7 +654,6 @@ $AllActionPages[] = 'RateIt'; // RateIt works only in wikilens derived themes $AllActionPages[] = 'TranslateText'; $AllActionPages[] = 'UriResolver'; - $AllActionPages[] = 'WatchPage'; } if (defined('GFORGE') and GFORGE) { if (defined('ENABLE_EXTERNAL_PAGES') and ENABLE_EXTERNAL_PAGES) { Modified: trunk/lib/plugin/WatchPage.php =================================================================== --- trunk/lib/plugin/WatchPage.php 2009-06-12 12:10:12 UTC (rev 6926) +++ trunk/lib/plugin/WatchPage.php 2009-06-12 13:37:14 UTC (rev 6927) @@ -150,9 +150,9 @@ } elseif ($add and $request->getArg('verify')) { // this is not executed so far. // add page to watchlist, verified - $pref = &$request->_prefs; - $pref->set('notifyPages', $this->addpagelist($page, $pagelist)); - $user->setPreferences($pref); + $rp = $user->getPreferences(); + $rp->set('notifyPages', $this->addpagelist($page, $pagelist)); + $user->setPreferences($rp); $request->_setUser($user); $request->setArg("verify",false); $request->setArg("add",false); Modified: trunk/themes/gforge/templates/actionbar.tmpl =================================================================== --- trunk/themes/gforge/templates/actionbar.tmpl 2009-06-12 12:10:12 UTC (rev 6926) +++ trunk/themes/gforge/templates/actionbar.tmpl 2009-06-12 13:37:14 UTC (rev 6927) @@ -120,6 +120,9 @@ <td class="spacer"> </td> <?php } ?> + <td class="spacer"> </td> + <td><?= Button("WatchPage", _("Watch Page")) ?></td> + <?php if ((DEBUG and $request->getArg('action') == 'browse') || $user->isAdmin()) { ?> <!-- Buttons really only for debugging --> <?php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |