Commit: df49f10bc0a3eec3d5cbed5a731be90d2f6a9d3a
Author: gwoo | Date: 2010-01-24 09:55:13 -0800
diff --git a/models/Extension.php b/models/Extension.php
index 24c389b..06db2e0 100644
--- a/models/Extension.php
+++ b/models/Extension.php
@@ -54,11 +54,11 @@ class Extension extends \lithium\data\Model {
$params['record']->namespace = $match[1];
}
if (preg_match('/class\s(.*?)\s/', $params['record']->code, $match)) {
- $params['record']->class = $match[1];
+ $params['record']->name = $match[1];
}
$params['record']->file =
str_replace("\\", "/", $params['record']->namespace) .
- '/' . $params['record']->class . '.php';
+ '/' . $params['record']->name . '.php';
}
return $chain->next($self, $params, $chain);
});
diff --git a/tests/cases/models/ExtensionTest.php b/tests/cases/models/ExtensionTest.php
index 0369ed2..7dac3ed 100644
--- a/tests/cases/models/ExtensionTest.php
+++ b/tests/cases/models/ExtensionTest.php
@@ -99,7 +99,7 @@ class ExtensionTest extends \lithium\test\Unit {
$this->assertFalse($result);
$expected = 'MockExtension';
- $result = $extension->class;
+ $result = $extension->name;
$this->assertEqual($expected, $result);
}
diff --git a/views/extensions/index.html.php b/views/extensions/index.html.php
index 8210382..563071c 100644
--- a/views/extensions/index.html.php
+++ b/views/extensions/index.html.php
@@ -3,7 +3,7 @@
<?php
foreach ($latest as $ext) :
- echo '<li>' . $this->Html->link($ext->class, array(
+ echo '<li>' . $this->Html->link($ext->name, array(
'plugin' => 'li3_lab', 'controller' => 'extensions',
'action' => 'view', 'args' => array($ext->id)
)) . '</li>';
diff --git a/views/extensions/view.html.php b/views/extensions/view.html.php
index f2d1fe3..fa06a59 100644
--- a/views/extensions/view.html.php
+++ b/views/extensions/view.html.php
@@ -10,7 +10,7 @@
<div id="extension">
<div class="details">
<h1><?=$extension->namespace;?></h1>
- <h2><?=$extension->class;?></h2>
+ <h2><?=$extension->name;?></h2>
<p class="summary"><?=$extension->summary;?></p>
<div class="actions">
<a href="#">Download</a>
diff --git a/views/home/index.html.php b/views/home/index.html.php
index 799514b..64469fb 100644
--- a/views/home/index.html.php
+++ b/views/home/index.html.php
@@ -47,7 +47,7 @@
<li>
<?php
echo $this->html->link(
- $extension->class,
+ $extension->name,
array(
'plugin' => 'li3_lab',
'controller' => 'extensions',