Skip to content
Browse files

Fixes plugin installation

  • Loading branch information...
1 parent ef4eab2 commit 27a64c5d6f1a6113142193757e4c76cc9203e554 @kriskelly kriskelly committed
View
2 application/controllers/PluginsController.php
@@ -112,7 +112,7 @@ public function getPluginMetaInfo($plugin)
public function browseAction() {
$new_plugins = get_plugin_broker()->getNew();
-
+
if(count($new_plugins)) {
$plugin_to_install = array_pop($new_plugins);
View
5 application/libraries/Omeka/Db.php
@@ -60,6 +60,11 @@ public function prepare($sql)
return $this->_conn->prepare($sql);
}
+ public function lastInsertId()
+ {
+ return $this->_conn->lastInsertId();
+ }
+
public function getTableName($class) {
$name = $this->_table_names[$class];
View
29 application/libraries/plugins.php
@@ -24,9 +24,6 @@ class PluginBroker
//Theme directories that have been added by plugins
protected $_theme_dirs = array('public'=>array(),'admin'=>array());
- //Output directories that have been added by plugins
- protected $_output_dirs = array('json'=>array(), 'rest'=>array());
-
//Any navigation elements that have been added via plugins
protected $_nav = array();
@@ -54,7 +51,7 @@ public function __construct()
$db = get_db();
$res = $db->query("SELECT p.name, p.active FROM $db->Plugin p");
- foreach ($res as $row) {
+ foreach ($res->fetchAll() as $row) {
$installed[$row['name']] = $row['name'];
//Only active plugins should be require'd
@@ -271,25 +268,6 @@ public function addThemeDir($path, $theme)
$this->_theme_dirs[$theme][] = $path;
}
-
-
- /**
- * Make a directory containing files that output in a specific format (current options = 'rest' and 'json')
- *
- * @return void
- **/
- public function addOutputDir($path, $type)
- {
- if(!in_array($type, array('json', 'rest'))) return;
-
- $this->_output_dirs[$type][] = $this->getCurrentPlugin() . DIRECTORY_SEPARATOR . $path;
-
- }
-
- public function loadOutputDirs(Omeka_View $view, $type)
- {
- $this->registerScriptPaths($view, $this->_output_dirs[$type]);
- }
/**
* This will hook into the Zend_View API to add whatever is stored in self::$_theme_dirs to the script path
@@ -493,11 +471,6 @@ function add_navigation($text, $link, $type='main', $permissions=null)
get_plugin_broker()->addNavigation($text, $link, $type, $permissions);
}
-function add_output_pages($dir, $output_type='rest')
-{
- get_plugin_broker()->addOutputDir($dir, $output_type);
-}
-
function get_acl()
{
return Zend_Registry::get( 'acl' );
View
8 application/tests/all.php
@@ -130,7 +130,7 @@ public function setTable($record_class, $table_is_mock=true)
require_once 'Item.php';
require_once 'TagTestCase.php';
-/*
+
require_once 'TaggableTestCase.php';
require_once 'ItemTestCase.php';
require_once 'ExhibitSectionTestCase.php';
@@ -140,13 +140,13 @@ public function setTable($record_class, $table_is_mock=true)
require_once 'UploadTestCase.php';
require_once 'CollectionTestCase.php';
require_once 'UserTestCase.php';
-*/
+
//require_once 'controllers/ExhibitsControllerTestCase.php';
$test = new TestSuite('Omeka Tests');
$test->addTestCase(new TagTestCase());
-/*
+
$test->addTestCase(new ItemTestCase());
$test->addTestCase(new TaggableTestCase());
$test->addTestCase(new ExhibitSectionTestCase());
@@ -156,7 +156,7 @@ public function setTable($record_class, $table_is_mock=true)
$test->addTestCase(new UploadTestCase());
$test->addTestCase(new CollectionTestCase());
$test->addTestCase(new UserTestCase());
-*/
+
//$test->addTestCase(new ExhibitsControllerTestCase());
$test->run(new HtmlReporter());

0 comments on commit 27a64c5

Please sign in to comment.
Something went wrong with that request. Please try again.