Commit 14c62515 authored by niclone's avatar niclone

[FIX]mods: version is an array

parent 302a17df
......@@ -48,7 +48,7 @@ class TikiModAvailable extends TikiMod {
var $repository; /* string */
var $description; /* array */
var $licence; /* string */
var $version; /* string */
var $version; /* array */
var $md5; /* string */
var $requires; /* array */
var $suggests; /* array */
......@@ -67,7 +67,7 @@ class TikiModAvailable extends TikiMod {
$out.= "'". addslashes($this->revision) ."',";
$out.= "'". is_array($this->description ? addslashes(implode(" ",$this->description)) : '') ."',";
$out.= "'". addslashes($this->licence) ."',";
$out.= "'". addslashes($this->version) ."',";
$out.= "'". addslashes($this->version[0]) ."',"; // probably buggy isn't it?
$out.= "'". addslashes($this->md5) ."',";
$requires='';
......@@ -214,8 +214,7 @@ class TikiModInfo extends TikiModAvailable {
$this->lastmodif = trim(preg_replace('/\$[^:]*:([^\$]*)\$/',"$1",trim($line)));
break;
case 'version':
if (empty($this->version))
$this->version = trim($line);
$this->version[]=trim($line);
break;
case 'licence':
$this->licence = trim($line);
......@@ -594,7 +593,7 @@ class ModsLib {
while(isset($str[$col])) {
$blah=stripslashes($str[$col]);
if (preg_match('/^[0-9]+\.[0-9]+[0-9.]*$/', $blah))
$mod->version=$blah;
$mod->version[]=$blah;
elseif (preg_match('/^[0-9abcdefABCDEF]{32}$/', $blah))
$mod->md5=$blah;
$col++;
......@@ -603,7 +602,7 @@ class ModsLib {
if (count($str) > 7) {
// now, $str[5] MUST be version, and $str[6] MUST be md5
$mod->version=$str[5];
$mod->version[]=$str[5];
$mod->md5=$str[6];
$mod->readdeps_line($str[7]);
}
......
......@@ -198,7 +198,7 @@ href="tiki-mods.php?republish={$public.$type.$item->modname|escape:"url"}{$finda
{if $local.$type.$item->name}
<td><b><a href="tiki-mods.php?focus={$local.$type.$item->modname|escape:"url"}{$findarg}{$typearg}">{$local.$type.$item->name}</a></b></td>
<td>{$local.$type.$item->version}</td>
<td>{$local.$type.$item->version[0]}</td>
<td>{$local.$type.$item->licence}</td>
<td>{$local.$type.$item->description}</td>
{if $installed.$type.$item}
......@@ -213,7 +213,7 @@ href="tiki-mods.php?republish={$public.$type.$item->modname|escape:"url"}{$finda
{/if}
{else}
<td>{$remote.$type.$item->name}</td>
<td>{$remote.$type.$item->version}</td>
<td>{$remote.$type.$item->version[0]}</td>
<td>{$remote.$type.$item->licence}</td>
<td>{$remote.$type.$item->description}</td>
<td>{if $iswritable}<a href="tiki-mods.php?action=install&amp;package={$remote.$type.$item->modname|escape:"url"}{$findarg}{$typearg}">{tr}install{/tr}</a>{else}<b><s>{tr}Install{/tr}</s></b>{/if}</td>
......
Markdown is supported
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