- renamed lookupVersionName and lookupAppName into lookup_version_name and lookup_app_name in respect to CODING_STANDARD
- removed appIdToName($appId) and versionIdToName($appId) from category.php - replaced every occurence of appIdToName and versionIdToName with lookup_app_name and lookup_version_name
This commit is contained in:
@@ -97,8 +97,9 @@ function deleteAppVersion($versionId)
|
||||
addmsg("Application Version $versionId deleted", "green");
|
||||
}
|
||||
|
||||
function lookupVersionName($versionId)
|
||||
function lookup_version_name($versionId)
|
||||
{
|
||||
if(!$versionId) return null;
|
||||
$result = query_appdb("SELECT versionName FROM appVersion WHERE versionId = $versionId");
|
||||
if(!$result || mysql_num_rows($result) != 1)
|
||||
return null;
|
||||
@@ -107,8 +108,9 @@ function lookupVersionName($versionId)
|
||||
}
|
||||
|
||||
|
||||
function lookupAppName($appId)
|
||||
function lookup_app_name($appId)
|
||||
{
|
||||
if(!$appId) return null;
|
||||
$result = query_appdb("SELECT appName FROM appFamily WHERE appId = $appId");
|
||||
if(!$result || mysql_num_rows($result) != 1)
|
||||
return null;
|
||||
|
||||
@@ -161,24 +161,6 @@ class Category {
|
||||
};
|
||||
|
||||
|
||||
function appIdToName($appId)
|
||||
{
|
||||
$result = query_appdb("SELECT appName FROM appFamily WHERE appId = $appId");
|
||||
if(!$result || !mysql_num_rows($result))
|
||||
return "<unknown>"; // shouldn't normally happen
|
||||
$ob = mysql_fetch_object($result);
|
||||
return $ob->appName;
|
||||
}
|
||||
|
||||
function versionIdToName($versionId)
|
||||
{
|
||||
$result = query_appdb("SELECT versionName FROM appVersion WHERE versionId = $versionId");
|
||||
if(!$result || !mysql_num_rows($result))
|
||||
return "<unknown>"; // shouldn't normally happen
|
||||
$ob = mysql_fetch_object($result);
|
||||
return $ob->versionName;
|
||||
}
|
||||
|
||||
/**
|
||||
* create the Category: line at the top of appdb pages$
|
||||
*/
|
||||
@@ -202,12 +184,12 @@ function make_cat_path($path, $appId = '', $versionId = '')
|
||||
{
|
||||
if(!empty($versionId))
|
||||
{
|
||||
$str .= " > ".html_ahref(appIdToName($appId),"appview.php?appId=$appId");
|
||||
$str .= " > ".versionIdToName($versionId);
|
||||
$str .= " > ".html_ahref(lookup_app_name($appId),"appview.php?appId=$appId");
|
||||
$str .= " > ".lookup_version_name($versionId);
|
||||
}
|
||||
else
|
||||
{
|
||||
$str .= " > ".appIdToName($appId);
|
||||
$str .= " > ".lookup_app_name($appId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ class Comment {
|
||||
}
|
||||
if($sEmail)
|
||||
{
|
||||
$sSubject = "Comment for ".lookupAppName($this->iAppId)." ".lookupVersionName($this->iVersionId)." added by ".$_SESSION['current']->sRealname;
|
||||
$sSubject = "Comment for ".lookup_app_name($this->iAppId)." ".lookup_version_name($this->iVersionId)." added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?appId=".$this->iAppId."&versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= "\n";
|
||||
$sMsg .= "Subject: ".$this->sSubject."\r\n";
|
||||
@@ -147,7 +147,7 @@ class Comment {
|
||||
$sEmail .= $this->oOwner->sEmail;
|
||||
if($sEmail)
|
||||
{
|
||||
$sSubject = "Comment for ".lookupAppName($this->iAppId)." ".lookupVersionName($this->iVersionId)." deleted by ".$_SESSION['current']->sRealname;
|
||||
$sSubject = "Comment for ".lookup_app_name($this->iAppId)." ".lookup_version_name($this->iVersionId)." deleted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?appId=".$this->iAppId."&versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= "\n";
|
||||
$sMsg .= "This comment was made on ".substr($this->sDateCreated,0,10)." by ".$this->oOwner->sRealname."\n";
|
||||
|
||||
@@ -57,7 +57,7 @@ class Note {
|
||||
$sEmail = get_notify_email_address_list($this->iAppId, $this->iVersionId);
|
||||
if($sEmail)
|
||||
{
|
||||
$sSubject = "Note for ".lookupAppName($this->iAppId)." ".lookupVersionName($this->iVersionId)." added by ".$_SESSION['current']->sRealname;
|
||||
$sSubject = "Note for ".lookup_app_name($this->iAppId)." ".lookup_version_name($this->iVersionId)." added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?appId=".$this->iAppId."&versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= "\n";
|
||||
$sMsg .= "Title: ".$this->sTitle."\r\n";
|
||||
@@ -119,7 +119,7 @@ class Note {
|
||||
$sEmail = get_notify_email_address_list($this->iAppId, $this->iVersionId);
|
||||
if($sEmail)
|
||||
{
|
||||
$sSubject = "Note for ".lookupAppName($this->iAppId)." ".lookupVersionName($this->iVersionId)." deleted by ".$_SESSION['current']->sRealname;
|
||||
$sSubject = "Note for ".lookup_app_name($this->iAppId)." ".lookup_version_name($this->iVersionId)." deleted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?appId=".$this->iAppId."&versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= "\n";
|
||||
$sMsg .= "This note was made on ".substr($this->sDateCreated,0,10)." by ".$this->oOwner->sRealname."\n";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/*****************/
|
||||
|
||||
require_once(BASE."include/maintainer.php");
|
||||
require_once(BASE."include/category.php");
|
||||
require_once(BASE."include/application.php");
|
||||
|
||||
|
||||
function global_sidebar_login() {
|
||||
@@ -27,9 +27,9 @@ function global_sidebar_login() {
|
||||
while(list($index, list($appId, $versionId, $superMaintainer)) = each($apps_user_maintains))
|
||||
{
|
||||
if($superMaintainer)
|
||||
$g->addmisc("<a href='".BASE."appview.php?appId=$appId'>".appIdToName($appId)."*</a>", "center");
|
||||
$g->addmisc("<a href='".BASE."appview.php?appId=$appId'>".lookup_app_name($appId)."*</a>", "center");
|
||||
else
|
||||
$g->addmisc("<a href='".BASE."appview.php?versionId=$versionId'>".appIdToName($appId)." ".versionIdToName($versionId)."</a>", "center");
|
||||
$g->addmisc("<a href='".BASE."appview.php?versionId=$versionId'>".lookup_app_name($appId)." ".lookup_version_name($versionId)."</a>", "center");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ function vote_menu()
|
||||
{
|
||||
if(isset($votes[$i]))
|
||||
{
|
||||
$appName = lookupAppName($votes[$i]->appId);
|
||||
$appName = lookup_app_name($votes[$i]->appId);
|
||||
$str = "<a href='appview.php?appId=".$votes[$i]->appId."'> $appName</a>";
|
||||
$m->add("<input type=radio name=slot value='$i'> ".$str);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user