Skip to content
Permalink
Browse files

[plugin] change mysql_* function to DB object method

  • Loading branch information
nao-pon committed Sep 6, 2013
1 parent 9c6855e commit aaeb78b0850472592b20a71627fce92285ddd164
@@ -1299,7 +1299,7 @@ function XpWikiAttachPages(& $xpwiki, $page='',$age=NULL,$isbn=true,$max=50,$sta
$query = "SELECT DISTINCT p.pgid FROM ".$this->xpwiki->db->prefix($this->root->mydirname."_pginfo")." p INNER JOIN ".$this->xpwiki->db->prefix($this->root->mydirname."_attach")." a ON p.pgid=a.pgid{$where}";
$result = $this->xpwiki->db->query($query);

$this->count = $result ? mysql_num_rows($result) : 0;
$this->count = $result ? $this->xpwiki->db->getRowsNum($result) : 0;

$this->max = $max;
$this->start = $start;
@@ -665,7 +665,7 @@ function plain_db_init()
$id = $this->func->get_pgid_by_name($page, FALSE, TRUE);
$query = "SELECT plain FROM `".$this->xpwiki->db->prefix($this->root->mydirname."_plain")."` WHERE `pgid` = ".$id.";";
$result = $this->xpwiki->db->query($query);
if ($result && mysql_num_rows($result))
if ($result && $this->xpwiki->db->getRowsNum($result))
{
list($text) = $this->xpwiki->db->fetchRow( $result );
if ($text && !$this->root->post['plain_all'])
@@ -214,7 +214,7 @@ function plugin_exifshowcase_body($args,$page)

$query = "SELECT name FROM `".$this->xpwiki->db->prefix($this->root->mydirname . "_attach")."` WHERE {$where}{$order};";
$result = $this->xpwiki->db->query($query);
while($_row = mysql_fetch_row($result))
while($_row = $this->xpwiki->db->fetchRow($result))
{
$files[$_row[0]] = $this->cont['UPLOAD_DIR'].$this->func->encode($page).'_'.$this->func->encode($_row[0]);
}

0 comments on commit aaeb78b

Please sign in to comment.
You can’t perform that action at this time.