aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/constants.php3
-rw-r--r--include/functions.inc.php21
2 files changed, 23 insertions, 1 deletions
diff --git a/include/constants.php b/include/constants.php
index 944bacca6..c47ecf9a2 100644
--- a/include/constants.php
+++ b/include/constants.php
@@ -26,7 +26,7 @@
// +-----------------------------------------------------------------------+
// Default settings
-define('PHPWG_VERSION', '1.4.0RC3');
+define('PHPWG_VERSION', '1.4.0');
define('PHPWG_URL', 'http://www.phpwebgallery.net');
define('PHPWG_FORUM_URL', 'http://forum.phpwebgallery.net');
@@ -58,4 +58,5 @@ define('WAITING_TABLE', $prefixeTable.'waiting');
define('IMAGE_METADATA_TABLE', $prefixeTable.'image_metadata');
define('RATE_TABLE', $prefixeTable.'rate');
define('USER_FORBIDDEN_TABLE', $prefixeTable.'user_forbidden');
+define('CADDIE_TABLE', $prefixeTable.'caddie');
?>
diff --git a/include/functions.inc.php b/include/functions.inc.php
index edc9f2062..282c196ac 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -618,4 +618,25 @@ function my_error($header)
$error.= '</pre>';
die ($error);
}
+
+/**
+ * creates an array based on a query, this function is a very common pattern
+ * used here
+ *
+ * @param string $query
+ * @param string $fieldname
+ * @return array
+ */
+function array_from_query($query, $fieldname)
+{
+ $array = array();
+
+ $result = pwg_query($query);
+ while ($row = mysql_fetch_array($result))
+ {
+ array_push($array, $row[$fieldname]);
+ }
+
+ return $array;
+}
?>