Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Release 2.0 #1

Merged
7 commits merged into from
Nov 28, 2010
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/modules/EZComments/pnadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,8 @@ function EZComments_admin_deletemodule($args)
// note: the api call is a little different here since we'll really calling a hook function that will
// normally be executed when a module is deleted. The extra nesting of the modname inside an extrainfo
// array reflects this
if (pnModAPIFunc('EZComments', 'admin', 'deletemodule', array('extrainfo' => array('module' => $modinfo['name'])))) {
$xtra = pnModAPIFunc('EZComments', 'admin', 'deletemodule', array('extrainfo' => array('module' => $modinfo['name'])));
if ($xtra['EZComments']) {
// Success
LogUtil::registerStatus(__('Done! Comment deleted.', $dom));
}
Expand Down Expand Up @@ -644,7 +645,8 @@ function EZComments_admin_deleteitem($args)
// note: the api call is a little different here since we'll really calling a hook function that will
// normally be executed when a module is deleted. The extra nesting of the modname inside an extrainfo
// array reflects this
if (pnModAPIFunc('EZComments', 'admin', 'deletebyitem', array('mod' => $modinfo['name'], 'objectid' => $objectid))) {
$xtra = pnModAPIFunc('EZComments', 'admin', 'deletebyitem', array('mod' => $modinfo['name'], 'objectid' => $objectid));
if ($xtra['EZComments']) {
// Success
LogUtil::registerStatus(__('Done! Comment deleted.', $dom));
}
Expand Down
6 changes: 4 additions & 2 deletions src/modules/EZComments/pnadminapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ function EZComments_adminapi_deletebyitem($args)
$objectid = DataUtil::formatForStore($args['objectid']);
$where = "$column[modname] = '$mod' AND $column[objectid] = '$objectid'";

return DBUtil::deleteWhere('EZComments', $where);
$args['extrainfo']['EZComments'] = DBUtil::deleteWhere('EZComments', $where);
return $args['extrainfo'];
}

/**
Expand Down Expand Up @@ -247,7 +248,8 @@ function EZComments_adminapi_deletemodule($args)
// Get items
$where = "WHERE $columns[modname] = '" . DataUtil::formatForStore($mod) . "'";

return DBUtil::deleteWhere('EZComments', $where);
$args['extrainfo']['EZComments'] = DBUtil::deleteWhere('EZComments', $where);
return $args['extrainfo'];
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ <h3 id="comments_<!--[$ezc_info.mod]-->_<!--[$ezc_info.objectid]-->" class="ezco
</li>
<!--[if $pncore.logged_in eq true]-->
<li class="ezc_options">
<!--[if $prfmodule]-->
<!--[$comment.uid|userprofilelink:'':"`$baseurl`images/icons/extrasmall/personal.gif"]-->
<!--[/if]-->
<!--[if $msgmodule]-->
<a href="<!--[pnmodurl modname=$msgmodule func='inbox' func='newpm' uid=$comment.uid]-->"><!--[pnimg modname='core' src='mail_generic.gif' set='icons/extrasmall' __title='Send mail to user' __alt='Send mail to user']--></a>
<!--[/if]-->
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/modules/EZComments/pntemplates/Standard/style1.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
}
#ezc_comments .ezcomments_wrapper .ezc_tl {
background:url(images/01_bg_comments_tl.gif) top left no-repeat;
position:relative;
}
#ezc_comments .ezcomments_wrapper .ezc_br {
background:url(images/01_bg_comments_br.gif) bottom right no-repeat;
Expand Down
6 changes: 3 additions & 3 deletions src/modules/EZComments/pnuser.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function EZComments_user_main($args = array())

$items = pnModAPIFunc('EZComments', 'user', 'getall', $params);

if ($items === false) {
if ($items === false) {
return LogUtil::registerError(__('Internal Error.', $dom));
}

Expand Down Expand Up @@ -117,9 +117,9 @@ function EZComments_user_view($args)
$mod = isset($args['mod']) ? $args['mod'] : pnModGetName();
$objectid = isset($args['objectid']) ? $args['objectid'] : '';

// security check
// first check if the user is allowed to do any comments for this module/objectid
if (!SecurityUtil::checkPermission('EZComments::', "$mod:$objectid:", ACCESS_OVERVIEW)) {
return LogUtil::registerPermissionError();
return;
}

$dom = ZLanguage::getModuleDomain('EZComments');
Expand Down