Skip to content

Commit

Permalink
fixed install;
Browse files Browse the repository at this point in the history
added image orientation methods
  • Loading branch information
tamlyn committed Feb 4, 2006
1 parent a81c8c6 commit bc7682e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
23 changes: 22 additions & 1 deletion includes/image.class.php
Expand Up @@ -6,7 +6,7 @@
* @author Tamlyn Rhodes <tam at zenology dot co dot uk>
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License
* @copyright (c)2003-2005 Tamlyn Rhodes
* @version $Id: image.class.php,v 1.18 2006/01/24 13:10:44 tamlyn Exp $
* @version $Id: image.class.php,v 1.19 2006/02/04 02:12:12 tamlyn Exp $
*/

//include the base class
Expand Down Expand Up @@ -61,8 +61,29 @@ function sgImage($id, &$parent)
$this->translator =& Translator::getInstance();
}

/**
* Over-rides the method in the item class
* @return true returns true
*/
function isImage() { return true; }


/**
* @return bool true if image height is greater than width
*/
function isPortrait()
{
return $this->width()/$this->height() > 1;
}

/**
* @return bool true if image height is greater than width
*/
function isLandscape()
{
return $this->width()/$this->height() < 1;
}

function hasPrev()
{
return (bool) $this->index();
Expand Down
6 changes: 3 additions & 3 deletions install/install.php
Expand Up @@ -6,7 +6,7 @@
* @author Tamlyn Rhodes <tam at zenology dot co dot uk>
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License
* @copyright (c)2003, 2004 Tamlyn Rhodes
* @version $Id: install.php,v 1.5 2006/01/22 03:25:37 tamlyn Exp $
* @version $Id: install.php,v 1.6 2006/02/04 02:12:12 tamlyn Exp $
*/

//path to singapore root
Expand Down Expand Up @@ -92,9 +92,8 @@
setupHeader("Step 2 of 2: Setup Database");

//create config object
$config = sgConfig::getInstance();
$config =& sgConfig::getInstance();
$config->loadConfig($basePath."singapore.ini");
$config->loadConfig($basePath."secret.ini.php");
$config->base_path = $basePath;

switch($config->io_handler) {
Expand All @@ -106,6 +105,7 @@

case "mysql" :
include_once $basePath."includes/io_mysql.class.php";
$config->loadConfig($basePath."secret.ini.php");
setupMessage("Setup will now create the tables necessary to run singapore on a MySQL database");
setupHeader("Connecting to database");
$io = new sgIO_mysql();
Expand Down

0 comments on commit bc7682e

Please sign in to comment.